mirror of https://git.rancher.io/charts
47 lines
1.7 KiB
YAML
47 lines
1.7 KiB
YAML
{{- if not .Values.disableValidatingWebhook }}
|
|
{{- if and (not .Values.postInstall.labelNamespace.enabled) .Values.postInstall.probeWebhook.enabled }}
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: gatekeeper-probe-webhook-post-install
|
|
labels:
|
|
app: '{{ template "gatekeeper.name" . }}'
|
|
chart: '{{ template "gatekeeper.name" . }}'
|
|
gatekeeper.sh/system: "yes"
|
|
heritage: '{{ .Release.Service }}'
|
|
release: '{{ .Release.Name }}'
|
|
annotations:
|
|
"helm.sh/hook": post-install
|
|
"helm.sh/hook-weight": "-5"
|
|
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
|
|
spec:
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
{{- toYaml .Values.podAnnotations | trim | nindent 8 }}
|
|
labels:
|
|
{{- include "gatekeeper.podLabels" . }}
|
|
app: '{{ template "gatekeeper.name" . }}'
|
|
chart: '{{ template "gatekeeper.name" . }}'
|
|
gatekeeper.sh/system: "yes"
|
|
heritage: '{{ .Release.Service }}'
|
|
release: '{{ .Release.Name }}'
|
|
spec:
|
|
restartPolicy: Never
|
|
{{- if .Values.postInstall.probeWebhook.image.pullSecrets }}
|
|
imagePullSecrets:
|
|
{{- .Values.postInstall.probeWebhook.image.pullSecrets | toYaml | nindent 12 }}
|
|
{{- end }}
|
|
volumes:
|
|
{{- include "gatekeeper.postInstallWebhookProbeVolume" . | nindent 8 }}
|
|
containers:
|
|
{{- include "gatekeeper.postInstallWebhookProbeContainer" . | nindent 8 }}
|
|
{{- with .Values.postInstall }}
|
|
nodeSelector: {{ include "linux-node-selector" . | nindent 8 }}
|
|
tolerations: {{ include "linux-node-tolerations" . | nindent 8 }}
|
|
affinity:
|
|
{{- toYaml .affinity | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|