This repository has been archived on 2024-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
onechart/charts/common/templates/_envFromRef.yaml
T

40 lines
947 B
YAML

{{- define "common.envFromRef.tpl" -}}
{{- if or (or (or (.Values.vars) (.Values.secretEnabled) (.Values.envFrom)) .Values.sealedSecrets) .Values.secretName -}}
envFrom: &envFrom
{{- if .Values.vars }}
- configMapRef:
name: {{ template "common.robustName" .Release.Name }}
{{- end }}
{{- if .Values.envFrom }}
{{- range .Values.envFrom.existingSecrets }}
- secretRef:
name: {{ .name }}
optional: {{ .optional }}
{{- end }}
{{- range .Values.envFrom.existingConfigMaps }}
- configMapRef:
name: {{ .name }}
optional: {{ .optional }}
{{- end }}
{{- end }}
{{- if .Values.secretEnabled }}
- secretRef:
name: {{ include "common.robustName" $.Release.Name }}
{{- end }}
{{- if .Values.secretName }}
- secretRef:
name: {{ .Values.secretName }}
{{- end }}
{{- if .Values.sealedSecrets }}
- secretRef:
name: {{ template "common.robustName" .Release.Name }}
{{- end }}
{{- end }}
{{- end }}