mirror of https://git.rancher.io/charts
32 lines
905 B
Smarty
32 lines
905 B
Smarty
{{- define "system_default_registry" -}}
|
|
{{- if .Values.global.cattle.systemDefaultRegistry -}}
|
|
{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}}
|
|
{{- else -}}
|
|
{{- "" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- define "applyVersionOverrides" -}}
|
|
{{- $overrides := dict -}}
|
|
{{- range $override := .Values.versionOverrides -}}
|
|
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
|
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- $_ := mergeOverwrite .Values $overrides -}}
|
|
{{- 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 -}} |