Skip to content

Commit

Permalink
use metav1 instead of v1 in import
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Dettori <[email protected]>
  • Loading branch information
pdettori committed Dec 16, 2024
1 parent 8eabbb7 commit 756f7b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/kflex/common/cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"strings"

v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

tenancyv1alpha1 "github.com/kubestellar/kubeflex/api/v1alpha1"
"github.com/kubestellar/kubeflex/pkg/util"
Expand All @@ -34,7 +34,7 @@ type CP struct {

func GenerateControlPlane(name, controlPlaneType, backendType, hook string, hookVars []string) *tenancyv1alpha1.ControlPlane {
cp := &tenancyv1alpha1.ControlPlane{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
Spec: tenancyv1alpha1.ControlPlaneSpec{
Expand Down
4 changes: 2 additions & 2 deletions cmd/kflex/ctx/ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
kfclient "github.com/kubestellar/kubeflex/pkg/client"
"github.com/kubestellar/kubeflex/pkg/kubeconfig"
"github.com/kubestellar/kubeflex/pkg/util"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/clientcmd/api"
"sigs.k8s.io/controller-runtime/pkg/client"
)
Expand Down Expand Up @@ -132,7 +132,7 @@ func (c *CPCtx) loadAndMergeFromServer(kconfig *api.Config) error {
kfcClient := *kfcClientp

cp := &tenancyv1alpha1.ControlPlane{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: c.CP.Name,
},
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/kflex/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"sync"

tenancyv1alpha1 "github.com/kubestellar/kubeflex/api/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"sigs.k8s.io/controller-runtime/pkg/client"

Expand All @@ -40,7 +40,7 @@ type CPDelete struct {
func (c *CPDelete) Delete(chattyStatus bool) {
done := make(chan bool)
cp := &tenancyv1alpha1.ControlPlane{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: c.Name,
},
}
Expand Down

0 comments on commit 756f7b7

Please sign in to comment.