Skip to content

Commit

Permalink
[release-v1.15] Add jobsinks-addressable-resolver cluster role (#950)
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\"
```

* Run make generate-release
  • Loading branch information
mgencur authored Nov 5, 2024
1 parent 787b601 commit e308b30
Show file tree
Hide file tree
Showing 2 changed files with 44 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
22 changes: 22 additions & 0 deletions openshift/release/artifacts/eventing-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,28 @@ 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: v1.15
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
---
# Copyright 2019 The Knative Authors
#
Expand Down

0 comments on commit e308b30

Please sign in to comment.