Skip to content

Commit

Permalink
Add missing requeue and Owns
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauricio Harley authored and dmendiza committed Dec 7, 2023
1 parent 96ca1e0 commit bc0b60e
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kuttl-test.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# EXECUTION (from install_yamls repo root):
#
# make barbican_kuttl
# make cinder_kuttl
#
# ASSUMPTIONS:
#
Expand All @@ -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
Expand Down
87 changes: 87 additions & 0 deletions test/kuttl/common/assert_sample_deployment.yaml
Original file line number Diff line number Diff line change
@@ -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"}
1 change: 1 addition & 0 deletions test/kuttl/tests/barbican_scale/00-assert.yaml
6 changes: 6 additions & 0 deletions test/kuttl/tests/barbican_scale/00-deploy-barbican.yaml
Original file line number Diff line number Diff line change
@@ -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 -
6 changes: 6 additions & 0 deletions test/kuttl/tests/barbican_scale/05-cleanup-barbican.yaml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions test/kuttl/tests/barbican_scale/05-errors.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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"}
13 changes: 13 additions & 0 deletions test/kuttl/tests/barbican_scale/deploy/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit bc0b60e

Please sign in to comment.