rancher-charts/packages/rancher-gatekeeper/generated-changes/patch/templates/_helpers.tpl.patch

53 lines
1.6 KiB
Diff
Raw Normal View History

--- charts-original/templates/_helpers.tpl
+++ charts/templates/_helpers.tpl
2022-08-22 07:07:17 +00:00
@@ -40,12 +40,35 @@
{{- end }}
2022-08-22 07:07:17 +00:00
{{- end -}}
+{{- define "system_default_registry" -}}
+{{- if .Values.global.cattle.systemDefaultRegistry -}}
+{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}}
+{{- else -}}
+{{- "" -}}
+{{- end -}}
+{{- end -}}
+
2023-05-16 20:24:02 +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-05-16 20:24: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 @@
resources:
{{- toYaml .Values.postInstall.resources | nindent 4 }}
securityContext:
2023-04-25 21:55:02 +00:00
- {{- if .Values.enableRuntimeDefaultSeccompProfile }}
+ {{- if .Values.enableRuntimeDefaultSeccompProfile }}
2023-04-25 21:55:02 +00:00
seccompProfile:
type: RuntimeDefault
- {{- end }}
+ {{- end }}
{{- toYaml .Values.postInstall.securityContext | nindent 4 }}
volumeMounts:
- mountPath: /certs