Skip to content

Commit

Permalink
Remove operatorclient package
Browse files Browse the repository at this point in the history
This package is no longer needed because we're using the generic operator client.
  • Loading branch information
bertinatto committed Nov 13, 2024
1 parent b4af17d commit 3a17021
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
3 changes: 1 addition & 2 deletions pkg/csoclients/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
cfginformers "github.com/openshift/client-go/config/informers/externalversions"
fakeop "github.com/openshift/client-go/operator/clientset/versioned/fake"
opinformers "github.com/openshift/client-go/operator/informers/externalversions"
"github.com/openshift/cluster-storage-operator/pkg/operatorclient"
"github.com/openshift/library-go/pkg/operator/v1helpers"
prominformer "github.com/prometheus-operator/prometheus-operator/pkg/client/informers/externalversions"
fakemonitoring "github.com/prometheus-operator/prometheus-operator/pkg/client/versioned/fake"
Expand Down Expand Up @@ -38,7 +37,7 @@ type CrModifier func(cr *opv1.Storage) *opv1.Storage

func GetCR(modifiers ...CrModifier) *opv1.Storage {
cr := &opv1.Storage{
ObjectMeta: metav1.ObjectMeta{Name: operatorclient.GlobalConfigName},
ObjectMeta: metav1.ObjectMeta{Name: "cluster"},
Spec: opv1.StorageSpec{
OperatorSpec: opv1.OperatorSpec{
ManagementState: opv1.Managed,
Expand Down
3 changes: 1 addition & 2 deletions pkg/operator/operator_starter.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/openshift/cluster-storage-operator/pkg/operator/csidriveroperator/csioperatorclient"
"github.com/openshift/cluster-storage-operator/pkg/operator/defaultstorageclass"
"github.com/openshift/cluster-storage-operator/pkg/operator/vsphereproblemdetector"
"github.com/openshift/cluster-storage-operator/pkg/operatorclient"
"github.com/openshift/library-go/pkg/controller/controllercmd"
"github.com/openshift/library-go/pkg/controller/factory"
"github.com/openshift/library-go/pkg/operator/configobserver/featuregates"
Expand Down Expand Up @@ -96,7 +95,7 @@ func (csr *commonStarter) CreateCommonControllers() error {
relatedObjects := []configv1.ObjectReference{
{Resource: "namespaces", Name: operatorNamespace},
{Resource: "namespaces", Name: csoclients.CSIOperatorNamespace},
{Group: operatorv1.GroupName, Resource: "storages", Name: operatorclient.GlobalConfigName},
{Group: operatorv1.GroupName, Resource: "storages", Name: "cluster"},
{Group: rbacv1.GroupName, Resource: "clusterrolebindings", Name: "cluster-storage-operator-role"},
}
clusterOperatorStatus := status.NewClusterOperatorStatusController(
Expand Down
15 changes: 0 additions & 15 deletions pkg/operatorclient/operatorclient.go

This file was deleted.

0 comments on commit 3a17021

Please sign in to comment.