diff --git a/internal/controller/cluster_controller.go b/internal/controller/cluster_controller.go index e4d31145..1a20b8d8 100644 --- a/internal/controller/cluster_controller.go +++ b/internal/controller/cluster_controller.go @@ -18,7 +18,6 @@ package controller import ( "context" - "github.com/giantswarm/teleport-operator/internal/pkg/config" "time" "github.com/giantswarm/microerror" @@ -28,6 +27,7 @@ import ( capi "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" + "github.com/giantswarm/teleport-operator/internal/pkg/config" "github.com/giantswarm/teleport-operator/internal/pkg/key" "github.com/giantswarm/teleport-operator/internal/pkg/teleport" diff --git a/internal/controller/cluster_controller_test.go b/internal/controller/cluster_controller_test.go index a55350c2..a49bf35d 100644 --- a/internal/controller/cluster_controller_test.go +++ b/internal/controller/cluster_controller_test.go @@ -3,7 +3,6 @@ package controller import ( "context" "errors" - "github.com/giantswarm/teleport-operator/internal/pkg/config" "testing" "time" @@ -17,6 +16,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "github.com/giantswarm/teleport-operator/internal/pkg/config" "github.com/giantswarm/teleport-operator/internal/pkg/key" "github.com/giantswarm/teleport-operator/internal/pkg/teleport" "github.com/giantswarm/teleport-operator/internal/pkg/test" diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go index 6c2bbc9e..4c05c6c3 100644 --- a/internal/pkg/config/config.go +++ b/internal/pkg/config/config.go @@ -3,11 +3,13 @@ package config import ( "context" "fmt" + "github.com/giantswarm/microerror" - "github.com/giantswarm/teleport-operator/internal/pkg/key" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/giantswarm/teleport-operator/internal/pkg/key" ) type Config struct { diff --git a/internal/pkg/config/config_test.go b/internal/pkg/config/config_test.go index 82391647..e54933a9 100644 --- a/internal/pkg/config/config_test.go +++ b/internal/pkg/config/config_test.go @@ -2,12 +2,14 @@ package config import ( "context" - "github.com/giantswarm/teleport-operator/internal/pkg/key" - "github.com/giantswarm/teleport-operator/internal/pkg/test" + "testing" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "testing" + + "github.com/giantswarm/teleport-operator/internal/pkg/key" + "github.com/giantswarm/teleport-operator/internal/pkg/test" ) func Test_GetConfigFromSecret(t *testing.T) { diff --git a/internal/pkg/config/identity.go b/internal/pkg/config/identity.go index 06b383cc..2431ed90 100644 --- a/internal/pkg/config/identity.go +++ b/internal/pkg/config/identity.go @@ -5,12 +5,14 @@ import ( "crypto/sha512" "encoding/hex" "fmt" + "time" + "github.com/giantswarm/microerror" - "github.com/giantswarm/teleport-operator/internal/pkg/key" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "time" + + "github.com/giantswarm/teleport-operator/internal/pkg/key" ) type IdentityConfig struct { diff --git a/internal/pkg/config/identity_test.go b/internal/pkg/config/identity_test.go index 39ee7c2a..51b29871 100644 --- a/internal/pkg/config/identity_test.go +++ b/internal/pkg/config/identity_test.go @@ -2,12 +2,14 @@ package config import ( "context" - "github.com/giantswarm/teleport-operator/internal/pkg/key" - "github.com/giantswarm/teleport-operator/internal/pkg/test" + "testing" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "testing" + + "github.com/giantswarm/teleport-operator/internal/pkg/key" + "github.com/giantswarm/teleport-operator/internal/pkg/test" ) func Test_GetIdentityConfigFromSecret(t *testing.T) { diff --git a/internal/pkg/teleport/configmap_test.go b/internal/pkg/teleport/configmap_test.go index 4bec86c7..97162c9e 100644 --- a/internal/pkg/teleport/configmap_test.go +++ b/internal/pkg/teleport/configmap_test.go @@ -2,7 +2,6 @@ package teleport import ( "context" - "github.com/giantswarm/teleport-operator/internal/pkg/config" "testing" corev1 "k8s.io/api/core/v1" @@ -12,6 +11,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "github.com/giantswarm/teleport-operator/internal/pkg/config" "github.com/giantswarm/teleport-operator/internal/pkg/key" "github.com/giantswarm/teleport-operator/internal/pkg/test" "github.com/giantswarm/teleport-operator/internal/pkg/token" diff --git a/internal/pkg/teleport/secret.go b/internal/pkg/teleport/secret.go index d7cd49ca..fe5d9094 100644 --- a/internal/pkg/teleport/secret.go +++ b/internal/pkg/teleport/secret.go @@ -3,6 +3,7 @@ package teleport import ( "context" "fmt" + "github.com/giantswarm/microerror" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" diff --git a/internal/pkg/teleport/secret_test.go b/internal/pkg/teleport/secret_test.go index d53e31be..1f9e0bf8 100644 --- a/internal/pkg/teleport/secret_test.go +++ b/internal/pkg/teleport/secret_test.go @@ -2,7 +2,6 @@ package teleport import ( "context" - "github.com/giantswarm/teleport-operator/internal/pkg/config" "testing" corev1 "k8s.io/api/core/v1" @@ -12,6 +11,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "github.com/giantswarm/teleport-operator/internal/pkg/config" "github.com/giantswarm/teleport-operator/internal/pkg/key" "github.com/giantswarm/teleport-operator/internal/pkg/test" "github.com/giantswarm/teleport-operator/internal/pkg/token" diff --git a/internal/pkg/teleport/token_test.go b/internal/pkg/teleport/token_test.go index 10442d6e..14260f49 100644 --- a/internal/pkg/teleport/token_test.go +++ b/internal/pkg/teleport/token_test.go @@ -2,12 +2,12 @@ package teleport import ( "context" - "github.com/giantswarm/teleport-operator/internal/pkg/config" "testing" "github.com/gravitational/teleport/api/types" ctrl "sigs.k8s.io/controller-runtime" + "github.com/giantswarm/teleport-operator/internal/pkg/config" "github.com/giantswarm/teleport-operator/internal/pkg/key" "github.com/giantswarm/teleport-operator/internal/pkg/test" "github.com/giantswarm/teleport-operator/internal/pkg/token" diff --git a/main.go b/main.go index 5319ff87..39a23b3f 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,6 @@ package main import ( "context" "flag" - "github.com/giantswarm/teleport-operator/internal/pkg/config" "os" // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) @@ -40,6 +39,7 @@ import ( capi "sigs.k8s.io/cluster-api/api/v1beta1" "github.com/giantswarm/teleport-operator/internal/controller" + "github.com/giantswarm/teleport-operator/internal/pkg/config" "github.com/giantswarm/teleport-operator/internal/pkg/teleport" "github.com/giantswarm/teleport-operator/internal/pkg/token" //+kubebuilder:scaffold:imports