Skip to content

Commit

Permalink
Add read access for ValidatingAdmissionPolicy and ValidatingAdmission…
Browse files Browse the repository at this point in the history
…PolicyBinding resources. (kubernetes-sigs#3190)
  • Loading branch information
mbobrovskyi authored and kannon92 committed Nov 19, 2024
1 parent 981fe99 commit 94a2896
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions charts/kueue/templates/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ rules:
- list
- update
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingadmissionpolicies
- validatingadmissionpolicybindings
verbs:
- get
- list
- watch
- apiGroups:
- autoscaling.x-k8s.io
resources:
Expand Down
9 changes: 9 additions & 0 deletions config/components/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ rules:
- list
- update
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingadmissionpolicies
- validatingadmissionpolicybindings
verbs:
- get
- list
- watch
- apiGroups:
- autoscaling.x-k8s.io
resources:
Expand Down
2 changes: 2 additions & 0 deletions pkg/util/cert/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ const (
// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;update
// +kubebuilder:rbac:groups="admissionregistration.k8s.io",resources=mutatingwebhookconfigurations,verbs=get;list;watch;update
// +kubebuilder:rbac:groups="admissionregistration.k8s.io",resources=validatingwebhookconfigurations,verbs=get;list;watch;update
// +kubebuilder:rbac:groups="admissionregistration.k8s.io",resources=validatingadmissionpolicies,verbs=get;list;watch
// +kubebuilder:rbac:groups="admissionregistration.k8s.io",resources=validatingadmissionpolicybindings,verbs=get;list;watch

// ManageCerts creates all certs for webhooks. This function is called from main.go.
func ManageCerts(mgr ctrl.Manager, cfg config.Configuration, setupFinished chan struct{}) error {
Expand Down

0 comments on commit 94a2896

Please sign in to comment.