apiVersion: v1
kind: Secret
metadata:
  name: db-details
data:
  db-user: {{ "postgres" | b64enc }}
  {{- with (lookup "v1" "Secret" .Release.Namespace "db-details") }}
  db-password: {{ index .data "db-password" }}
  {{ else }}
  db-password: {{ randAlphaNum 15 | b64enc | quote }}
  {{ end }}
