apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: {{ template "spinnaker.fullname" . }}-halyard
  labels:
{{ include "spinnaker.standard-labels" . | indent 4 }}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: edit
subjects:
- namespace: {{ .Release.Namespace }}
  kind: ServiceAccount
  {{- if .Values.serviceAccount.halyardName }}
  name: {{ .Values.serviceAccount.halyardName }}
  {{- else }}
  name: {{ template "spinnaker.fullname" . }}-halyard
  {{- end }}
