Skip to content

Commit 14a69fc

Browse files
Scotttekton-robot
Scott
authored andcommitted
Add PodSecurityPolicy access to webhook's clusterrole
Deploying pipelines 0.12.0 into a cluster with pod security policy enabled will result in the webhook deployment entering a failed state. This happens because the webhook does not have the rights to use pod security policies. In prior versions of Tekton the webhook shared its clusterrole with the controller, and was granted much broader permissions. Since 0.12.0 the permissions given to the controller and webhook have been split. In splitting the permissions the controller continued to received the PSP "use" permission but the webhook did not; an oversight. This commit adds the "use" verb for pod security policies to the webhook clusterrole.
1 parent 1fbac2a commit 14a69fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config/200-clusterrole.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,7 @@ rules:
9090
# When there are changes to the configs or secrets, knative updates the validatingwebhook config
9191
# with the updated certificates or the refreshed set of rules.
9292
verbs: ["get", "update"]
93+
- apiGroups: ["policy"]
94+
resources: ["podsecuritypolicies"]
95+
resourceNames: ["tekton-pipelines"]
96+
verbs: ["use"]

0 commit comments

Comments
 (0)