k8ssandra / k8ssandra-operator

The Kubernetes operator for K8ssandra
https://k8ssandra.io/
Apache License 2.0
157 stars 73 forks source link

Medusaconfiguration missing in ClusterRole #1213

Open andreasgeisslerdt opened 6 months ago

andreasgeisslerdt commented 6 months ago

k8ssandra-operator reports the following error in logs:

W0220 13:45:36.556901       1 reflector.go:424] pkg/mod/k8s.io/client-go@v0.26.4/tools/cache/reflector.go:169: failed to list *v1alpha1.MedusaConfiguration: medusaconfigurations.medusa.k8ssandra.io is forbidden: User "system:serviceaccount:k8ssandra-operator:k8ssandra-operator-aio" cannot list resource "medusaconfigurations" in API group "medusa.k8ssandra.io" at the cluster scope
E0220 13:45:36.556957       1 reflector.go:140] pkg/mod/k8s.io/client-go@v0.26.4/tools/cache/reflector.go:169: Failed to watch *v1alpha1.MedusaConfiguration: failed to list *v1alpha1.MedusaConfiguration: medusaconfigurations.medusa.k8ssandra.io is forbidden: User "system:serviceaccount:k8ssandra-operator:k8ssandra-operator-aio" cannot list resource "medusaconfigurations" in API group "medusa.k8ssandra.io" at the cluster scope

Additionally you get errors accessing cronjobs.

It seems, that in the Cluster Role the following entries are missing, e.g.:

- apiGroups:
    - medusa.k8ssandra.io
  resources:
    - medusaconfigurations
  verbs:
    - create
    - delete
    - get
    - list
    - patch
    - update
    - watch

- apiGroups:
    - ''
    - batch
  resources:
    - cronjobs
  verbs:
    - create
    - delete
    - get
    - list
    - patch
    - update
    - watch
    - deletecollection

Environment

insert manifests relevant to the issue
insert K8ssandra Operator logs relevant to the issue here

Anything else we need to know?:

┆Issue is synchronized with this Jira Story by Unito

rzvoncek commented 6 months ago

Hi @andreasgeisslerdt, thanks for the report!

Could you please share if your setup is a fresh install of k8ssandra-operator v1.12.0 or did you upgrade from some other version. If yes, from which version?

And are you using Helm or Kustomize to do this?

Thanks, Radovan