{{- if and .Values.auth.enabled (not .Values.auth.existingSecret) -}} apiVersion: v1 kind: Secret metadata: name: {{ template "common.names.fullname" . }} namespace: {{ template "zookeeper.namespace" . }} labels: {{- include "common.labels.standard" . | nindent 4 }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} type: Opaque data: client-password: {{ include "zookeeper.clientPassword" . | b64enc | quote }} server-password: {{ include "zookeeper.serverPasswords" . | b64enc | quote }} --- {{- end }} {{- if and .Values.tls.client.enabled (not .Values.tls.client.existingSecret) (or .Values.tls.client.keystorePassword .Values.tls.client.truststorePassword .Values.tls.client.autoGenerated) -}} apiVersion: v1 kind: Secret metadata: name: {{ template "common.names.fullname" . }}-client-tls-pass namespace: {{ template "zookeeper.namespace" . }} labels: {{- include "common.labels.standard" . | nindent 4 }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} type: Opaque data: {{- if or .Values.tls.client.keystorePassword .Values.tls.client.autoGenerated }} keystore-password: {{ (.Values.tls.client.keystorePassword | default (randAlphaNum 10)) | b64enc | quote }} {{- end }} {{- if or .Values.tls.client.truststorePassword .Values.tls.client.autoGenerated }} truststore-password: {{ (.Values.tls.client.truststorePassword | default (randAlphaNum 10))| b64enc | quote }} {{- end }} --- {{- end }} {{- if and .Values.tls.quorum.enabled (not .Values.tls.quorum.existingSecret) (or .Values.tls.quorum.keystorePassword .Values.tls.quorum.truststorePassword .Values.tls.quorum.autoGenerated) -}} apiVersion: v1 kind: Secret metadata: name: {{ template "common.names.fullname" . }}-quorum-tls-pass namespace: {{ template "zookeeper.namespace" . }} labels: {{- include "common.labels.standard" . | nindent 4 }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} type: Opaque data: {{- if or .Values.tls.quorum.keystorePassword .Values.tls.quorum.autoGenerated }} keystore-password: {{ (.Values.tls.quorum.keystorePassword | default (randAlphaNum 10)) | b64enc | quote }} {{- end }} {{- if or .Values.tls.quorum.truststorePassword .Values.tls.quorum.autoGenerated }} truststore-password: {{ (.Values.tls.quorum.truststorePassword | default (randAlphaNum 10))| b64enc | quote }} {{- end }} --- {{- end }}