@@ -3,6 +3,7 @@ package operator
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "maps"
6
7
"os"
7
8
"slices"
8
9
"strings"
@@ -22,6 +23,7 @@ import (
22
23
23
24
v1 "github.com/openshift/api/config/v1"
24
25
machinev1beta1 "github.com/openshift/api/machine/v1beta1"
26
+ securityv1 "github.com/openshift/api/security/v1"
25
27
"github.com/openshift/library-go/pkg/operator/events"
26
28
"github.com/openshift/library-go/pkg/operator/resource/resourceapply"
27
29
"github.com/openshift/library-go/pkg/operator/resource/resourcehash"
@@ -447,8 +449,7 @@ func newDeployment(config *OperatorConfig, features map[string]bool) *appsv1.Dep
447
449
Name : "machine-api-controllers" ,
448
450
Namespace : config .TargetNamespace ,
449
451
Annotations : map [string ]string {
450
- maoOwnedAnnotation : "" ,
451
- "openshift.io/required-scc" : "restricted-v2" ,
452
+ maoOwnedAnnotation : "" ,
452
453
},
453
454
Labels : map [string ]string {
454
455
"api" : "clusterapi" ,
@@ -594,9 +595,15 @@ func newPodTemplateSpec(config *OperatorConfig, features map[string]bool) *corev
594
595
}
595
596
volumes = append (volumes , newRBACConfigVolumes ()... )
596
597
598
+ annotations := map [string ]string {
599
+ securityv1 .RequiredSCCAnnotation : "restricted-v2" ,
600
+ }
601
+
602
+ maps .Insert (annotations , maps .All (commonPodTemplateAnnotations ))
603
+
597
604
return & corev1.PodTemplateSpec {
598
605
ObjectMeta : metav1.ObjectMeta {
599
- Annotations : commonPodTemplateAnnotations ,
606
+ Annotations : annotations ,
600
607
Labels : map [string ]string {
601
608
"api" : "clusterapi" ,
602
609
"k8s-app" : "controller" ,
0 commit comments