{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: {{ include "ga-operator.fullname" . }}
  labels:
{{ include "ga-operator.labels" . | indent 4 }}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: {{ include "ga-operator.fullname" . }}
subjects:
- kind: ServiceAccount
  name: {{ template "ga-operator.serviceAccountName" . }}
  namespace: {{ .Release.Namespace }}
{{- end -}}

