-
Notifications
You must be signed in to change notification settings - Fork 8
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
Without the list and watch permissions on secrets a log error is shown #14
Comments
maybe we can disable the cache then? with |
I tested with:
Instead of mgr.GetClient() and seems to be working fine This was the possible workaround mentioned in the issue |
Perhaps we would need a separate client for secrets then, something like See also kubernetes-sigs/controller-runtime#244. EDIT: it seems it will be possible with new release: kubernetes-sigs/controller-runtime@cd065bf. |
Moreover resourceName cannot be used when creating the secret. So the rbac for creating should embrace every secret. Not a big issue I believe |
So far I got it working with the following permissions: @roobre
I am using the different client:
With the new method to reduce the size of the cache was still showing the same behaviour, not sure why |
That ruleset is looking great to me! |
Shouldn't it be more like the following: rules:
# To create license secret for infrastructure agent sidecar.
- apiGroups: [""]
resources:
- "secrets"
verbs: ["get", "update", "patch", "create"]
resourceNames: [{{ template "newrelic-infra-operator.fullname" . }}-config]
# To enable ClusterRoleBinding resources caching.
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["clusterrolebindings"]
verbs: ["list", "watch", "get"]
# To allow granting extra service accounts access to node metrics.
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["clusterrolebindings"]
verbs: ["update", "patch"]
resourceNames: [{{ template "newrelic-infra-operator.fullname" . }}-config] |
So, what do we do with this issue? We can close it with proposed RBAC rules are added to the Helm chart? |
I think @paologallinaharbur commented that |
You're right: kubernetes/kubernetes#80295 (comment).
|
yes that is why I had a separate |
We should have a comment for that I think. It may not be obvious for newcomers. |
Documented in newrelic/helm-charts@7dfd2e6. |
kubernetes-sigs/controller-runtime#1156
The text was updated successfully, but these errors were encountered: