apiVersion: v1
kind: Secret
metadata:
  name: {{ template "stellar-core.fullname" . }}
  labels:
    app: {{ template "stellar-core.name" . }}
    chart: {{ template "stellar-core.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
{{- if not .Values.existingNodeSeedSecret }}
  nodeSeed: {{ required "nodeSeed is required if existingNodeSeedSecret is not provided" .Values.nodeSeed | b64enc }}
{{- end }}
{{- with .Values.gcloudServiceAccountKey }}
  gcloudServiceAccountKey: {{ . | b64enc }}
{{- end }}
