Skip to content

Commit 7f85754

Browse files
ShazaAldawamnehopenshift-cherrypick-robot
authored and
openshift-cherrypick-robot
committed
scc fix
1 parent 6d62715 commit 7f85754

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: pkg/operator/status.go

+7
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ func (optr *Operator) syncStatus(co *osconfigv1.ClusterOperator, conds []osconfi
150150
for _, c := range conds {
151151
v1helpers.SetStatusCondition(&co.Status.Conditions, c)
152152
}
153+
if co.Annotations == nil {
154+
co.Annotations = map[string]string{}
155+
}
156+
co.Annotations["openshift.io/required-scc"] = "restricted-v2"
153157

154158
_, err := optr.osClient.ConfigV1().ClusterOperators().UpdateStatus(context.Background(), co, metav1.UpdateOptions{})
155159
return err
@@ -237,6 +241,9 @@ func (optr *Operator) defaultClusterOperator() *osconfigv1.ClusterOperator {
237241
return &osconfigv1.ClusterOperator{
238242
ObjectMeta: metav1.ObjectMeta{
239243
Name: clusterOperatorName,
244+
Annotations: map[string]string{
245+
"openshift.io/required-scc": "restricted-v2",
246+
},
240247
},
241248
Status: osconfigv1.ClusterOperatorStatus{
242249
Conditions: optr.defaultStatusConditions(),

0 commit comments

Comments
 (0)