Add empty caBundle field to webhooks on Kubernetes 1.12 and below

Signed-off-by: James Munnelly <james@munnelly.eu>
This commit is contained in:
James Munnelly 2020-03-06 15:31:52 +00:00
parent 71006abfce
commit 42b2dfd5ce
2 changed files with 10 additions and 0 deletions

View File

@ -27,6 +27,11 @@ webhooks:
failurePolicy: Fail
sideEffects: None
clientConfig:
{{- if (semverCompare "<=1.12-0" .Capabilities.KubeVersion.GitVersion) }}
# Set caBundle to empty to avoid https://github.com/kubernetes/kubernetes/pull/70138
# in Kubernetes 1.12 and below.
caBundle: ""
{{- end }}
service:
name: {{ .Values.webhook.serviceName }}
namespace: {{ .Release.Namespace | quote }}

View File

@ -37,6 +37,11 @@ webhooks:
failurePolicy: Fail
sideEffects: None
clientConfig:
{{- if (semverCompare "<=1.12-0" .Capabilities.KubeVersion.GitVersion) }}
# Set caBundle to empty to avoid https://github.com/kubernetes/kubernetes/pull/70138
# in Kubernetes 1.12 and below.
caBundle: ""
{{- end }}
service:
name: {{ .Values.webhook.serviceName }}
namespace: {{ .Release.Namespace | quote }}