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