Chart: Implement controller.admissionWebhooks.service.servicePort. (#11934)

Co-authored-by: Ramiro Algozino <ramiro@sighup.io>
This commit is contained in:
k8s-infra-cherrypick-robot 2024-09-04 15:38:37 -07:00 committed by GitHub
parent e035493b9c
commit 889afa9abd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 66 additions and 1 deletions

View file

@ -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