-
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: Implement
controller.admissionWebhooks.service.servicePort
.
- Loading branch information
Showing
4 changed files
with
66 additions
and
1 deletion.
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
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
32 changes: 32 additions & 0 deletions
32
charts/ingress-nginx/tests/admission-webhooks/validating-webhook_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,32 @@ | ||
suite: Admission Webhooks > ValidatingWebhookConfiguration | ||
templates: | ||
- admission-webhooks/validating-webhook.yaml | ||
|
||
tests: | ||
- it: should not create a ValidatingWebhookConfiguration if `controller.admissionWebhooks.enabled` is false | ||
set: | ||
controller.admissionWebhooks.enabled: false | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
|
||
- it: should create a ValidatingWebhookConfiguration if `controller.admissionWebhooks.enabled` is true | ||
set: | ||
controller.admissionWebhooks.enabled: true | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: ValidatingWebhookConfiguration | ||
- equal: | ||
path: metadata.name | ||
value: RELEASE-NAME-admission | ||
|
||
- it: should create a ValidatingWebhookConfiguration with a custom port if `controller.admissionWebhooks.service.servicePort` is set | ||
set: | ||
controller.admissionWebhooks.enabled: true | ||
controller.admissionWebhooks.service.servicePort: 9443 | ||
asserts: | ||
- equal: | ||
path: webhooks[0].clientConfig.service.port | ||
value: 9443 |
32 changes: 32 additions & 0 deletions
32
charts/ingress-nginx/tests/controller-service-webhook_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,32 @@ | ||
suite: Controller > Service > Webhook | ||
templates: | ||
- controller-service-webhook.yaml | ||
|
||
tests: | ||
- it: should not create a webhook Service if `controller.admissionWebhooks.enabled` is false | ||
set: | ||
controller.admissionWebhooks.enabled: false | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
|
||
- it: should create a webhook Service if `controller.admissionWebhooks.enabled` is true | ||
set: | ||
controller.admissionWebhooks.enabled: true | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: Service | ||
- equal: | ||
path: metadata.name | ||
value: RELEASE-NAME-ingress-nginx-controller-admission | ||
|
||
- it: should create a webhook Service with a custom port if `controller.admissionWebhooks.service.servicePort` is set | ||
set: | ||
controller.admissionWebhooks.enabled: true | ||
controller.admissionWebhooks.service.servicePort: 9443 | ||
asserts: | ||
- equal: | ||
path: spec.ports[0].port | ||
value: 9443 |