Piped-Kubernetes/charts/apps/piped/templates/common.yaml
Skyler Mäntysaari 42e5d8f110
chore(backend): Fix the configmap generation for databases. (#39)
It shouldn't require dialect and driver_class and instead default to using them but allow customization.
2023-07-21 05:19:44 +03:00

32 lines
963 B
YAML

{{- include "bjw-s.common.values.init" . }}
{{- define "common.getValueFromSecret" }}
{{- $obj := (lookup "v1" "Secret" .Namespace .Name).data -}}
{{- if $obj }}
{{- index $obj .Key | b64dec -}}
{{- end -}}
{{- end -}}
{{- define "common.names.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "app-template.hardcodedValues" -}}
# Set the nameOverride based on the release name if no override has been set
{{ if not .Values.global.nameOverride }}
global:
nameOverride: "{{ .Release.Name }}"
{{ end }}
{{- end -}}
{{- $_ := mergeOverwrite .Values (include "app-template.hardcodedValues" . | fromYaml) -}}