2022-11-14 10:19:37 +00:00
|
|
|
--- charts-original/templates/_helpers.tpl
|
|
|
|
+++ charts/templates/_helpers.tpl
|
2023-05-25 12:30:56 +00:00
|
|
|
@@ -74,3 +74,33 @@
|
2022-11-14 10:19:37 +00:00
|
|
|
{{- default "default" .Values.configSecret.name }}
|
|
|
|
{{- 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" -}}
|
|
|
|
+{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
|
|
+beta.kubernetes.io/os: linux
|
|
|
|
+{{- else -}}
|
|
|
|
+kubernetes.io/os: linux
|
|
|
|
+{{- end -}}
|
|
|
|
+{{- end -}}
|
|
|
|
+
|
|
|
|
+{{/*
|
|
|
|
+URL prefix for container images to be compatible with Rancher
|
|
|
|
+*/}}
|
|
|
|
+{{- define "registry-url" -}}
|
|
|
|
+{{- if .Values.global.cattle.systemDefaultRegistry -}}
|
|
|
|
+{{ trimSuffix "/" .Values.global.cattle.systemDefaultRegistry }}/
|
|
|
|
+{{- else -}}
|
|
|
|
+{{ .Values.operator.registry }}/
|
|
|
|
+{{- end -}}
|
|
|
|
+{{- end -}}
|