@@ -24,9 +24,9 @@ import (
24
24
"github.com/operator-framework/api/pkg/operators/v1alpha1"
25
25
log "github.com/sirupsen/logrus"
26
26
"k8s.io/apimachinery/pkg/types"
27
- "k8s.io/apimachinery/pkg/util/sets"
28
27
"k8s.io/apimachinery/pkg/util/wait"
29
28
"k8s.io/client-go/util/retry"
29
+ "k8s.io/utils/set"
30
30
"sigs.k8s.io/controller-runtime/pkg/client"
31
31
32
32
olmclient "github.com/operator-framework/operator-sdk/internal/olm/client"
@@ -43,7 +43,7 @@ type OperatorInstaller struct {
43
43
InstallMode operator.InstallMode
44
44
CatalogCreator CatalogCreator
45
45
CatalogUpdater CatalogUpdater
46
- SupportedInstallModes sets .Set [string ]
46
+ SupportedInstallModes set .Set [string ]
47
47
48
48
cfg * operator.Configuration
49
49
}
@@ -210,7 +210,7 @@ func (o OperatorInstaller) ensureOperatorGroup(ctx context.Context) error {
210
210
return fmt .Errorf ("use install mode %q to watch operator's namespace %q" , v1alpha1 .InstallModeTypeOwnNamespace , o .cfg .Namespace )
211
211
}
212
212
213
- supported = supported .Intersection (sets .New [ string ] (string (o .InstallMode .InstallModeType )))
213
+ supported = supported .Intersection (set .New (string (o .InstallMode .InstallModeType )))
214
214
if supported .Len () == 0 {
215
215
return fmt .Errorf ("operator %q does not support install mode %q" , o .StartingCSV , o .InstallMode .InstallModeType )
216
216
}
@@ -248,8 +248,8 @@ func (o *OperatorInstaller) isOperatorGroupCompatible(og v1.OperatorGroup, targe
248
248
}
249
249
250
250
// otherwise, check that the target namespaces match
251
- targets := sets .New [ string ] (targetNamespaces ... )
252
- ogtargets := sets .New [ string ] (og .Spec .TargetNamespaces ... )
251
+ targets := set .New (targetNamespaces ... )
252
+ ogtargets := set .New (og .Spec .TargetNamespaces ... )
253
253
if ! ogtargets .Equal (targets ) {
254
254
return fmt .Errorf ("existing operatorgroup %q is not compatible with install mode %q" , og .Name , o .InstallMode )
255
255
}
@@ -369,7 +369,7 @@ func (o OperatorInstaller) waitForInstallPlan(ctx context.Context, sub *v1alpha1
369
369
return nil
370
370
}
371
371
372
- func (o * OperatorInstaller ) getTargetNamespaces (supported sets .Set [string ]) ([]string , error ) {
372
+ func (o * OperatorInstaller ) getTargetNamespaces (supported set .Set [string ]) ([]string , error ) {
373
373
switch {
374
374
case supported .Has (string (v1alpha1 .InstallModeTypeAllNamespaces )):
375
375
return nil , nil
0 commit comments