-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chart: Align default backend
PodDisruptionBudget
.
- Loading branch information
Showing
4 changed files
with
55 additions
and
2 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
6 changes: 5 additions & 1 deletion
6
charts/ingress-nginx/templates/default-backend-poddisruptionbudget.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
48 changes: 48 additions & 0 deletions
48
charts/ingress-nginx/tests/default-backend-poddisruptionbudget_test.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,48 @@ | ||
suite: Default Backend > PodDisruptionBudget | ||
templates: | ||
- default-backend-poddisruptionbudget.yaml | ||
|
||
tests: | ||
- it: should create a PodDisruptionBudget if `defaultBackend.replicaCount` is greater than 1 | ||
set: | ||
defaultBackend.enabled: true | ||
defaultBackend.replicaCount: 2 | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: PodDisruptionBudget | ||
- equal: | ||
path: metadata.name | ||
value: RELEASE-NAME-ingress-nginx-defaultbackend | ||
|
||
- it: should not create a PodDisruptionBudget if `defaultBackend.replicaCount` is less than or equal 1 | ||
set: | ||
defaultBackend.enabled: true | ||
defaultBackend.replicaCount: 1 | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
|
||
- it: should create a PodDisruptionBudget if `defaultBackend.autoscaling.enabled` is true and `defaultBackend.autoscaling.minReplicas` is greater than 1 | ||
set: | ||
defaultBackend.enabled: true | ||
defaultBackend.autoscaling.enabled: true | ||
defaultBackend.autoscaling.minReplicas: 2 | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: PodDisruptionBudget | ||
- equal: | ||
path: metadata.name | ||
value: RELEASE-NAME-ingress-nginx-defaultbackend | ||
|
||
- it: should not create a PodDisruptionBudget if `defaultBackend.autoscaling.enabled` is true and `defaultBackend.autoscaling.minReplicas` is less than or equal 1 | ||
set: | ||
defaultBackend.enabled: true | ||
defaultBackend.autoscaling.enabled: true | ||
defaultBackend.autoscaling.minReplicas: 1 | ||
asserts: | ||
- hasDocuments: | ||
count: 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