35 lines
1.2 KiB
YAML
35 lines
1.2 KiB
YAML
suite: Admission Webhooks > CertManager
|
|
templates:
|
|
- admission-webhooks/cert-manager.yaml
|
|
|
|
tests:
|
|
- it: should not create a Certificate if `controller.admissionWebhooks.certManager.enabled` is false
|
|
set:
|
|
controller.admissionWebhooks.certManager.enabled: false
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|
|
|
|
- it: should create a Certificate if `controller.admissionWebhooks.certManager.enabled` is true
|
|
set:
|
|
controller.admissionWebhooks.certManager.enabled: true
|
|
controller.admissionWebhooks.certManager.issuerRef: ingress-nginx-issuer
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 1
|
|
- isKind:
|
|
of: Certificate
|
|
- equal:
|
|
path: metadata.name
|
|
value: RELEASE-NAME-ingress-nginx-admission
|
|
|
|
- it: should create a Certificate with `revisionHistoryLimit` if `controller.admissionWebhooks.certManager.admissionCert.revisionHistoryLimit` is set
|
|
set:
|
|
controller.admissionWebhooks.certManager.enabled: true
|
|
controller.admissionWebhooks.certManager.issuerRef: ingress-nginx-issuer
|
|
controller.admissionWebhooks.certManager.admissionCert.revisionHistoryLimit: 3
|
|
asserts:
|
|
- equal:
|
|
path: spec.revisionHistoryLimit
|
|
value: 3
|