# helm_charts_secret-gcr.yaml
{{- if .Values.registryCreds.gcrServiceAccountKey }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "buildkite.fullname" . }}-gcr
  labels:
    app: {{ template "buildkite.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
  service-account-key.json: |-
    {{ .Values.registryCreds.gcrServiceAccountKey }}
{{- end }}