{{ if and (eq .Values.storage.type "elasticsearch") .Values.storage.elasticsearch.usePassword (not .Values.storage.elasticsearch.existingSecret) -}} apiVersion: v1 kind: Secret metadata: name: {{ include "jaeger.fullname" . }}-elasticsearch namespace: {{ .Release.Namespace }} labels: {{- include "jaeger.labels" . | nindent 4 }} type: Opaque data: password: {{ .Values.storage.elasticsearch.password | b64enc | quote }} {{- end }}