Skip to content

Commit

Permalink
[release-1.16] Add jobsinks-addressable-resolver cluster role (#8302)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
knative-prow-robot and mgencur authored Nov 19, 2024
1 parent d0c035b commit a164684
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions config/core/roles/addressable-resolvers-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,25 @@ rules:
- get
- list
- watch

---

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: jobsinks-addressable-resolver
labels:
duck.knative.dev/addressable: "true"
app.kubernetes.io/version: devel
app.kubernetes.io/name: knative-eventing
# Do not use this role directly. These rules will be added to the "addressable-resolver" role.
rules:
- apiGroups:
- sinks.knative.dev
resources:
- jobsinks
- jobsinks/status
verbs:
- get
- list
- watch

0 comments on commit a164684

Please sign in to comment.