diff --git a/bootstrap/kubeadm/main.go b/bootstrap/kubeadm/main.go index be9af4726953..1dfc0d66e90f 100644 --- a/bootstrap/kubeadm/main.go +++ b/bootstrap/kubeadm/main.go @@ -34,9 +34,9 @@ import ( clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" kubeadmbootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" kubeadmbootstrapcontrollers "sigs.k8s.io/cluster-api/bootstrap/kubeadm/controllers" - "sigs.k8s.io/cluster-api/cmd/version" expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" "sigs.k8s.io/cluster-api/feature" + "sigs.k8s.io/cluster-api/util/version" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" diff --git a/cmd/clusterctl/client/cluster/proxy.go b/cmd/clusterctl/client/cluster/proxy.go index 88d7c20535ef..7f9267cebe00 100644 --- a/cmd/clusterctl/client/cluster/proxy.go +++ b/cmd/clusterctl/client/cluster/proxy.go @@ -31,7 +31,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/scheme" - "sigs.k8s.io/cluster-api/cmd/version" + "sigs.k8s.io/cluster-api/util/version" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/cmd/clusterctl/client/cluster/proxy_test.go b/cmd/clusterctl/client/cluster/proxy_test.go index 0ffd8245b4dd..63319bcfb827 100644 --- a/cmd/clusterctl/client/cluster/proxy_test.go +++ b/cmd/clusterctl/client/cluster/proxy_test.go @@ -26,7 +26,7 @@ import ( . "github.com/onsi/gomega" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" - "sigs.k8s.io/cluster-api/cmd/version" + "sigs.k8s.io/cluster-api/util/version" ) var _ Proxy = &test.FakeProxy{} diff --git a/cmd/clusterctl/cmd/version.go b/cmd/clusterctl/cmd/version.go index 1935fb332440..e041d9a6fa02 100644 --- a/cmd/clusterctl/cmd/version.go +++ b/cmd/clusterctl/cmd/version.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "sigs.k8s.io/cluster-api/cmd/version" + "sigs.k8s.io/cluster-api/util/version" "sigs.k8s.io/yaml" ) diff --git a/cmd/clusterctl/cmd/version_checker.go b/cmd/clusterctl/cmd/version_checker.go index 4ab6e396a8d8..fbcf3b249998 100644 --- a/cmd/clusterctl/cmd/version_checker.go +++ b/cmd/clusterctl/cmd/version_checker.go @@ -33,7 +33,7 @@ import ( "k8s.io/client-go/util/homedir" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" - "sigs.k8s.io/cluster-api/cmd/version" + "sigs.k8s.io/cluster-api/util/version" "sigs.k8s.io/yaml" ) diff --git a/cmd/clusterctl/cmd/version_checker_test.go b/cmd/clusterctl/cmd/version_checker_test.go index 135f7680e736..5de6568001e5 100644 --- a/cmd/clusterctl/cmd/version_checker_test.go +++ b/cmd/clusterctl/cmd/version_checker_test.go @@ -28,7 +28,7 @@ import ( . "github.com/onsi/gomega" "k8s.io/client-go/util/homedir" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" - "sigs.k8s.io/cluster-api/cmd/version" + "sigs.k8s.io/cluster-api/util/version" "sigs.k8s.io/yaml" ) diff --git a/controlplane/kubeadm/main.go b/controlplane/kubeadm/main.go index cc5f5380bbff..488053b015d6 100644 --- a/controlplane/kubeadm/main.go +++ b/controlplane/kubeadm/main.go @@ -33,9 +33,9 @@ import ( "k8s.io/klog/klogr" clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" kubeadmbootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - "sigs.k8s.io/cluster-api/cmd/version" kcpv1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" kubeadmcontrolplanecontrollers "sigs.k8s.io/cluster-api/controlplane/kubeadm/controllers" + "sigs.k8s.io/cluster-api/util/version" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" diff --git a/hack/version.sh b/hack/version.sh index a81d7783457b..a7a78d18f9ee 100755 --- a/hack/version.sh +++ b/hack/version.sh @@ -85,7 +85,7 @@ version::ldflags() { local key=${1} local val=${2} ldflags+=( - "-X 'sigs.k8s.io/cluster-api/cmd/version.${key}=${val}'" + "-X 'sigs.k8s.io/cluster-api/util/version.${key}=${val}'" ) } diff --git a/main.go b/main.go index 1730cb7a6eaa..e229fb6d609a 100644 --- a/main.go +++ b/main.go @@ -32,7 +32,6 @@ import ( "k8s.io/klog" "k8s.io/klog/klogr" clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/cmd/version" "sigs.k8s.io/cluster-api/controllers" "sigs.k8s.io/cluster-api/controllers/remote" addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" @@ -40,6 +39,7 @@ import ( expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" expcontrollers "sigs.k8s.io/cluster-api/exp/controllers" "sigs.k8s.io/cluster-api/feature" + "sigs.k8s.io/cluster-api/util/version" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" diff --git a/cmd/version/version.go b/util/version/version.go similarity index 100% rename from cmd/version/version.go rename to util/version/version.go