blob: c6390f1eb9117bbb1fd39ae0afd96e6cf4e8ad29 [file] [log] [blame]
{{- if .Values.setDefaultUser.enabled -}}
{{- if not (.Values.setDefaultUser.user.existingSecret) -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "influxdb.fullname" . }}-auth
labels:
{{- include "influxdb.labels" . | nindent 4 }}
data:
{{- if .Values.setDefaultUser.user.password }}
influxdb-password: {{ .Values.setDefaultUser.user.password | b64enc | quote }}
{{- else }}
influxdb-password: {{ randAlphaNum 10 | b64enc | quote }}
{{- end }}
influxdb-user: {{ .Values.setDefaultUser.user.username | b64enc | quote }}
{{- end -}}
{{- end -}}