mirror of https://git.rancher.io/charts
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
--- charts-original/templates/_helpers.tpl
|
|
+++ charts/templates/_helpers.tpl
|
|
@@ -40,12 +40,35 @@
|
|
{{- end }}
|
|
{{- end -}}
|
|
|
|
+{{- define "system_default_registry" -}}
|
|
+{{- if .Values.global.cattle.systemDefaultRegistry -}}
|
|
+{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}}
|
|
+{{- else -}}
|
|
+{{- "" -}}
|
|
+{{- end -}}
|
|
+{{- end -}}
|
|
+
|
|
+{{/*
|
|
+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
|
|
+{{- end -}}
|
|
+
|
|
{{/*
|
|
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 }}
|
|
args:
|
|
- "--retry"
|