Skip to content

Commit 34aab1b

Browse files
committed
Update policy for users to be able to interact with PDB
1 parent 4fe44dd commit 34aab1b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

pkg/cmd/server/bootstrappolicy/policy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ func GetBootstrapClusterRoles() []authorizationapi.ClusterRole {
238238
"replicasets", "replicasets/scale", "deployments", "deployments/scale").RuleOrDie(),
239239
authorizationapi.NewRule(read...).Groups(extensionsGroup).Resources("daemonsets").RuleOrDie(),
240240

241+
authorizationapi.NewRule(readWrite...).Groups(policyGroup).Resources("poddisruptionbudgets").RuleOrDie(),
242+
241243
authorizationapi.NewRule(readWrite...).Groups(appsGroup).Resources("petsets").RuleOrDie(),
242244

243245
authorizationapi.NewRule(readWrite...).Groups(authzGroup).Resources("roles", "rolebindings").RuleOrDie(),

test/testdata/bootstrappolicy/bootstrap_cluster_roles.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,20 @@ items:
555555
- get
556556
- list
557557
- watch
558+
- apiGroups:
559+
- policy
560+
attributeRestrictions: null
561+
resources:
562+
- poddisruptionbudgets
563+
verbs:
564+
- create
565+
- delete
566+
- deletecollection
567+
- get
568+
- list
569+
- patch
570+
- update
571+
- watch
558572
- apiGroups:
559573
- apps
560574
attributeRestrictions: null

0 commit comments

Comments
 (0)