Skip to content

Commit

Permalink
feat: add the corresponding unit-test to check PDB deployment with Keda
Browse files Browse the repository at this point in the history
  • Loading branch information
StuxxNet committed Feb 27, 2024
1 parent 29c4237 commit 5f194a7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions charts/ingress-nginx/tests/controller-keda_pdb_test.yaml
@@ -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

0 comments on commit 5f194a7

Please sign in to comment.