-
Notifications
You must be signed in to change notification settings - Fork 64
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
Provide kubernetes role for RBAC #4
Comments
🤔 Still running into RBAC issues after deploying the RBAC roles.
The
|
If you |
|
Hmm, I guess neither of those list permissions? I was hoping to verify the |
I've manually verified, and |
there you go: This is what I have in my cluster (extracted with apiVersion: v1
kind: ServiceAccount
metadata:
name: sentry-kubernetes
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: sentry-kubernetes
rules:
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: sentry-kubernetes
roleRef:
kind: ClusterRole
name: sentry-kubernetes
subjects:
- kind: ServiceAccount
name: sentry-kubernetes |
Thanks! @chnkr Can you diff with yours? |
It looks like a second set of verbs for the "secrets" resource was missing in my first command line example. That's something I probably found later. Most of it was discovered by analyzing the container logs. |
That seems to be the case indeed! Going to give it a go and see if this works 👍 |
🎉 It seems to be working after making some minor changes to the apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: sentry-kubernetes
namespace: default
roleRef:
kind: ClusterRole
name: sentry-kubernetes
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: sentry-kubernetes
namespace: default |
Awesome, does anyone know what (if any) adjustments need to be made to the original commands @vdboor posted?
I'd like to put it in the README if it makes sense. |
One option would be to provide A second option is to fix the helm chart PR: helm/charts#2708 which gives even easier installation options. |
I did a new PR using the commits from #2708, helm/charts#3748 |
FWIW instead of using a cluster role you can also use a normal role and pass in the |
Sorry for necroing an old thread, but I'm getting Exception when calling CoreV1Api->list_event_for_all_namespaces: (403) using GKE. Is there some managed cluster quirk I'm missing? If I change ClusterRoleBinding -> subjects -> Kind to ServiceAccount instead of User, I get the same exception but with code 401 Unauthorized. |
I also encountered this problem, did someone managed to solve it ? |
Take a look at the helm chart https://github.com/sentry-kubernetes/charts/tree/develop/sentry-kubernetes/templates it's not that complicated: you only need a clusterrole + clusterrolebinding. |
ן already did that, and it still not working. |
As of Kubernetes 1.8+, RBAC is enabled by default. You'll need the following setup to allow the program to access the events:
When you add
--dry-run -o yaml
to all commands, you'll get the.yml
definition files.The text was updated successfully, but these errors were encountered: