{{- if .Values.rbac.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: {{ template "keel.name" . }}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: {{ template "keel.name" . }}
subjects:
  - kind: ServiceAccount
    name: {{ template "keel.name" . }}
    namespace: kube-system
{{ end }}
