Skip to content

Commit

Permalink
Reorganize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
afritzler committed Feb 28, 2024
1 parent eb1e0b5 commit a640158
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 21 deletions.
3 changes: 2 additions & 1 deletion pkg/apis/ironcore/validation/cloudprofile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ package validation

import (
"github.com/gardener/gardener/pkg/apis/core"
apisironcore "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gstruct"
"github.com/onsi/gomega/types"
"k8s.io/apimachinery/pkg/util/validation/field"
"k8s.io/utils/ptr"

apisironcore "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore"
)

func InvalidField(fld string) types.GomegaMatcher {
Expand Down
5 changes: 3 additions & 2 deletions pkg/controller/bastion/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
"github.com/ironcore-dev/controller-utils/buildutils"
"github.com/ironcore-dev/controller-utils/modutils"
controllerconfig "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/config"
apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
commonv1alpha1 "github.com/ironcore-dev/ironcore/api/common/v1alpha1"
computev1alpha1 "github.com/ironcore-dev/ironcore/api/compute/v1alpha1"
corev1alpha1 "github.com/ironcore-dev/ironcore/api/core/v1alpha1"
Expand All @@ -41,6 +39,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/manager"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

controllerconfig "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/config"
apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/controlplane/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
"github.com/ironcore-dev/controller-utils/buildutils"
"github.com/ironcore-dev/controller-utils/modutils"
ironcoreextensionv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
storagev1alpha1 "github.com/ironcore-dev/ironcore/api/storage/v1alpha1"
utilsenvtest "github.com/ironcore-dev/ironcore/utils/envtest"
"github.com/ironcore-dev/ironcore/utils/envtest/apiserver"
Expand All @@ -35,6 +34,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

ironcoreextensionv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
)

const (
Expand Down
7 changes: 4 additions & 3 deletions pkg/controller/controlplane/valuesprovider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import (
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
secretsmanager "github.com/gardener/gardener/pkg/utils/secrets/manager"
fakesecretsmanager "github.com/gardener/gardener/pkg/utils/secrets/manager/fake"
apisironcore "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/internal"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore"
"github.com/ironcore-dev/ironcore/api/common/v1alpha1"
corev1alpha1 "github.com/ironcore-dev/ironcore/api/core/v1alpha1"
storagev1alpha1 "github.com/ironcore-dev/ironcore/api/storage/v1alpha1"
Expand All @@ -31,6 +28,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake"
. "sigs.k8s.io/controller-runtime/pkg/envtest/komega"

apisironcore "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/internal"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore"
)

var _ = Describe("Valueprovider Reconcile", func() {
Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/healthcheck/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ import (
extensionspredicate "github.com/gardener/gardener/extensions/pkg/predicate"
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/predicate"

"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore"
)

var (
Expand Down
9 changes: 5 additions & 4 deletions pkg/controller/infrastructure/actuator_reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ import (
"github.com/gardener/gardener/extensions/pkg/controller"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
"github.com/go-logr/logr"
api "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/helper"
apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore"
"github.com/ironcore-dev/ironcore/api/common/v1alpha1"
ipamv1alpha1 "github.com/ironcore-dev/ironcore/api/ipam/v1alpha1"
networkingv1alpha1 "github.com/ironcore-dev/ironcore/api/networking/v1alpha1"
Expand All @@ -23,6 +19,11 @@ import (
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"

api "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/helper"
apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/infrastructure/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
"github.com/ironcore-dev/controller-utils/buildutils"
"github.com/ironcore-dev/controller-utils/modutils"
apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
computev1alpha1 "github.com/ironcore-dev/ironcore/api/compute/v1alpha1"
ipamv1alpha1 "github.com/ironcore-dev/ironcore/api/ipam/v1alpha1"
networkingv1alpha1 "github.com/ironcore-dev/ironcore/api/networking/v1alpha1"
Expand All @@ -36,6 +35,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/manager"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/worker/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import (

"github.com/gardener/gardener/extensions/pkg/controller/worker"
machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore"
apiextensionsscheme "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/cluster"
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/manager"

"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions pkg/controller/worker/machine_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import (
"github.com/gardener/gardener/extensions/pkg/controller/worker"
v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants"
kutil "github.com/gardener/gardener/pkg/utils/kubernetes"
apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore/helper"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"

apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore/helper"
)

// UpdateMachineImagesStatus updates the machine image status
Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/worker/machine_images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
package worker

import (
apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
commonv1alpha1 "github.com/ironcore-dev/ironcore/api/common/v1alpha1"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand All @@ -14,6 +13,8 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"

apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
)

var _ = Describe("MachinesImages", func() {
Expand Down
5 changes: 3 additions & 2 deletions pkg/controller/worker/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ import (
v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants"
"github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
machinecontrollerv1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1"
ironcoreextensionv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"

ironcoreextensionv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
"github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/ironcore"
)

// DeployMachineClasses generates and creates the ironcore specific machine classes.
Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/worker/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
gardener "github.com/gardener/gardener/pkg/client/kubernetes"
machinescheme "github.com/gardener/machine-controller-manager/pkg/client/clientset/versioned/scheme"
"github.com/ironcore-dev/controller-utils/modutils"
apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
networkingv1alpha1 "github.com/ironcore-dev/ironcore/api/networking/v1alpha1"
envtestutils "github.com/ironcore-dev/ironcore/utils/envtest"
. "github.com/onsi/ginkgo/v2"
Expand All @@ -35,6 +34,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/envtest/komega"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion pkg/ironcore/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ package helper
import (
"fmt"

"k8s.io/utils/ptr"

api "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore"
apiv1alpha1 "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/v1alpha1"
"k8s.io/utils/ptr"
)

// FindMachineImage takes a list of machine images and tries to find the first entry
Expand Down

0 comments on commit a640158

Please sign in to comment.