Files
k3s-manifests/charts/app/templates/_helpers.tpl
2026-07-19 08:40:53 +00:00

25 lines
752 B
Smarty

{{/*
Resource name: explicit .Values.name wins, else the release name.
Keeping this in one helper means every template names things identically.
*/}}
{{- define "app.name" -}}
{{- default .Release.Name .Values.name -}}
{{- end -}}
{{/*
Common labels stamped on every object, so `kubectl get all -l ...` and ArgoCD
can group a service's resources together.
*/}}
{{- define "app.labels" -}}
app.kubernetes.io/name: {{ include "app.name" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels: the stable subset used to wire Deployment <-> Service. Must
NOT change over a release's life or the Service would stop matching the pods.
*/}}
{{- define "app.selectorLabels" -}}
app: {{ include "app.name" . }}
{{- end -}}