-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]RBAC error - list namespace cause dashboard not insatlled #700
Comments
@wenerme how did you install the Operator? When using OLM or kubebuilder you should end up with all the permissions provided, including namespace list. |
Hi, I have the same issue. I deployed grafana-operator using the Bitnami chart: https://github.com/bitnami/charts/tree/master/bitnami/grafana-operator The I have the following error:
The dashboard installation went through after commenting out the following, but that's not ideal.
|
@BapRx are you sure that you commented out the |
I think we set up the permissions for the Operator to only run in namespaced mode. The documentation mentions that you need to apply cluster roles when using namspace label selectors (or the However it looks like we no longer add the list permission for namespaces even when installing via kustomize. We don't want to add that permission to OLM installations, so how about we provide an example cluster role / binding and instructions for how to apply it? We can add it to those: https://github.com/grafana-operator/grafana-operator/tree/master/deploy/cluster_roles what do you think? |
Hi thank your for your comment, you're right, I commented
The helm chart does create the cluster issuer: apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"rbac.authorization.k8s.io/v1","kind":"ClusterRole","metadata":{"annotations":{},"creationTimestamp":null,"name":"grafana-operator"},"rules":[{"apiGroups":[""],"resources":["events"],"verbs":["get","list","watch","create","delete","update","patch"]},{"apiGroups":["integreatly.org"],"resources":["grafanadashboards","grafanadatasources","grafanadatasources/status"],"verbs":["get","list","create","update","delete","deletecollection","watch"]}]}
meta.helm.sh/release-name: grafana-operator
meta.helm.sh/release-namespace: monitoring
creationTimestamp: "2022-03-23T16:22:40Z"
labels:
app.kubernetes.io/instance: grafana-operator
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: grafana-operator
env: prod
helm.sh/chart: grafana-operator-2.2.10
k8s-app: grafana
name: grafana-operator
resourceVersion: "184098300"
uid: 1581d720-d761-4a80-8064-ab88512356a2
rules:
- apiGroups:
- ""
resources:
- configmaps
- persistentvolumeclaims
- secrets
- serviceaccounts
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- get
- list
- watch
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- apiGroups:
- apps
- extensions
resources:
- deployments
- deployments/finalizers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- integreatly.org
resources:
- grafanadashboards
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- integreatly.org
resources:
- grafanadashboards/status
verbs:
- get
- patch
- update
- apiGroups:
- integreatly.org
resources:
- grafanadatasources
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- integreatly.org
resources:
- grafanadatasources/status
verbs:
- get
- patch
- update
- apiGroups:
- integreatly.org
resources:
- grafananotificationchannels
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- integreatly.org
resources:
- grafananotificationchannels/status
verbs:
- get
- patch
- update
- apiGroups:
- integreatly.org
resources:
- grafanas
- grafanas/finalizers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- integreatly.org
resources:
- grafanas/status
verbs:
- get
- patch
- update
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- route.openshift.io
resources:
- routes
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- nonResourceURLs:
- /metrics
verbs:
- get I tried installing directly the manifest from the grafana-operator repo, without success. https://github.com/grafana-operator/grafana-operator/tree/master/deploy/cluster_roles The only way to make it work is to disable the dashboardNamespaceSelector |
@BapRx the cluster role created from the helm chart also doesn't have the namespace list permission. We'll likely add those permissions back to the example cluster role, but you'd need to apply them yourself. |
@pb82 ok, I'll update the helm chart with the new cluster roles once you update the examples. Thank you! |
Describe the bug
A clear and concise description of what the bug is.
dashboard not installed
Version
Full semver version of the operator being used e.g. v3.10.1, v4.0.0
v4.2.0
To Reproduce
Steps to reproduce the behavior:
dashboardNamespaceSelector: { }
Expected behavior
dashboard installed without error
The text was updated successfully, but these errors were encountered: