Skip to content

Commit 742fe1e

Browse files
Merge pull request #362 from tnierman/osd-28850
OSD-28850 - add the openshift-kube-apiserver-operator serviceaccount to the SCC allowlist
2 parents d7731d7 + 05816e8 commit 742fe1e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

pkg/webhooks/scc/scc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ var (
3636
},
3737
}
3838
allowedUsers = []string{
39+
"system:serviceaccount:openshift-kube-apiserver-operator:kube-apiserver-operator",
3940
"system:serviceaccount:openshift-monitoring:cluster-monitoring-operator",
4041
"system:serviceaccount:openshift-cluster-version:default",
4142
"system:admin",

pkg/webhooks/scc/scc_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@ func TestUser(t *testing.T) {
169169
userGroups: []string{"system:authenticated", "system:serviceaccounts:osde2e-abcde"},
170170
shouldBeAllowed: false,
171171
},
172+
{
173+
targetSCC: "anyuid",
174+
testID: "kube-apiserver-operator-allowed",
175+
username: "system:serviceaccount:openshift-kube-apiserver-operator:kube-apiserver-operator",
176+
operation: admissionv1.Update,
177+
userGroups: []string{},
178+
shouldBeAllowed: true,
179+
},
172180
}
173181
runSCCTests(t, tests)
174182
}

0 commit comments

Comments
 (0)