krallistic/kafka-operator

Fail to create CRD on start

fiftoine opened this issue · 1 comments

Hi,

As is, the operator can't create CRDs if not given some permissions.

Applying this makes it work (assuming you deploy on the default namespace) :

Maybe some extra documentation on the README.md file to tell permissions are needed would be nice ;-)

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: operator-kafka
rules:
- apiGroups:
  - krallistic.github.com
  resources:
  - "*"
  verbs:
  - "*"
- apiGroups:
  - ""
  resources:
  - pods
  - services
  - endpoints
  - persistentvolumeclaims
  - events
  - configmaps
  - secrets
  verbs:
  - "*"
- apiGroups:
  - apps
  resources:
  - deployments
  - daemonsets
  - replicasets
  - statefulsets
  verbs:
  - "*"
- apiGroups:
  - apiextensions.k8s.io
  resources:
  - customresourcedefinitions
  verbs:
  - '*'

---

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: default-account-operator-kafka
subjects:
- kind: ServiceAccount
  name: default
  namespace: default
roleRef:
  kind: ClusterRole
  name: operator-kafka
  apiGroup: rbac.authorization.k8s.io

Mrart commented

Can you push it to this project!