Skip to content

Commit e32831a

Browse files
[release-1.15] Add jobsinks-addressable-resolver cluster role (#8301)
Add jobsinks-addressable-resolver cluster role This will ensure that alld ServiceAccount that are bound to "addressable-resolver" ClusterRole can read JobSinks. Fixes issues like this for SinkBindings: ``` {"level":"error","ts":"2024-11-04T08:06:16.160Z","logger":"eventing-webhook","caller":"sinkbinding/sinkbinding.go:87", "msg":"Failed to get Addressable from Destination: %!w(*fmt.wrapError=&{failed to get lister for sinks.knative.dev/v1alpha1, Resource=jobsinks: jobsinks.sinks.knative.dev is forbidden: User \"system:serviceaccount:knative-eventing:eventing-webhook\" cannot list resource \"jobsinks\" in API group \"sinks.knative.dev\" ``` Co-authored-by: Martin Gencur <[email protected]>
1 parent 6ccaa08 commit e32831a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Diff for: config/core/roles/addressable-resolvers-clusterrole.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,25 @@ rules:
144144
- get
145145
- list
146146
- watch
147+
148+
---
149+
150+
kind: ClusterRole
151+
apiVersion: rbac.authorization.k8s.io/v1
152+
metadata:
153+
name: jobsinks-addressable-resolver
154+
labels:
155+
duck.knative.dev/addressable: "true"
156+
app.kubernetes.io/version: devel
157+
app.kubernetes.io/name: knative-eventing
158+
# Do not use this role directly. These rules will be added to the "addressable-resolver" role.
159+
rules:
160+
- apiGroups:
161+
- sinks.knative.dev
162+
resources:
163+
- jobsinks
164+
- jobsinks/status
165+
verbs:
166+
- get
167+
- list
168+
- watch

0 commit comments

Comments
 (0)