apiVersion: {{ .Values.rbacApiVersion }}/v1
kind: ClusterRole
metadata:
  name: system:controller:operator-lifecycle-manager
rules:
- apiGroups: ["*"]
  resources: ["*"]
  verbs: ["*"]
- nonResourceURLs: ["*"]
  verbs: ["*"]
---
kind: ServiceAccount
apiVersion: v1
metadata:
  name: olm-operator-serviceaccount
  namespace: {{ .Values.namespace }}
---
apiVersion: {{ .Values.rbacApiVersion }}/v1
kind: ClusterRoleBinding
metadata:
  name: olm-operator-binding-{{ .Values.namespace }}
roleRef:
  apiGroup: {{ .Values.rbacApiVersion }}
  kind: ClusterRole
  name: system:controller:operator-lifecycle-manager
subjects:
- kind: ServiceAccount
  name: olm-operator-serviceaccount
  namespace: {{ .Values.namespace }}
