| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- suite: test webhook serviceaccount and secret
- templates:
- - webhook-serviceaccount.yaml
- tests:
- - it: should create ServiceAccount when webhook.create and webhook.serviceAccount.create are true
- set:
- webhook.create: true
- webhook.serviceAccount.create: true
- asserts:
- - containsDocument:
- apiVersion: v1
- kind: ServiceAccount
- - it: should create Secret and ServiceAccount when webhook.metrics.listen.auth.enabled webhook.create and webhook.serviceAccount.create set to true
- set:
- webhook.metrics.listen.auth.enabled: true
- webhook.create: true
- webhook.serviceAccount.create: true
- asserts:
- - hasDocuments:
- count: 2
- - it: should not create Secret when webhook.metrics.listen.auth.enabled is false
- set:
- webhook.metrics.listen.auth.enabled: false
- webhook.create: true
- webhook.serviceAccount.create: true
- asserts:
- - hasDocuments:
- count: 1
- - it: should not create Secret and ServiceAccount when webhook.create is false
- set:
- webhook.metrics.listen.auth.enabled: true
- webhook.create: false
- webhook.serviceAccount.create: true
- asserts:
- - hasDocuments:
- count: 0
- - it: should not create Secret and ServiceAccount when webhook.serviceAccount.create is false
- set:
- webhook.metrics.listen.auth.enabled: true
- webhook.create: true
- webhook.serviceAccount.create: false
- asserts:
- - hasDocuments:
- count: 0
- - it: should not create Secret and ServiceAccount when webhook.metrics.listen.auth.enabled webhook.serviceAccount.create webhook.create are false
- set:
- webhook.metrics.listen.auth.enabled: false
- webhook.create: false
- webhook.serviceAccount.create: false
- asserts:
- - hasDocuments:
- count: 0
|