2021-05-17 22:30:18 +00:00
|
|
|
--- charts-original/templates/_helpers.tpl
|
|
|
|
+++ charts/templates/_helpers.tpl
|
2022-08-22 07:07:17 +00:00
|
|
|
@@ -40,12 +40,35 @@
|
2021-05-17 22:30:18 +00:00
|
|
|
{{- end }}
|
2022-08-22 07:07:17 +00:00
|
|
|
{{- end -}}
|
|
|
|
|
2021-05-17 22:30:18 +00:00
|
|
|
+{{- define "system_default_registry" -}}
|
|
|
|
+{{- if .Values.global.cattle.systemDefaultRegistry -}}
|
|
|
|
+{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}}
|
|
|
|
+{{- else -}}
|
|
|
|
+{{- "" -}}
|
|
|
|
+{{- end -}}
|
|
|
|
+{{- end -}}
|
2022-04-26 20:01:45 +00:00
|
|
|
+
|
2023-04-25 21:55:02 +00:00
|
|
|
+{{/*
|
2022-04-26 20:01:45 +00:00
|
|
|
+Windows cluster will add default taint for linux nodes,
|
|
|
|
+add below linux tolerations to workloads could be scheduled to those linux nodes
|
|
|
|
+*/}}
|
|
|
|
+{{- define "linux-node-tolerations" -}}
|
|
|
|
+- key: "cattle.io/os"
|
|
|
|
+ value: "linux"
|
|
|
|
+ effect: "NoSchedule"
|
|
|
|
+ operator: "Equal"
|
|
|
|
+{{- end -}}
|
|
|
|
+
|
|
|
|
+{{- define "linux-node-selector" -}}
|
|
|
|
+kubernetes.io/os: linux
|
2022-08-22 07:07:17 +00:00
|
|
|
+{{- end -}}
|
|
|
|
+
|
2023-04-25 21:55:02 +00:00
|
|
|
{{/*
|
2022-08-22 07:07:17 +00:00
|
|
|
Output post install webhook probe container entry
|
|
|
|
*/}}
|
|
|
|
{{- define "gatekeeper.postInstallWebhookProbeContainer" -}}
|
|
|
|
- name: webhook-probe-post
|
|
|
|
- image: "{{ .Values.postInstall.probeWebhook.image.repository }}:{{ .Values.postInstall.probeWebhook.image.tag }}"
|
|
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.postInstall.probeWebhook.image.repository }}:{{ .Values.postInstall.probeWebhook.image.tag }}"
|
|
|
|
imagePullPolicy: {{ .Values.postInstall.probeWebhook.image.pullPolicy }}
|
2023-04-25 21:55:02 +00:00
|
|
|
command:
|
2022-11-18 05:40:28 +00:00
|
|
|
- "curl"
|
2023-04-25 21:55:02 +00:00
|
|
|
@@ -69,10 +92,10 @@
|
2023-01-27 13:28:04 +00:00
|
|
|
resources:
|
|
|
|
{{- toYaml .Values.postInstall.resources | nindent 4 }}
|
|
|
|
securityContext:
|
2023-04-25 21:55:02 +00:00
|
|
|
- {{- if .Values.enableRuntimeDefaultSeccompProfile }}
|
2023-01-27 13:28:04 +00:00
|
|
|
+ {{- if .Values.enableRuntimeDefaultSeccompProfile }}
|
2023-04-25 21:55:02 +00:00
|
|
|
seccompProfile:
|
|
|
|
type: RuntimeDefault
|
|
|
|
- {{- end }}
|
2023-01-27 13:28:04 +00:00
|
|
|
+ {{- end }}
|
|
|
|
{{- toYaml .Values.postInstall.securityContext | nindent 4 }}
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /certs
|