feat: add the corresponding unit-test to check PDB deployment with Keda
This commit is contained in:
parent
bddbd6a29f
commit
4ee58f7447
1 changed files with 22 additions and 0 deletions
22
charts/ingress-nginx/tests/controller-keda_pdb_test.yaml
Normal file
22
charts/ingress-nginx/tests/controller-keda_pdb_test.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
suite: Controller > Keda > PDB
|
||||
templates:
|
||||
- controller-poddisruptionbudget.yaml
|
||||
|
||||
tests:
|
||||
- it: should create a PodDisruptionBudget if `controller.kind` is "Deployment" and `controller.keda.enabled` is true
|
||||
set:
|
||||
controller.kind: Deployment
|
||||
controller.keda.enabled: true
|
||||
controller.keda.minReplicas: 2
|
||||
controller.minAvailable: 1
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: PodDisruptionBudget
|
||||
- equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-ingress-nginx-controller
|
||||
- equal:
|
||||
path: spec.minAvailable
|
||||
value: 1
|
Loading…
Reference in a new issue