{{- if (include "kong.createExternalDBSecret" .) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "kong.fullname" . }}-external-secret
  namespace: {{ .Release.Namespace }}
  labels: {{- include "kong.labels" . | nindent 4 }}
    app.kubernetes.io/component: server
type: Opaque
data:
  {{- if .Values.cassandra.external.password }}
  cassandra-password: {{ .Values.cassandra.external.password | b64enc | quote }}
  {{- end }}
  {{- if .Values.postgresql.external.password }}
  postgresql-password: {{ .Values.postgresql.external.password | b64enc | quote }}
  {{- end }}
{{- end }}
