-
Notifications
You must be signed in to change notification settings - Fork 46
[Kubernetes Operator] cluster Role / Rolebinding #527
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
Comments
@poblin-orange Do you have the full manifests you used to get the error you got above? I am looking into this now as multi-ns is something we want to immediately support |
@poblin-orange I've got it to work with the following additional manifests in the However, I will have a think about what the best way of doing this automatically is. Whether its the below shoved into the Helm Chart, or whether we create them with the Operator. There's pros and cons for each - shall have a think. For now, you should be able to just copy and paste the below and apply them into your custom namespace. ---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: toolhive-binding
namespace: test
labels:
app: toolhive
app.kubernetes.io/name: toolhive
subjects:
- kind: ServiceAccount
name: toolhive
roleRef:
kind: Role
name: toolhive
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: toolhive
namespace: test
labels:
app: toolhive
app.kubernetes.io/name: toolhive
rules:
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apply
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apply
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/log
verbs:
- get
- apiGroups:
- ""
resources:
- pods/attach
verbs:
- create
- get
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: toolhive
namespace: test
labels:
app: toolhive
app.kubernetes.io/name: toolhive Let me know if it works, and I'll try and get an automated fix up that does all of this for you. |
Have created http://github.com/stacklok/toolhive/issues/538 to track the implementation of this. I'm leaning more towards the Operator doing this as it allows for us to simplify the Helm Charts and also reduce the requirement for users having to specify information about additional namespaces. |
@ChrisJBurns
|
thks @ChrisJBurns. ill give it a try. |
Uh oh!
There was an error while loading. Please reload this page.
Expecting the toolhive operator to detect MCPServer CR in any ns (or be able to configure the scanned ns). Seems only Role and RoleBinding are provisionned by the chart, preventing my use case of multiple ns.
Resulting log on my cluster (k3s 1.30, toolhive operator toolhive-operator-0.0.7 / 0.0.38 )
The text was updated successfully, but these errors were encountered: