2018-07-24 23:37:12 +00:00
|
|
|
{{- if and .Values.usePassword (not .Values.existingSecret) -}}
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Secret
|
|
|
|
|
metadata:
|
|
|
|
|
name: {{ template "redis.fullname" . }}
|
|
|
|
|
labels:
|
|
|
|
|
app: {{ template "redis.name" . }}
|
|
|
|
|
chart: {{ template "redis.chart" . }}
|
|
|
|
|
release: "{{ .Release.Name }}"
|
|
|
|
|
heritage: "{{ .Release.Service }}"
|
|
|
|
|
type: Opaque
|
|
|
|
|
data:
|
2020-01-29 16:26:05 +00:00
|
|
|
{{- if .Values.passwordContent }}
|
|
|
|
|
redis-password: {{ .Values.passwordContent | quote }}
|
|
|
|
|
{{- else if .Values.password }}
|
2018-07-24 23:37:12 +00:00
|
|
|
redis-password: {{ .Values.password | b64enc | quote }}
|
|
|
|
|
{{- else }}
|
|
|
|
|
redis-password: {{ randAlphaNum 10 | b64enc | quote }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end -}}
|