-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename KUTTL tests dir to fix the tests on install_yamls
- Loading branch information
Mauricio Harley
committed
Dec 15, 2023
1 parent
3b1359a
commit f991053
Showing
12 changed files
with
253 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
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: | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../common/assert_sample_deployment.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
7 changes: 7 additions & 0 deletions
7
tests/kuttl/tests/barbican_scale/04-scale-down-zero-barbican.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
13 changes: 13 additions & 0 deletions
13
tests/kuttl/tests/barbican_scale/deploy/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |