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