Files
iAOP/deploy/k8s/helm/iaop/templates/_helpers.tpl

44 lines
1.1 KiB
Smarty
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{/*
iAOP Helm Chart 辅助模板(_helpers.tpl)
*/}}
{{/*
展开 Chart 全名(release 名 + chart 名,截断到 63 字符)。
*/}}
{{- define "iaop.fullname" -}}
{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Chart 名称标签。
*/}}
{{- define "iaop.name" -}}
{{- .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
通用标签。
*/}}
{{- define "iaop.labels" -}}
helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" }}
app.kubernetes.io/name: {{ include "iaop.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
选择器标签。
*/}}
{{- define "iaop.selectorLabels" -}}
app.kubernetes.io/name: {{ include "iaop.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
推理后端镜像完整名(repository:tag)。
*/}}
{{- define "iaop.image" -}}
{{- printf "%s:%s" .Values.image.repository .Values.image.tag -}}
{{- end -}}