From e949245ffe87ac5d18cd2177957d0dc2561c6ace Mon Sep 17 00:00:00 2001 From: Mauricio Harley Date: Wed, 25 Oct 2023 07:12:30 -0400 Subject: [PATCH 1/2] Add missing requeue and Owns --- kuttl-test.yaml | 4 +- .../common/assert_sample_deployment.yaml | 87 +++++++++++++++++++ .../kuttl/tests/barbican_scale/00-assert.yaml | 1 + .../barbican_scale/00-deploy-barbican.yaml | 6 ++ .../barbican_scale/05-cleanup-barbican.yaml | 6 ++ .../kuttl/tests/barbican_scale/05-errors.yaml | 17 ++++ .../deploy/barbican_v1beta1_barbican.yaml | 68 +++++++++++++++ .../barbican_scale/deploy/kustomization.yaml | 13 +++ 8 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 test/kuttl/common/assert_sample_deployment.yaml create mode 120000 test/kuttl/tests/barbican_scale/00-assert.yaml create mode 100644 test/kuttl/tests/barbican_scale/00-deploy-barbican.yaml create mode 100644 test/kuttl/tests/barbican_scale/05-cleanup-barbican.yaml create mode 100644 test/kuttl/tests/barbican_scale/05-errors.yaml create mode 100644 test/kuttl/tests/barbican_scale/deploy/barbican_v1beta1_barbican.yaml create mode 100644 test/kuttl/tests/barbican_scale/deploy/kustomization.yaml diff --git a/kuttl-test.yaml b/kuttl-test.yaml index 46c7616..3b60eb0 100644 --- a/kuttl-test.yaml +++ b/kuttl-test.yaml @@ -1,7 +1,7 @@ # # EXECUTION (from install_yamls repo root): # -# make barbican_kuttl +# make cinder_kuttl # # ASSUMPTIONS: # @@ -11,6 +11,8 @@ # - 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 +# 4. The environment variable INSTALL_YAMLS is set to the the path of the +# install_yamls repo apiVersion: kuttl.dev/v1beta1 kind: TestSuite diff --git a/test/kuttl/common/assert_sample_deployment.yaml b/test/kuttl/common/assert_sample_deployment.yaml new file mode 100644 index 0000000..c99b1bb --- /dev/null +++ b/test/kuttl/common/assert_sample_deployment.yaml @@ -0,0 +1,87 @@ +apiVersion: barbican.openstack.org/v1beta1 +kind: Barbican +metadata: + name: barbican +spec: + serviceUser: barbican + customServiceConfig: | + [DEFAULT] + debug = True + databaseInstance: openstack + databaseUser: barbican + rabbitMqClusterName: rabbitmq + barbicanAPI: + replicas: 1 + barbicanWorker: + replicas: 1 + barbicanKeystoneListener: + replicas: 1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/name: barbican + app.kubernetes.io/instance: barbican + app.kubernetes.io/part-of: barbican-operator + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: barbican-operator + name: barbican +spec: + serviceAccount: barbican + serviceUser: barbican + containerImage: quay.io/podified-antelope-centos9/openstack-barbican-api:current-podified + databaseInstance: openstack + databaseUser: barbican + rabbitMqCusterName: barbican_rabbit + secret: osp-secret + passwordSelectors: + database: BarbicanDatabasePassword + service: BarbicanPassword + debug: + dbInitContainer: false + dbSync: false + initContainer: false + service: false + preserveJobs: true + nodeSelector: + node: controller + customServiceConfig: | + [DEFAULT] + debug = True + defaultConfigOverwrite: + policy.json: | + {"some": "custom policy"} + barbicanAPI: + containerImage: quay.io/podified-antelope-centos9/openstack-barbican-api:current-podified + nodeSelector: + optional_override: here + customServiceConfig: | + [optional] + overrides = True + defautlConfigOverwrite: + optional_policy.json: | + {"some": "custom policy"} + passwordSelectors: + database: BarbicanDatabasePassword + service: BarbicanPassword + barbicanWorker: + containerImage: quay.io/podified-antelope-centos9/openstack-barbican-worker:current-podified + nodeSelector: + optional_override: here + customServiceConfig: | + [optional] + overrides = True + defautlConfigOverwrite: + optional_policy.json: | + {"some": "custom policy"} + barbicanKeystoneListener: + containerImage: quay.io/podified-antelope-centos9/openstack-barbican-keystone-listener:current-podified + nodeSelector: + optional_override: here + customServiceConfig: | + [optional] + overrides = True + defautlConfigOverwrite: + optional_policy.json: | + {"some": "custom policy"} diff --git a/test/kuttl/tests/barbican_scale/00-assert.yaml b/test/kuttl/tests/barbican_scale/00-assert.yaml new file mode 120000 index 0000000..461654e --- /dev/null +++ b/test/kuttl/tests/barbican_scale/00-assert.yaml @@ -0,0 +1 @@ +../../common/assert_sample_deployment.yaml \ No newline at end of file diff --git a/test/kuttl/tests/barbican_scale/00-deploy-barbican.yaml b/test/kuttl/tests/barbican_scale/00-deploy-barbican.yaml new file mode 100644 index 0000000..44dbf5c --- /dev/null +++ b/test/kuttl/tests/barbican_scale/00-deploy-barbican.yaml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: | + cp ../../../../config/samples/barbican_v1beta1_barbican.*yaml deploy + oc kustomize deploy | oc apply -n $NAMESPACE -f - diff --git a/test/kuttl/tests/barbican_scale/05-cleanup-barbican.yaml b/test/kuttl/tests/barbican_scale/05-cleanup-barbican.yaml new file mode 100644 index 0000000..7186f68 --- /dev/null +++ b/test/kuttl/tests/barbican_scale/05-cleanup-barbican.yaml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: | + oc kustomize deploy | oc delete -n $NAMESPACE -f - + rm deploy/barbican_v1beta1_barbican.yaml diff --git a/test/kuttl/tests/barbican_scale/05-errors.yaml b/test/kuttl/tests/barbican_scale/05-errors.yaml new file mode 100644 index 0000000..65c32b2 --- /dev/null +++ b/test/kuttl/tests/barbican_scale/05-errors.yaml @@ -0,0 +1,17 @@ +# +# Check for: +# +# No BarbicanAPI CR +# No Deployment for BarbicanAPI CR +# No Pods in barbican Deployment +# No Barbican Services +# +apiVersion: barbican.openstack.org/v1beta1 +kind: Barbican +metadata: + name: barbican +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican diff --git a/test/kuttl/tests/barbican_scale/deploy/barbican_v1beta1_barbican.yaml b/test/kuttl/tests/barbican_scale/deploy/barbican_v1beta1_barbican.yaml new file mode 100644 index 0000000..afcf71f --- /dev/null +++ b/test/kuttl/tests/barbican_scale/deploy/barbican_v1beta1_barbican.yaml @@ -0,0 +1,68 @@ +apiVersion: barbican.openstack.org/v1beta1 +kind: Barbican +metadata: + labels: + app.kubernetes.io/name: barbican + app.kubernetes.io/instance: barbican + app.kubernetes.io/part-of: barbican-operator + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: barbican-operator + name: barbican +spec: + serviceAccount: barbican + serviceUser: barbican + containerImage: quay.io/podified-antelope-centos9/openstack-barbican-api:current-podified + databaseInstance: openstack + databaseUser: barbican + rabbitMqCusterName: barbican_rabbit + secret: osp-secret + passwordSelectors: + database: BarbicanDatabasePassword + service: BarbicanPassword + debug: + dbInitContainer: false + dbSync: false + initContainer: false + service: false + preserveJobs: true + nodeSelector: + node: controller + customServiceConfig: | + [DEFAULT] + debug = True + defaultConfigOverwrite: + policy.json: | + {"some": "custom policy"} + barbicanAPI: + containerImage: quay.io/podified-antelope-centos9/openstack-barbican-api:current-podified + nodeSelector: + optional_override: here + customServiceConfig: | + [optional] + overrides = True + defautlConfigOverwrite: + optional_policy.json: | + {"some": "custom policy"} + passwordSelectors: + database: BarbicanDatabasePassword + service: BarbicanPassword + barbicanWorker: + containerImage: quay.io/podified-antelope-centos9/openstack-barbican-worker:current-podified + nodeSelector: + optional_override: here + customServiceConfig: | + [optional] + overrides = True + defautlConfigOverwrite: + optional_policy.json: | + {"some": "custom policy"} + barbicanKeystoneListener: + containerImage: quay.io/podified-antelope-centos9/openstack-barbican-keystone-listener:current-podified + nodeSelector: + optional_override: here + customServiceConfig: | + [optional] + overrides = True + defautlConfigOverwrite: + optional_policy.json: | + {"some": "custom policy"} diff --git a/test/kuttl/tests/barbican_scale/deploy/kustomization.yaml b/test/kuttl/tests/barbican_scale/deploy/kustomization.yaml new file mode 100644 index 0000000..3cd2f0e --- /dev/null +++ b/test/kuttl/tests/barbican_scale/deploy/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ./barbican_v1beta1_barbican.yaml +patches: +- patch: |- + - op: replace + path: /spec/secret + value: osp-secret + - op: replace + path: /metadata/namespace + target: + kind: Barbican From 434989f99790851de1d0c3bed3f114c88abee07b Mon Sep 17 00:00:00 2001 From: Mauricio Harley Date: Tue, 14 Nov 2023 08:11:55 -0500 Subject: [PATCH 2/2] Including KUTTL tests --- config/samples/barbican_v1beta1_barbican.yaml | 1 - kuttl-test.yaml | 4 +- .../common/assert_sample_deployment.yaml | 94 ++++++------------- .../{00-assert.yaml => 01-assert.yaml} | 0 ...-barbican.yaml => 01-deploy-barbican.yaml} | 0 .../kuttl/tests/barbican_scale/02-assert.yaml | 49 ++++++++++ .../barbican_scale/02-scale-barbican.yaml | 7 ++ .../kuttl/tests/barbican_scale/03-assert.yaml | 49 ++++++++++ .../03-scale-down-barbican.yaml | 7 ++ .../kuttl/tests/barbican_scale/04-assert.yaml | 40 ++++++++ .../04-scale-down-zero-barbican.yaml | 7 ++ .../deploy/barbican_v1beta1_barbican.yaml | 68 -------------- .../common/assert-sample-deployment.yaml | 66 ------------- .../01-assert-deploy-barbican.yaml | 1 - .../basic-deployment/01-deploy-barbican.yaml | 5 - 15 files changed, 190 insertions(+), 208 deletions(-) rename test/kuttl/tests/barbican_scale/{00-assert.yaml => 01-assert.yaml} (100%) rename test/kuttl/tests/barbican_scale/{00-deploy-barbican.yaml => 01-deploy-barbican.yaml} (100%) create mode 100644 test/kuttl/tests/barbican_scale/02-assert.yaml create mode 100644 test/kuttl/tests/barbican_scale/02-scale-barbican.yaml create mode 100644 test/kuttl/tests/barbican_scale/03-assert.yaml create mode 100644 test/kuttl/tests/barbican_scale/03-scale-down-barbican.yaml create mode 100644 test/kuttl/tests/barbican_scale/04-assert.yaml create mode 100644 test/kuttl/tests/barbican_scale/04-scale-down-zero-barbican.yaml delete mode 100644 test/kuttl/tests/barbican_scale/deploy/barbican_v1beta1_barbican.yaml delete mode 100644 tests/kuttl/common/assert-sample-deployment.yaml delete mode 120000 tests/kuttl/tests/basic-deployment/01-assert-deploy-barbican.yaml delete mode 100644 tests/kuttl/tests/basic-deployment/01-deploy-barbican.yaml diff --git a/config/samples/barbican_v1beta1_barbican.yaml b/config/samples/barbican_v1beta1_barbican.yaml index 78daa91..433da7c 100644 --- a/config/samples/barbican_v1beta1_barbican.yaml +++ b/config/samples/barbican_v1beta1_barbican.yaml @@ -54,7 +54,6 @@ spec: optional_policy.json: | {"some": "custom policy"} barbicanKeystoneListener: - containerImage: quay.io/podified-antelope-centos9/openstack-barbican-keystone-listener:current-podified nodeSelector: optional_override: here customServiceConfig: | diff --git a/kuttl-test.yaml b/kuttl-test.yaml index 3b60eb0..7f97fbd 100644 --- a/kuttl-test.yaml +++ b/kuttl-test.yaml @@ -1,7 +1,7 @@ # # EXECUTION (from install_yamls repo root): # -# make cinder_kuttl +# make barbican_kuttl # # ASSUMPTIONS: # @@ -18,7 +18,7 @@ apiVersion: kuttl.dev/v1beta1 kind: TestSuite reportFormat: JSON reportName: kuttl-test-barbican -namespace: barbican-kuttl-tests +namespace: barbican-kuttl-tests timeout: 180 parallel: 1 suppress: diff --git a/test/kuttl/common/assert_sample_deployment.yaml b/test/kuttl/common/assert_sample_deployment.yaml index c99b1bb..ad44acb 100644 --- a/test/kuttl/common/assert_sample_deployment.yaml +++ b/test/kuttl/common/assert_sample_deployment.yaml @@ -20,68 +20,32 @@ spec: apiVersion: apps/v1 kind: Deployment metadata: - labels: - app.kubernetes.io/name: barbican - app.kubernetes.io/instance: barbican - app.kubernetes.io/part-of: barbican-operator - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: barbican-operator - name: barbican -spec: - serviceAccount: barbican - serviceUser: barbican - containerImage: quay.io/podified-antelope-centos9/openstack-barbican-api:current-podified - databaseInstance: openstack - databaseUser: barbican - rabbitMqCusterName: barbican_rabbit - secret: osp-secret - passwordSelectors: - database: BarbicanDatabasePassword - service: BarbicanPassword - debug: - dbInitContainer: false - dbSync: false - initContainer: false - service: false - preserveJobs: true - nodeSelector: - node: controller - customServiceConfig: | - [DEFAULT] - debug = True - defaultConfigOverwrite: - policy.json: | - {"some": "custom policy"} - barbicanAPI: - containerImage: quay.io/podified-antelope-centos9/openstack-barbican-api:current-podified - nodeSelector: - optional_override: here - customServiceConfig: | - [optional] - overrides = True - defautlConfigOverwrite: - optional_policy.json: | - {"some": "custom policy"} - passwordSelectors: - database: BarbicanDatabasePassword - service: BarbicanPassword - barbicanWorker: - containerImage: quay.io/podified-antelope-centos9/openstack-barbican-worker:current-podified - nodeSelector: - optional_override: here - customServiceConfig: | - [optional] - overrides = True - defautlConfigOverwrite: - optional_policy.json: | - {"some": "custom policy"} - barbicanKeystoneListener: - containerImage: quay.io/podified-antelope-centos9/openstack-barbican-keystone-listener:current-podified - nodeSelector: - optional_override: here - customServiceConfig: | - [optional] - overrides = True - defautlConfigOverwrite: - optional_policy.json: | - {"some": "custom policy"} + name: barbican-api-api + ownerReferences: + - apiVersion: barbican.openstack.org/v1beta1 + blockOwnerDeletion: true + controller: true + kind: BarbicanAPI + name: barbican-api +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican-keystone-listener-keystone-listener + ownerReferences: + - apiVersion: barbican.openstack.org/v1beta1 + blockOwnerDeletion: true + controller: true + kind: BarbicanKeystoneListener + name: barbican-keystone-listener +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican-worker-worker + ownerReferences: + - apiVersion: barbican.openstack.org/v1beta1 + blockOwnerDeletion: true + controller: true + kind: BarbicanWorker + name: barbican-worker diff --git a/test/kuttl/tests/barbican_scale/00-assert.yaml b/test/kuttl/tests/barbican_scale/01-assert.yaml similarity index 100% rename from test/kuttl/tests/barbican_scale/00-assert.yaml rename to test/kuttl/tests/barbican_scale/01-assert.yaml diff --git a/test/kuttl/tests/barbican_scale/00-deploy-barbican.yaml b/test/kuttl/tests/barbican_scale/01-deploy-barbican.yaml similarity index 100% rename from test/kuttl/tests/barbican_scale/00-deploy-barbican.yaml rename to test/kuttl/tests/barbican_scale/01-deploy-barbican.yaml diff --git a/test/kuttl/tests/barbican_scale/02-assert.yaml b/test/kuttl/tests/barbican_scale/02-assert.yaml new file mode 100644 index 0000000..72108fd --- /dev/null +++ b/test/kuttl/tests/barbican_scale/02-assert.yaml @@ -0,0 +1,49 @@ +# +# Check for: +# - Barbican CRs with 2 replicas for each one +# - BarbicanAPI barbican-api Deployment with 2 replicas +# - BarbicanKeystoneListener barbican-keystone-listener Deployment with 2 replicas +# - BarbicanWorker barbican-worker Deployment with 2 replicas + + +apiVersion: barbican.openstack.org/v1beta1 +kind: Barbican +metadata: + name: barbican +spec: + barbicanAPI: + replicas: 2 + barbicanKeystoneListener: + replicas: 2 + barbicanWorker: + replicas: 2 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican-api-api +spec: + replicas: 2 +status: + availableReplicas: 2 + replicas: 2 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican-keystone-listener-keystone-listener +spec: + replicas: 2 +status: + availableReplicas: 2 + replicas: 2 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican-worker-worker +spec: + replicas: 2 +status: + availableReplicas: 2 + replicas: 2 diff --git a/test/kuttl/tests/barbican_scale/02-scale-barbican.yaml b/test/kuttl/tests/barbican_scale/02-scale-barbican.yaml new file mode 100644 index 0000000..5297c65 --- /dev/null +++ b/test/kuttl/tests/barbican_scale/02-scale-barbican.yaml @@ -0,0 +1,7 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: | + oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanAPI/replicas", "value":2}]' + oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanKeystoneListener/replicas", "value":2}]' + oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanWorker/replicas", "value":2}]' diff --git a/test/kuttl/tests/barbican_scale/03-assert.yaml b/test/kuttl/tests/barbican_scale/03-assert.yaml new file mode 100644 index 0000000..b1ddd67 --- /dev/null +++ b/test/kuttl/tests/barbican_scale/03-assert.yaml @@ -0,0 +1,49 @@ +# +# Check for: +# - Barbican CRs with12 replicas for each one +# - BarbicanAPI barbican-api Deployment with 1 replica +# - BarbicanKeystoneListener barbican-keystone-listener Deployment with 1 replica +# - BarbicanWorker barbican-worker Deployment with 1 replica + + +apiVersion: barbican.openstack.org/v1beta1 +kind: Barbican +metadata: + name: barbican +spec: + barbicanAPI: + replicas: 1 + barbicanKeystoneListener: + replicas: 1 + barbicanWorker: + replicas: 1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican-api-api +spec: + replicas: 1 +status: + availableReplicas: 1 + replicas: 1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican-keystone-listener-keystone-listener +spec: + replicas: 1 +status: + availableReplicas: 1 + replicas: 1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican-worker-worker +spec: + replicas: 1 +status: + availableReplicas: 1 + replicas: 1 diff --git a/test/kuttl/tests/barbican_scale/03-scale-down-barbican.yaml b/test/kuttl/tests/barbican_scale/03-scale-down-barbican.yaml new file mode 100644 index 0000000..92715c2 --- /dev/null +++ b/test/kuttl/tests/barbican_scale/03-scale-down-barbican.yaml @@ -0,0 +1,7 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: | + oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanAPI/replicas", "value":1}]' + oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanKeystoneListener/replicas", "value":1}]' + oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanWorker/replicas", "value":1}]' diff --git a/test/kuttl/tests/barbican_scale/04-assert.yaml b/test/kuttl/tests/barbican_scale/04-assert.yaml new file mode 100644 index 0000000..06aa897 --- /dev/null +++ b/test/kuttl/tests/barbican_scale/04-assert.yaml @@ -0,0 +1,40 @@ +# +# Check for: +# - Barbican CRs with 0 replicas for each one +# - BarbicanAPI barbican-api Deployment with 0 replicas +# - BarbicanKeystoneListener barbican-keystone-listener Deployment with 0 replicas +# - BarbicanWorker barbican-worker Deployment with 0 replicas + + +apiVersion: barbican.openstack.org/v1beta1 +kind: Barbican +metadata: + name: barbican +spec: + barbicanAPI: + replicas: 0 + barbicanKeystoneListener: + replicas: 0 + barbicanWorker: + replicas: 0 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican-api-api +spec: + replicas: 0 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican-keystone-listener-keystone-listener +spec: + replicas: 0 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: barbican-worker-worker +spec: + replicas: 0 diff --git a/test/kuttl/tests/barbican_scale/04-scale-down-zero-barbican.yaml b/test/kuttl/tests/barbican_scale/04-scale-down-zero-barbican.yaml new file mode 100644 index 0000000..6377712 --- /dev/null +++ b/test/kuttl/tests/barbican_scale/04-scale-down-zero-barbican.yaml @@ -0,0 +1,7 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: | + oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanAPI/replicas", "value":0}]' + oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanKeystoneListener/replicas", "value":0}]' + oc patch Barbican -n $NAMESPACE barbican --type='json' -p='[{"op": "replace", "path": "/spec/barbicanWorker/replicas", "value":0}]' diff --git a/test/kuttl/tests/barbican_scale/deploy/barbican_v1beta1_barbican.yaml b/test/kuttl/tests/barbican_scale/deploy/barbican_v1beta1_barbican.yaml deleted file mode 100644 index afcf71f..0000000 --- a/test/kuttl/tests/barbican_scale/deploy/barbican_v1beta1_barbican.yaml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: barbican.openstack.org/v1beta1 -kind: Barbican -metadata: - labels: - app.kubernetes.io/name: barbican - app.kubernetes.io/instance: barbican - app.kubernetes.io/part-of: barbican-operator - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: barbican-operator - name: barbican -spec: - serviceAccount: barbican - serviceUser: barbican - containerImage: quay.io/podified-antelope-centos9/openstack-barbican-api:current-podified - databaseInstance: openstack - databaseUser: barbican - rabbitMqCusterName: barbican_rabbit - secret: osp-secret - passwordSelectors: - database: BarbicanDatabasePassword - service: BarbicanPassword - debug: - dbInitContainer: false - dbSync: false - initContainer: false - service: false - preserveJobs: true - nodeSelector: - node: controller - customServiceConfig: | - [DEFAULT] - debug = True - defaultConfigOverwrite: - policy.json: | - {"some": "custom policy"} - barbicanAPI: - containerImage: quay.io/podified-antelope-centos9/openstack-barbican-api:current-podified - nodeSelector: - optional_override: here - customServiceConfig: | - [optional] - overrides = True - defautlConfigOverwrite: - optional_policy.json: | - {"some": "custom policy"} - passwordSelectors: - database: BarbicanDatabasePassword - service: BarbicanPassword - barbicanWorker: - containerImage: quay.io/podified-antelope-centos9/openstack-barbican-worker:current-podified - nodeSelector: - optional_override: here - customServiceConfig: | - [optional] - overrides = True - defautlConfigOverwrite: - optional_policy.json: | - {"some": "custom policy"} - barbicanKeystoneListener: - containerImage: quay.io/podified-antelope-centos9/openstack-barbican-keystone-listener:current-podified - nodeSelector: - optional_override: here - customServiceConfig: | - [optional] - overrides = True - defautlConfigOverwrite: - optional_policy.json: | - {"some": "custom policy"} diff --git a/tests/kuttl/common/assert-sample-deployment.yaml b/tests/kuttl/common/assert-sample-deployment.yaml deleted file mode 100644 index d7c9c1c..0000000 --- a/tests/kuttl/common/assert-sample-deployment.yaml +++ /dev/null @@ -1,66 +0,0 @@ -apiVersion: barbican.openstack.org/v1beta1 -kind: Barbican -metadata: - labels: - app.kubernetes.io/name: barbican - app.kubernetes.io/instance: barbican-sample - app.kubernetes.io/part-of: barbican-operator - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: barbican-operator - name: barbican-sample -spec: - serviceUser: barbican - databaseInstance: some_string - databaseUser: barbican - rabbitMqCusterName: barbican_rabbit - secret: barbican-secret - passwordSelectors: - database: BarbicanDatabasePassword - service: BarbicanPassword - debug: - dbInitContainer: true - dbSync: true - initContainer: true - service: true - preserveJobs: true - nodeSelector: - node: controller - customServiceConfig: | - [DEFAULT] - debug = True - defaultConfigOverwrite: - policy.json: | - {"some": "custom policy"} - barbicanAPI: - containerImage: some_image - nodeSelector: - optional_override: here - replicas: 10 - customServiceConfig: | - [optional] - overrides = True - defautlConfigOverwrite: - optional_policy.json: | - {"some": "custom policy"} - networkAttachments: - - internal - externalEndpoints: - - endpoint: - ipAddressPool: some_ip_string - sharedIP: true - sharedIPKey: some_key_string - loadBalancerIPs: - - some_ip_string - barbicanWorker: - containerImage: some_image - nodeSelector: - optional_override: here - replicas: 10 - customServiceConfig: | - [optional] - overrides = True - defautlConfigOverwrite: - optional_policy.json: | - {"some": "custom policy"} - networkAttachments: - - internal diff --git a/tests/kuttl/tests/basic-deployment/01-assert-deploy-barbican.yaml b/tests/kuttl/tests/basic-deployment/01-assert-deploy-barbican.yaml deleted file mode 120000 index 762a8cf..0000000 --- a/tests/kuttl/tests/basic-deployment/01-assert-deploy-barbican.yaml +++ /dev/null @@ -1 +0,0 @@ -../../common/assert-sample-deployment.yaml \ No newline at end of file diff --git a/tests/kuttl/tests/basic-deployment/01-deploy-barbican.yaml b/tests/kuttl/tests/basic-deployment/01-deploy-barbican.yaml deleted file mode 100644 index 3202c06..0000000 --- a/tests/kuttl/tests/basic-deployment/01-deploy-barbican.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: | - oc apply -n $NAMESPACE -f ../../../../config/samples/barbican_v1beta1_barbican.yaml