apiVersion: v1
kind: Secret
metadata:
  name: {{ template "buildkite.fullname" . }}
  labels:
    app: {{ template "buildkite.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
  agent-token: {{ .Values.agent.token | b64enc }}
{{- if .Values.privateSshKey }}
  agent-ssh: {{ .Values.privateSshKey | b64enc }}
{{- end }}
