mirror of https://git.rancher.io/charts
50 lines
1.4 KiB
Smarty
50 lines
1.4 KiB
Smarty
{{/* vim: set filetype=mustache: */}}
|
|
{{/*
|
|
Expand the name of the chart.
|
|
*/}}
|
|
{{- define "externalip-webhook.name" -}}
|
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create a default fully qualified app name.
|
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
|
*/}}
|
|
{{- define "externalip-webhook.fullname" -}}
|
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
|
{{- if ne $name .Release.Name -}}
|
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
|
{{- else -}}
|
|
{{- printf "%s" $name | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/* Generate basic labels */}}
|
|
{{- define "externalip-webhook.labels" }}
|
|
app: {{ template "externalip-webhook.name" . }}
|
|
heritage: {{.Release.Service }}
|
|
release: {{.Release.Name }}
|
|
{{- 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 -}}
|
|
|
|
{{- define "system_default_registry" -}}
|
|
{{- if .Values.global.systemDefaultRegistry -}}
|
|
{{- printf "%s/" .Values.global.systemDefaultRegistry -}}
|
|
{{- else -}}
|
|
{{- "" -}}
|
|
{{- end -}}
|
|
{{- end -}} |