Force caBundle to always be quoted (#352)
This fixes issues when you do not provide a value for caBundle that causes validation issues.
This commit is contained in:
parent
3e463a4bbe
commit
70cfec3fc8
2 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ webhooks:
|
|||
name: {{ template "vault.fullname" . }}-agent-injector-svc
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: "/mutate"
|
||||
caBundle: {{ .Values.injector.certs.caBundle }}
|
||||
caBundle: {{ .Values.injector.certs.caBundle | quote }}
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: [""]
|
||||
|
|
|
@ -42,7 +42,7 @@ load _helpers
|
|||
[ "${actual}" = "\"foo\"" ]
|
||||
}
|
||||
|
||||
@test "injector/MutatingWebhookConfiguration: caBundle is empty" {
|
||||
@test "injector/MutatingWebhookConfiguration: caBundle is empty string" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
--show-only templates/injector-mutating-webhook.yaml \
|
||||
|
@ -50,7 +50,7 @@ load _helpers
|
|||
--namespace foo \
|
||||
. | tee /dev/stderr |
|
||||
yq '.webhooks[0].clientConfig.caBundle' | tee /dev/stderr)
|
||||
[ "${actual}" = "null" ]
|
||||
[ "${actual}" = "\"\"" ]
|
||||
}
|
||||
|
||||
@test "injector/MutatingWebhookConfiguration: namespaceSelector empty by default" {
|
||||
|
|
Loading…
Reference in a new issue