@@ -12,7 +12,6 @@ import (
12
12
"github.com/google/go-cmp/cmp"
13
13
"github.com/operator-framework/api/pkg/operators/v1alpha1"
14
14
15
- operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1"
16
15
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/install"
17
16
controllerclient "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/controller-runtime/client"
18
17
hashutil "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/kubernetes/pkg/util/hash"
@@ -72,7 +71,7 @@ func (s *grpcCatalogSourceDecorator) Labels() map[string]string {
72
71
}
73
72
}
74
73
75
- func (s * grpcCatalogSourceDecorator ) getNamespaceSecurityContextConfig () (operatorsv1alpha1 .SecurityConfig , error ) {
74
+ func (s * grpcCatalogSourceDecorator ) getNamespaceSecurityContextConfig () (v1alpha1 .SecurityConfig , error ) {
76
75
namespace := s .GetNamespace ()
77
76
if config , ok := s .Reconciler .namespacePSAConfigCache [namespace ]; ok {
78
77
return config , nil
@@ -87,10 +86,10 @@ func (s *grpcCatalogSourceDecorator) getNamespaceSecurityContextConfig() (operat
87
86
// 'pod-security.kubernetes.io/enforce' is the label used for enforcing namespace level security,
88
87
// and 'restricted' is the value indicating a restricted security policy.
89
88
if val , exists := ns .Labels ["pod-security.kubernetes.io/enforce" ]; exists && val == "restricted" {
90
- return operatorsv1alpha1 .Restricted , nil
89
+ return v1alpha1 .Restricted , nil
91
90
}
92
91
93
- return operatorsv1alpha1 .Legacy , nil
92
+ return v1alpha1 .Legacy , nil
94
93
}
95
94
96
95
func (s * grpcCatalogSourceDecorator ) Annotations () map [string ]string {
@@ -179,7 +178,7 @@ type GrpcRegistryReconciler struct {
179
178
createPodAsUser int64
180
179
opmImage string
181
180
utilImage string
182
- namespacePSAConfigCache map [string ]operatorsv1alpha1 .SecurityConfig
181
+ namespacePSAConfigCache map [string ]v1alpha1 .SecurityConfig
183
182
}
184
183
185
184
var _ RegistryReconciler = & GrpcRegistryReconciler {}
@@ -280,7 +279,7 @@ func correctImages(source grpcCatalogSourceDecorator, pod *corev1.Pod) bool {
280
279
// EnsureRegistryServer ensures that all components of registry server are up to date.
281
280
func (c * GrpcRegistryReconciler ) EnsureRegistryServer (logger * logrus.Entry , catalogSource * v1alpha1.CatalogSource ) error {
282
281
if c .namespacePSAConfigCache == nil {
283
- c .namespacePSAConfigCache = make (map [string ]operatorsv1alpha1 .SecurityConfig )
282
+ c .namespacePSAConfigCache = make (map [string ]v1alpha1 .SecurityConfig )
284
283
}
285
284
source := grpcCatalogSourceDecorator {CatalogSource : catalogSource , createPodAsUser : c .createPodAsUser , opmImage : c .opmImage , utilImage : c .utilImage }
286
285
0 commit comments