Skip to content

Commit

Permalink
Remove utils.CreateOrUpdate
Browse files Browse the repository at this point in the history
...after the remaining call site is migrated to use
resource.CreateOrUpdate. Since there's no more functions in
createorupdate.go, remove the file.

Signed-off-by: Tom Pantelis <[email protected]>
  • Loading branch information
tpantelis authored and skitt committed Jan 11, 2022
1 parent 5ebab86 commit 073f1cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 35 deletions.
4 changes: 2 additions & 2 deletions pkg/subctl/operator/servicediscoverycr/ensure.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
submariner "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
submarinerClientset "github.com/submariner-io/submariner-operator/pkg/client/clientset/versioned"
"github.com/submariner-io/submariner-operator/pkg/names"
"github.com/submariner-io/submariner-operator/pkg/utils"
resourceutil "github.com/submariner-io/submariner-operator/pkg/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes/scheme"
Expand Down Expand Up @@ -55,7 +55,7 @@ func Ensure(config *rest.Config, namespace string, serviceDiscoverySpec *submari
}

// nolint:wrapcheck // No need to wrap errors here.
_, err = utils.CreateOrUpdate(context.TODO(), &resource.InterfaceFuncs{
_, err = resourceutil.CreateOrUpdate(context.TODO(), &resource.InterfaceFuncs{
GetFunc: func(ctx context.Context, name string, options metav1.GetOptions) (runtime.Object, error) {
return client.SubmarinerV1alpha1().ServiceDiscoveries(namespace).Get(ctx, name, options)
},
Expand Down
33 changes: 0 additions & 33 deletions pkg/utils/createorupdate.go

This file was deleted.

0 comments on commit 073f1cf

Please sign in to comment.