1 {{- if not (.Values.adminUser.existingSecret) -}}
6 {{- include "influxdb.labels" . | nindent 4 }}
7 {{- $name := printf "%s-auth" (include "influxdb.fullname" .) }}
10 {{- $previous := lookup "v1" "Secret" .Release.Namespace $name }}
13 admin-token: {{ index $previous.data "admin-token" }}
14 {{- else if .Values.adminUser.token }}
15 admin-token: {{ .Values.adminUser.token | b64enc | quote }}
17 admin-token: {{ randAlphaNum 32 | b64enc | quote }}
21 admin-password: {{ index $previous.data "admin-password" }}
22 {{- else if .Values.adminUser.password }}
23 admin-password: {{ .Values.adminUser.password | b64enc | quote }}
25 admin-password: {{ randAlphaNum 32 | b64enc | quote }}