{{- define "who-need-help.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "who-need-help.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name (include "who-need-help.name" .) | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}

{{- define "who-need-help.labels" -}}
app.kubernetes.io/name: {{ include "who-need-help.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{- define "who-need-help.selectorLabels" -}}
app.kubernetes.io/name: {{ include "who-need-help.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{- define "who-need-help.secretName" -}}
{{- required "existingSecret must name a pre-created Kubernetes Secret" .Values.existingSecret }}
{{- end }}
