From b7c076a43bb3b3b5265cdace6497d23e6bf09c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=A1gr?= Date: Wed, 25 Oct 2023 14:03:47 +0200 Subject: [PATCH 1/7] Make kuttl suite compatible with install_yamls Prow CI job executing KUTTL test suites has different structure and logic then what we have. This patch is making it work in both cases. --- Makefile | 3 +-- .../telemetry.openstack.org_autoscalings.yaml | 2 +- .../telemetry.openstack.org_ceilometers.yaml | 2 +- .../telemetry.openstack.org_telemetries.yaml | 2 +- .../telemetry.openstack.org_autoscalings.yaml | 2 +- .../telemetry.openstack.org_ceilometers.yaml | 2 +- .../telemetry.openstack.org_telemetries.yaml | 2 +- kuttl-test.yaml | 23 +++++++++++++++++++ .../suites/autoscaling/tests/00-deps.yaml | 6 +++++ .../tests/{00-assert.yaml => 01-assert.yaml} | 0 .../tests/{00-deploy.yaml => 01-deploy.yaml} | 0 11 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 kuttl-test.yaml create mode 100644 tests/kuttl/suites/autoscaling/tests/00-deps.yaml rename tests/kuttl/suites/autoscaling/tests/{00-assert.yaml => 01-assert.yaml} (100%) rename tests/kuttl/suites/autoscaling/tests/{00-deploy.yaml => 01-deploy.yaml} (100%) diff --git a/Makefile b/Makefile index fa71f43d..32559e60 100644 --- a/Makefile +++ b/Makefile @@ -341,10 +341,9 @@ KUTTL_SUITE_DIR ?= tests/kuttl/suites/$(KUTTL_SUITE) kuttl-test-prep: oc apply -k $(KUTTL_SUITE_DIR)/deps/ --timeout=120s oc wait -n $(KUTTL_NAMESPACE) openstackcontrolplane openstack --for condition=Ready --timeout=300s - oc apply -f $(KUTTL_SUITE_DIR)/deps/rhobs.yaml - $(until oc api-resources -n $(KUTTL_NAMESPACE) | grep -q rhobs; do sleep 2; done) .PHONY: kuttl-test-run +kuttl-test-run: export NAMESPACE = $(KUTTL_NAMESPACE) kuttl-test-run: oc kuttl test --v 1 --start-kind=false --config $(KUTTL_SUITE_DIR)/config.yaml diff --git a/api/bases/telemetry.openstack.org_autoscalings.yaml b/api/bases/telemetry.openstack.org_autoscalings.yaml index ab660871..8f9203c7 100644 --- a/api/bases/telemetry.openstack.org_autoscalings.yaml +++ b/api/bases/telemetry.openstack.org_autoscalings.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: autoscalings.telemetry.openstack.org spec: diff --git a/api/bases/telemetry.openstack.org_ceilometers.yaml b/api/bases/telemetry.openstack.org_ceilometers.yaml index ec4eb3a2..5fd3df66 100644 --- a/api/bases/telemetry.openstack.org_ceilometers.yaml +++ b/api/bases/telemetry.openstack.org_ceilometers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: ceilometers.telemetry.openstack.org spec: diff --git a/api/bases/telemetry.openstack.org_telemetries.yaml b/api/bases/telemetry.openstack.org_telemetries.yaml index 7e1f482e..26dd48f5 100644 --- a/api/bases/telemetry.openstack.org_telemetries.yaml +++ b/api/bases/telemetry.openstack.org_telemetries.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: telemetries.telemetry.openstack.org spec: diff --git a/config/crd/bases/telemetry.openstack.org_autoscalings.yaml b/config/crd/bases/telemetry.openstack.org_autoscalings.yaml index ab660871..8f9203c7 100644 --- a/config/crd/bases/telemetry.openstack.org_autoscalings.yaml +++ b/config/crd/bases/telemetry.openstack.org_autoscalings.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: autoscalings.telemetry.openstack.org spec: diff --git a/config/crd/bases/telemetry.openstack.org_ceilometers.yaml b/config/crd/bases/telemetry.openstack.org_ceilometers.yaml index ec4eb3a2..5fd3df66 100644 --- a/config/crd/bases/telemetry.openstack.org_ceilometers.yaml +++ b/config/crd/bases/telemetry.openstack.org_ceilometers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: ceilometers.telemetry.openstack.org spec: diff --git a/config/crd/bases/telemetry.openstack.org_telemetries.yaml b/config/crd/bases/telemetry.openstack.org_telemetries.yaml index 7e1f482e..26dd48f5 100644 --- a/config/crd/bases/telemetry.openstack.org_telemetries.yaml +++ b/config/crd/bases/telemetry.openstack.org_telemetries.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.1 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: telemetries.telemetry.openstack.org spec: diff --git a/kuttl-test.yaml b/kuttl-test.yaml new file mode 100644 index 00000000..abdf84da --- /dev/null +++ b/kuttl-test.yaml @@ -0,0 +1,23 @@ +# +# EXECUTION (from install_yamls repo root): +# +# make telemetry_kuttl +# +# ASSUMPTIONS: +# +# 1. Latest version of kuttl is installed at /usr/local/bin/kubectl-kuttl +# - wget https://github.com/kudobuilder/kuttl/releases/download/v0.11.1/kubectl-kuttl_0.11.1_linux_x86_64 +# - mv kubectl-kuttl_0.11.1_linux_x86_64 /usr/local/bin/kubectl-kuttl +# - chmod 755 /usr/local/bin/kubectl-kuttl +# 2. An OCP 4.10+ CRC cluster with Podified Operators has been deployed +# 3. CLI user has access to $KUBECONFIG + +apiVersion: kuttl.dev/v1alpha1 +kind: TestSuite +reportFormat: JSON +reportName: kuttl-test-telemetry +namespace: telemetry-kuttl-tests +timeout: 180 +parallel: 1 +suppress: + - events # Remove spammy event logs diff --git a/tests/kuttl/suites/autoscaling/tests/00-deps.yaml b/tests/kuttl/suites/autoscaling/tests/00-deps.yaml new file mode 100644 index 00000000..08d6b4d6 --- /dev/null +++ b/tests/kuttl/suites/autoscaling/tests/00-deps.yaml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: | + oc apply -f ../deps/rhobs.yaml + until oc api-resources | grep -q rhobs; do sleep 1; done diff --git a/tests/kuttl/suites/autoscaling/tests/00-assert.yaml b/tests/kuttl/suites/autoscaling/tests/01-assert.yaml similarity index 100% rename from tests/kuttl/suites/autoscaling/tests/00-assert.yaml rename to tests/kuttl/suites/autoscaling/tests/01-assert.yaml diff --git a/tests/kuttl/suites/autoscaling/tests/00-deploy.yaml b/tests/kuttl/suites/autoscaling/tests/01-deploy.yaml similarity index 100% rename from tests/kuttl/suites/autoscaling/tests/00-deploy.yaml rename to tests/kuttl/suites/autoscaling/tests/01-deploy.yaml From 1bbc336580691770e87ca0839f19b93dc771ca32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=A1gr?= Date: Thu, 26 Oct 2023 14:47:03 +0200 Subject: [PATCH 2/7] Update telemetry.openstack.org_autoscalings.yaml --- api/bases/telemetry.openstack.org_autoscalings.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/bases/telemetry.openstack.org_autoscalings.yaml b/api/bases/telemetry.openstack.org_autoscalings.yaml index 8f9203c7..ab660871 100644 --- a/api/bases/telemetry.openstack.org_autoscalings.yaml +++ b/api/bases/telemetry.openstack.org_autoscalings.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 + controller-gen.kubebuilder.io/version: v0.11.1 creationTimestamp: null name: autoscalings.telemetry.openstack.org spec: From 18c26833721d326372c657357444355dd08865de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=A1gr?= Date: Thu, 26 Oct 2023 14:47:25 +0200 Subject: [PATCH 3/7] Update telemetry.openstack.org_ceilometers.yaml --- api/bases/telemetry.openstack.org_ceilometers.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/bases/telemetry.openstack.org_ceilometers.yaml b/api/bases/telemetry.openstack.org_ceilometers.yaml index 5fd3df66..ec4eb3a2 100644 --- a/api/bases/telemetry.openstack.org_ceilometers.yaml +++ b/api/bases/telemetry.openstack.org_ceilometers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 + controller-gen.kubebuilder.io/version: v0.11.1 creationTimestamp: null name: ceilometers.telemetry.openstack.org spec: From 9761761931178436c7ec88a8f8fbb204c45b0b7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=A1gr?= Date: Thu, 26 Oct 2023 14:47:48 +0200 Subject: [PATCH 4/7] Update telemetry.openstack.org_telemetries.yaml --- api/bases/telemetry.openstack.org_telemetries.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/bases/telemetry.openstack.org_telemetries.yaml b/api/bases/telemetry.openstack.org_telemetries.yaml index 26dd48f5..7e1f482e 100644 --- a/api/bases/telemetry.openstack.org_telemetries.yaml +++ b/api/bases/telemetry.openstack.org_telemetries.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 + controller-gen.kubebuilder.io/version: v0.11.1 creationTimestamp: null name: telemetries.telemetry.openstack.org spec: From bebc3af99b7048b990a37f3c843a57e4fe94211b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=A1gr?= Date: Thu, 26 Oct 2023 14:48:08 +0200 Subject: [PATCH 5/7] Update telemetry.openstack.org_autoscalings.yaml --- config/crd/bases/telemetry.openstack.org_autoscalings.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/crd/bases/telemetry.openstack.org_autoscalings.yaml b/config/crd/bases/telemetry.openstack.org_autoscalings.yaml index 8f9203c7..ab660871 100644 --- a/config/crd/bases/telemetry.openstack.org_autoscalings.yaml +++ b/config/crd/bases/telemetry.openstack.org_autoscalings.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 + controller-gen.kubebuilder.io/version: v0.11.1 creationTimestamp: null name: autoscalings.telemetry.openstack.org spec: From 66b57cb7b453611fa12d0a2bfa69b56324e4b95a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=A1gr?= Date: Thu, 26 Oct 2023 14:48:24 +0200 Subject: [PATCH 6/7] Update telemetry.openstack.org_ceilometers.yaml --- config/crd/bases/telemetry.openstack.org_ceilometers.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/crd/bases/telemetry.openstack.org_ceilometers.yaml b/config/crd/bases/telemetry.openstack.org_ceilometers.yaml index 5fd3df66..ec4eb3a2 100644 --- a/config/crd/bases/telemetry.openstack.org_ceilometers.yaml +++ b/config/crd/bases/telemetry.openstack.org_ceilometers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 + controller-gen.kubebuilder.io/version: v0.11.1 creationTimestamp: null name: ceilometers.telemetry.openstack.org spec: From ec09393228e71883a295f71b55b5298b4f0ffaa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=A1gr?= Date: Thu, 26 Oct 2023 14:48:38 +0200 Subject: [PATCH 7/7] Update telemetry.openstack.org_telemetries.yaml --- config/crd/bases/telemetry.openstack.org_telemetries.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/crd/bases/telemetry.openstack.org_telemetries.yaml b/config/crd/bases/telemetry.openstack.org_telemetries.yaml index 26dd48f5..7e1f482e 100644 --- a/config/crd/bases/telemetry.openstack.org_telemetries.yaml +++ b/config/crd/bases/telemetry.openstack.org_telemetries.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 + controller-gen.kubebuilder.io/version: v0.11.1 creationTimestamp: null name: telemetries.telemetry.openstack.org spec: