BotDiscord/chart/templates/_helpers.tpl
2024-06-28 01:12:45 +02:00

14 lines
393 B
Smarty

{{/* Generate object name */}}
{{- define "mychart.name" }}
{{- regexMatch "^v[0-9]+\\.[0-9]+\\.[0-9]+$" .Values.image.tag | ternary "prod" (regexReplaceAll "\\W+" .Values.image.tag "_") -}}
{{- end }}
{{/* Generate labels */}}
{{- define "mychart.labels" -}}
{{- with .Values.labels }}
{{- range $key, $value := . }}
{{ $key }}: {{ tpl $value $ | quote }}
{{- end }}
{{- end }}
{{- end }}