40 lines
1.3 KiB
Smarty
40 lines
1.3 KiB
Smarty
{{- define "anubis.name" -}}
|
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
|
|
{{- define "anubis.fullname" -}}
|
|
{{- if .Values.fullnameOverride -}}
|
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
|
{{- else -}}
|
|
{{- $name := include "anubis.name" . -}}
|
|
{{- if contains $name .Release.Name -}}
|
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
|
{{- else -}}
|
|
{{- printf "%s-%s" .Release.Name (include "anubis.name" .) | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- define "anubis.labels" -}}
|
|
app.kubernetes.io/name: {{ include "anubis.fullname" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" }}
|
|
{{- end -}}
|
|
|
|
{{- define "anubis.selectorLabels" -}}
|
|
app.kubernetes.io/name: {{ include "anubis.fullname" . }}
|
|
{{- end -}}
|
|
|
|
{{- define "anubis.policyConfigMap" -}}
|
|
{{- default (printf "%s-policy" (include "anubis.fullname" .)) .Values.policy.existingConfigMap -}}
|
|
{{- end -}}
|
|
|
|
{{- define "anubis.middlewareName" -}}
|
|
{{- default (include "anubis.fullname" .) .Values.traefik.middleware.nameOverride -}}
|
|
{{- end -}}
|
|
|
|
{{- define "anubis.ingressRouteName" -}}
|
|
{{- default (include "anubis.fullname" .) .Values.traefik.ingressRoute.nameOverride -}}
|
|
{{- end -}}
|