Skip to content

Commit fa6b4c5

Browse files
authored
Add jobsinks-addressable-resolver cluster role (#8298)
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\" ```
1 parent b4b609a commit fa6b4c5

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

config/channels/in-memory-channel/roles/controller-clusterrole.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@ rules:
5353
- get
5454
- list
5555
- watch
56-
- apiGroups:
57-
- sinks.knative.dev
58-
resources:
59-
- jobsinks
60-
- jobsinks/status
61-
verbs:
62-
- get
63-
- list
64-
- watch
6556
- apiGroups:
6657
- ""
6758
resources:

config/core/roles/addressable-resolvers-clusterrole.yaml

Lines changed: 22 additions & 0 deletions
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)