diff --git a/Makefile b/Makefile index ed599819c..dbace9a6e 100644 --- a/Makefile +++ b/Makefile @@ -223,10 +223,10 @@ ifneq ($(GIT_TAG),) VERSION = ${GIT_TAG} endif -LDFLAGS += -X github.com/kubesphere/kubekey/version.version=${VERSION} -LDFLAGS += -X github.com/kubesphere/kubekey/version.metadata=${VERSION_METADATA} -LDFLAGS += -X github.com/kubesphere/kubekey/version.gitCommit=${GIT_COMMIT} -LDFLAGS += -X github.com/kubesphere/kubekey/version.gitTreeState=${GIT_DIRTY} +LDFLAGS += -X github.com/kubesphere/kubekey/v2/version.version=${VERSION} +LDFLAGS += -X github.com/kubesphere/kubekey/v2/version.metadata=${VERSION_METADATA} +LDFLAGS += -X github.com/kubesphere/kubekey/v2/version.gitCommit=${GIT_COMMIT} +LDFLAGS += -X github.com/kubesphere/kubekey/v2/version.gitTreeState=${GIT_DIRTY} # see kk binary: diff --git a/apis/kubekey/v1alpha1/cluster_types.go b/apis/kubekey/v1alpha1/cluster_types.go index fabda9392..0d88efc5d 100644 --- a/apis/kubekey/v1alpha1/cluster_types.go +++ b/apis/kubekey/v1alpha1/cluster_types.go @@ -22,10 +22,11 @@ import ( "strconv" "strings" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/util" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! diff --git a/apis/kubekey/v1alpha1/default.go b/apis/kubekey/v1alpha1/default.go index 4f1f9cc43..f1befa02a 100644 --- a/apis/kubekey/v1alpha1/default.go +++ b/apis/kubekey/v1alpha1/default.go @@ -21,7 +21,7 @@ import ( "os" "strings" - "github.com/kubesphere/kubekey/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) const ( diff --git a/apis/kubekey/v1alpha2/cluster_types.go b/apis/kubekey/v1alpha2/cluster_types.go index 26fad0901..232e879ab 100644 --- a/apis/kubekey/v1alpha2/cluster_types.go +++ b/apis/kubekey/v1alpha2/cluster_types.go @@ -22,13 +22,13 @@ import ( "strconv" "strings" - "github.com/kubesphere/kubekey/pkg/core/connector" - - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/util" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! diff --git a/apis/kubekey/v1alpha2/default.go b/apis/kubekey/v1alpha2/default.go index e890286af..34bbeddf7 100644 --- a/apis/kubekey/v1alpha2/default.go +++ b/apis/kubekey/v1alpha2/default.go @@ -21,7 +21,7 @@ import ( "os" "strings" - "github.com/kubesphere/kubekey/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) const ( diff --git a/clients/clientset/versioned/clientset.go b/clients/clientset/versioned/clientset.go index 3680bd882..f0ad18957 100644 --- a/clients/clientset/versioned/clientset.go +++ b/clients/clientset/versioned/clientset.go @@ -20,8 +20,8 @@ package versioned import ( "fmt" - kubekeyv1alpha1 "github.com/kubesphere/kubekey/clients/clientset/versioned/typed/kubekey/v1alpha1" - kubekeyv1alpha2 "github.com/kubesphere/kubekey/clients/clientset/versioned/typed/kubekey/v1alpha2" + kubekeyv1alpha1 "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/typed/kubekey/v1alpha1" + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/typed/kubekey/v1alpha2" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" diff --git a/clients/clientset/versioned/fake/clientset_generated.go b/clients/clientset/versioned/fake/clientset_generated.go index 1361087a3..9177141cb 100644 --- a/clients/clientset/versioned/fake/clientset_generated.go +++ b/clients/clientset/versioned/fake/clientset_generated.go @@ -18,11 +18,11 @@ limitations under the License. package fake import ( - clientset "github.com/kubesphere/kubekey/clients/clientset/versioned" - kubekeyv1alpha1 "github.com/kubesphere/kubekey/clients/clientset/versioned/typed/kubekey/v1alpha1" - fakekubekeyv1alpha1 "github.com/kubesphere/kubekey/clients/clientset/versioned/typed/kubekey/v1alpha1/fake" - kubekeyv1alpha2 "github.com/kubesphere/kubekey/clients/clientset/versioned/typed/kubekey/v1alpha2" - fakekubekeyv1alpha2 "github.com/kubesphere/kubekey/clients/clientset/versioned/typed/kubekey/v1alpha2/fake" + clientset "github.com/kubesphere/kubekey/v2/clients/clientset/versioned" + kubekeyv1alpha1 "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/typed/kubekey/v1alpha1" + fakekubekeyv1alpha1 "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/typed/kubekey/v1alpha1/fake" + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/typed/kubekey/v1alpha2" + fakekubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/typed/kubekey/v1alpha2/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" diff --git a/clients/clientset/versioned/fake/register.go b/clients/clientset/versioned/fake/register.go index 06bd088b7..b839dfd75 100644 --- a/clients/clientset/versioned/fake/register.go +++ b/clients/clientset/versioned/fake/register.go @@ -18,8 +18,8 @@ limitations under the License. package fake import ( - kubekeyv1alpha1 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha1" - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" + kubekeyv1alpha1 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha1" + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/clients/clientset/versioned/scheme/register.go b/clients/clientset/versioned/scheme/register.go index a8226fd7d..01a24006e 100644 --- a/clients/clientset/versioned/scheme/register.go +++ b/clients/clientset/versioned/scheme/register.go @@ -18,8 +18,8 @@ limitations under the License. package scheme import ( - kubekeyv1alpha1 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha1" - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" + kubekeyv1alpha1 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha1" + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/clients/clientset/versioned/typed/kubekey/v1alpha1/cluster.go b/clients/clientset/versioned/typed/kubekey/v1alpha1/cluster.go index e1994ec42..6a9e73da4 100644 --- a/clients/clientset/versioned/typed/kubekey/v1alpha1/cluster.go +++ b/clients/clientset/versioned/typed/kubekey/v1alpha1/cluster.go @@ -21,8 +21,8 @@ import ( "context" "time" - v1alpha1 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha1" - scheme "github.com/kubesphere/kubekey/clients/clientset/versioned/scheme" + v1alpha1 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha1" + scheme "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/clients/clientset/versioned/typed/kubekey/v1alpha1/fake/fake_cluster.go b/clients/clientset/versioned/typed/kubekey/v1alpha1/fake/fake_cluster.go index 39f686a6b..c9369e63a 100644 --- a/clients/clientset/versioned/typed/kubekey/v1alpha1/fake/fake_cluster.go +++ b/clients/clientset/versioned/typed/kubekey/v1alpha1/fake/fake_cluster.go @@ -20,7 +20,7 @@ package fake import ( "context" - v1alpha1 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha1" + v1alpha1 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/clients/clientset/versioned/typed/kubekey/v1alpha1/fake/fake_kubekey_client.go b/clients/clientset/versioned/typed/kubekey/v1alpha1/fake/fake_kubekey_client.go index b6c513797..9521d7edd 100644 --- a/clients/clientset/versioned/typed/kubekey/v1alpha1/fake/fake_kubekey_client.go +++ b/clients/clientset/versioned/typed/kubekey/v1alpha1/fake/fake_kubekey_client.go @@ -18,7 +18,7 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/kubesphere/kubekey/clients/clientset/versioned/typed/kubekey/v1alpha1" + v1alpha1 "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/typed/kubekey/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) diff --git a/clients/clientset/versioned/typed/kubekey/v1alpha1/kubekey_client.go b/clients/clientset/versioned/typed/kubekey/v1alpha1/kubekey_client.go index c18e47ea4..24e6bcbf4 100644 --- a/clients/clientset/versioned/typed/kubekey/v1alpha1/kubekey_client.go +++ b/clients/clientset/versioned/typed/kubekey/v1alpha1/kubekey_client.go @@ -18,8 +18,8 @@ limitations under the License. package v1alpha1 import ( - v1alpha1 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha1" - "github.com/kubesphere/kubekey/clients/clientset/versioned/scheme" + v1alpha1 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha1" + "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) diff --git a/clients/clientset/versioned/typed/kubekey/v1alpha2/cluster.go b/clients/clientset/versioned/typed/kubekey/v1alpha2/cluster.go index 1ef73ea8b..412a993de 100644 --- a/clients/clientset/versioned/typed/kubekey/v1alpha2/cluster.go +++ b/clients/clientset/versioned/typed/kubekey/v1alpha2/cluster.go @@ -21,8 +21,8 @@ import ( "context" "time" - v1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - scheme "github.com/kubesphere/kubekey/clients/clientset/versioned/scheme" + v1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + scheme "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/clients/clientset/versioned/typed/kubekey/v1alpha2/fake/fake_cluster.go b/clients/clientset/versioned/typed/kubekey/v1alpha2/fake/fake_cluster.go index e4638fc9f..017bc3344 100644 --- a/clients/clientset/versioned/typed/kubekey/v1alpha2/fake/fake_cluster.go +++ b/clients/clientset/versioned/typed/kubekey/v1alpha2/fake/fake_cluster.go @@ -20,7 +20,7 @@ package fake import ( "context" - v1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" + v1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/clients/clientset/versioned/typed/kubekey/v1alpha2/fake/fake_kubekey_client.go b/clients/clientset/versioned/typed/kubekey/v1alpha2/fake/fake_kubekey_client.go index 669271aa8..64926cabc 100644 --- a/clients/clientset/versioned/typed/kubekey/v1alpha2/fake/fake_kubekey_client.go +++ b/clients/clientset/versioned/typed/kubekey/v1alpha2/fake/fake_kubekey_client.go @@ -18,7 +18,7 @@ limitations under the License. package fake import ( - v1alpha2 "github.com/kubesphere/kubekey/clients/clientset/versioned/typed/kubekey/v1alpha2" + v1alpha2 "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/typed/kubekey/v1alpha2" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) diff --git a/clients/clientset/versioned/typed/kubekey/v1alpha2/kubekey_client.go b/clients/clientset/versioned/typed/kubekey/v1alpha2/kubekey_client.go index 5a8be74f4..f9590b752 100644 --- a/clients/clientset/versioned/typed/kubekey/v1alpha2/kubekey_client.go +++ b/clients/clientset/versioned/typed/kubekey/v1alpha2/kubekey_client.go @@ -18,8 +18,8 @@ limitations under the License. package v1alpha2 import ( - v1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/clients/clientset/versioned/scheme" + v1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/clients/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) diff --git a/clients/informers/externalversions/factory.go b/clients/informers/externalversions/factory.go index 84ace3212..925790424 100644 --- a/clients/informers/externalversions/factory.go +++ b/clients/informers/externalversions/factory.go @@ -22,9 +22,9 @@ import ( sync "sync" time "time" - versioned "github.com/kubesphere/kubekey/clients/clientset/versioned" - internalinterfaces "github.com/kubesphere/kubekey/clients/informers/externalversions/internalinterfaces" - kubekey "github.com/kubesphere/kubekey/clients/informers/externalversions/kubekey" + versioned "github.com/kubesphere/kubekey/v2/clients/clientset/versioned" + internalinterfaces "github.com/kubesphere/kubekey/v2/clients/informers/externalversions/internalinterfaces" + kubekey "github.com/kubesphere/kubekey/v2/clients/informers/externalversions/kubekey" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/clients/informers/externalversions/generic.go b/clients/informers/externalversions/generic.go index b998ff4b0..38c1b8104 100644 --- a/clients/informers/externalversions/generic.go +++ b/clients/informers/externalversions/generic.go @@ -20,8 +20,8 @@ package externalversions import ( "fmt" - v1alpha1 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha1" - v1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" + v1alpha1 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha1" + v1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) diff --git a/clients/informers/externalversions/internalinterfaces/factory_interfaces.go b/clients/informers/externalversions/internalinterfaces/factory_interfaces.go index 5066b5f21..60e47ec1c 100644 --- a/clients/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/clients/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -20,7 +20,7 @@ package internalinterfaces import ( time "time" - versioned "github.com/kubesphere/kubekey/clients/clientset/versioned" + versioned "github.com/kubesphere/kubekey/v2/clients/clientset/versioned" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" cache "k8s.io/client-go/tools/cache" diff --git a/clients/informers/externalversions/kubekey/interface.go b/clients/informers/externalversions/kubekey/interface.go index 5f854fae8..3ee668901 100644 --- a/clients/informers/externalversions/kubekey/interface.go +++ b/clients/informers/externalversions/kubekey/interface.go @@ -18,9 +18,9 @@ limitations under the License. package kubekey import ( - internalinterfaces "github.com/kubesphere/kubekey/clients/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubesphere/kubekey/clients/informers/externalversions/kubekey/v1alpha1" - v1alpha2 "github.com/kubesphere/kubekey/clients/informers/externalversions/kubekey/v1alpha2" + internalinterfaces "github.com/kubesphere/kubekey/v2/clients/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/kubesphere/kubekey/v2/clients/informers/externalversions/kubekey/v1alpha1" + v1alpha2 "github.com/kubesphere/kubekey/v2/clients/informers/externalversions/kubekey/v1alpha2" ) // Interface provides access to each of this group's versions. diff --git a/clients/informers/externalversions/kubekey/v1alpha1/cluster.go b/clients/informers/externalversions/kubekey/v1alpha1/cluster.go index 7a65aa9d1..4cf2ed621 100644 --- a/clients/informers/externalversions/kubekey/v1alpha1/cluster.go +++ b/clients/informers/externalversions/kubekey/v1alpha1/cluster.go @@ -21,10 +21,10 @@ import ( "context" time "time" - kubekeyv1alpha1 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha1" - versioned "github.com/kubesphere/kubekey/clients/clientset/versioned" - internalinterfaces "github.com/kubesphere/kubekey/clients/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubesphere/kubekey/clients/listers/kubekey/v1alpha1" + kubekeyv1alpha1 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha1" + versioned "github.com/kubesphere/kubekey/v2/clients/clientset/versioned" + internalinterfaces "github.com/kubesphere/kubekey/v2/clients/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/kubesphere/kubekey/v2/clients/listers/kubekey/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/clients/informers/externalversions/kubekey/v1alpha1/interface.go b/clients/informers/externalversions/kubekey/v1alpha1/interface.go index 9f37bb388..582a9f1c3 100644 --- a/clients/informers/externalversions/kubekey/v1alpha1/interface.go +++ b/clients/informers/externalversions/kubekey/v1alpha1/interface.go @@ -18,7 +18,7 @@ limitations under the License. package v1alpha1 import ( - internalinterfaces "github.com/kubesphere/kubekey/clients/informers/externalversions/internalinterfaces" + internalinterfaces "github.com/kubesphere/kubekey/v2/clients/informers/externalversions/internalinterfaces" ) // Interface provides access to all the informers in this group version. diff --git a/clients/informers/externalversions/kubekey/v1alpha2/cluster.go b/clients/informers/externalversions/kubekey/v1alpha2/cluster.go index dc63f9349..6e5006c95 100644 --- a/clients/informers/externalversions/kubekey/v1alpha2/cluster.go +++ b/clients/informers/externalversions/kubekey/v1alpha2/cluster.go @@ -21,10 +21,10 @@ import ( "context" time "time" - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - versioned "github.com/kubesphere/kubekey/clients/clientset/versioned" - internalinterfaces "github.com/kubesphere/kubekey/clients/informers/externalversions/internalinterfaces" - v1alpha2 "github.com/kubesphere/kubekey/clients/listers/kubekey/v1alpha2" + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + versioned "github.com/kubesphere/kubekey/v2/clients/clientset/versioned" + internalinterfaces "github.com/kubesphere/kubekey/v2/clients/informers/externalversions/internalinterfaces" + v1alpha2 "github.com/kubesphere/kubekey/v2/clients/listers/kubekey/v1alpha2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/clients/informers/externalversions/kubekey/v1alpha2/interface.go b/clients/informers/externalversions/kubekey/v1alpha2/interface.go index da7235cda..540785b03 100644 --- a/clients/informers/externalversions/kubekey/v1alpha2/interface.go +++ b/clients/informers/externalversions/kubekey/v1alpha2/interface.go @@ -18,7 +18,7 @@ limitations under the License. package v1alpha2 import ( - internalinterfaces "github.com/kubesphere/kubekey/clients/informers/externalversions/internalinterfaces" + internalinterfaces "github.com/kubesphere/kubekey/v2/clients/informers/externalversions/internalinterfaces" ) // Interface provides access to all the informers in this group version. diff --git a/clients/listers/kubekey/v1alpha1/cluster.go b/clients/listers/kubekey/v1alpha1/cluster.go index cc4ebc2b5..5f2b7cbf9 100644 --- a/clients/listers/kubekey/v1alpha1/cluster.go +++ b/clients/listers/kubekey/v1alpha1/cluster.go @@ -18,7 +18,7 @@ limitations under the License. package v1alpha1 import ( - v1alpha1 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha1" + v1alpha1 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/clients/listers/kubekey/v1alpha2/cluster.go b/clients/listers/kubekey/v1alpha2/cluster.go index 3d6161b36..52648c216 100644 --- a/clients/listers/kubekey/v1alpha2/cluster.go +++ b/clients/listers/kubekey/v1alpha2/cluster.go @@ -18,7 +18,7 @@ limitations under the License. package v1alpha2 import ( - v1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" + v1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/cmd/ctl/add/add.go b/cmd/ctl/add/add.go index 06931397f..1750206ad 100644 --- a/cmd/ctl/add/add.go +++ b/cmd/ctl/add/add.go @@ -17,8 +17,9 @@ package add import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" ) type AddOptions struct { diff --git a/cmd/ctl/add/add_nodes.go b/cmd/ctl/add/add_nodes.go index cff33ba06..542970bf0 100644 --- a/cmd/ctl/add/add_nodes.go +++ b/cmd/ctl/add/add_nodes.go @@ -17,11 +17,12 @@ limitations under the License. package add import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/pipelines" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/pipelines" ) type AddNodesOptions struct { diff --git a/cmd/ctl/artifact/artifact.go b/cmd/ctl/artifact/artifact.go index 36dad786b..6c298aecf 100755 --- a/cmd/ctl/artifact/artifact.go +++ b/cmd/ctl/artifact/artifact.go @@ -17,9 +17,10 @@ package artifact import ( - "github.com/kubesphere/kubekey/cmd/ctl/artifact/images" - "github.com/kubesphere/kubekey/cmd/ctl/options" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/artifact/images" + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" ) type ArtifactOptions struct { diff --git a/cmd/ctl/artifact/export.go b/cmd/ctl/artifact/export.go index 5e06fea50..f10d4858e 100644 --- a/cmd/ctl/artifact/export.go +++ b/cmd/ctl/artifact/export.go @@ -18,11 +18,13 @@ package artifact import ( "fmt" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/pipelines" + "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/pipelines" ) type ArtifactExportOptions struct { diff --git a/cmd/ctl/artifact/images/images.go b/cmd/ctl/artifact/images/images.go index 2cc45c3d1..8b3ca65b3 100644 --- a/cmd/ctl/artifact/images/images.go +++ b/cmd/ctl/artifact/images/images.go @@ -17,8 +17,9 @@ package images import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" ) type ArtifactImagesOptions struct { diff --git a/cmd/ctl/artifact/images/push.go b/cmd/ctl/artifact/images/push.go index 01ca9563f..c98b452df 100644 --- a/cmd/ctl/artifact/images/push.go +++ b/cmd/ctl/artifact/images/push.go @@ -17,19 +17,21 @@ package images import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/artifact" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/filesystem" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/pkg/errors" - "github.com/spf13/cobra" "os" "path/filepath" + + "github.com/pkg/errors" + "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/artifact" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/filesystem" + "github.com/kubesphere/kubekey/v2/pkg/images" ) type ArtifactImagesPushOptions struct { diff --git a/cmd/ctl/artifact/import.go b/cmd/ctl/artifact/import.go index adf07fe3b..acd2c331d 100755 --- a/cmd/ctl/artifact/import.go +++ b/cmd/ctl/artifact/import.go @@ -19,11 +19,12 @@ package artifact import ( "errors" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/phase/artifact" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/phase/artifact" ) type ArtifactImportOptions struct { diff --git a/cmd/ctl/cert/cert.go b/cmd/ctl/cert/cert.go index 8e6379850..5b19ac8cf 100644 --- a/cmd/ctl/cert/cert.go +++ b/cmd/ctl/cert/cert.go @@ -17,8 +17,9 @@ limitations under the License. package cert import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" ) type CertOptions struct { diff --git a/cmd/ctl/cert/list_cert.go b/cmd/ctl/cert/list_cert.go index 25f5504e6..8ce899e2c 100644 --- a/cmd/ctl/cert/list_cert.go +++ b/cmd/ctl/cert/list_cert.go @@ -17,11 +17,12 @@ limitations under the License. package cert import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/pipelines" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/pipelines" ) type CertListOptions struct { diff --git a/cmd/ctl/cert/renew_cert.go b/cmd/ctl/cert/renew_cert.go index e2f5f50ef..132f7197e 100644 --- a/cmd/ctl/cert/renew_cert.go +++ b/cmd/ctl/cert/renew_cert.go @@ -17,11 +17,12 @@ limitations under the License. package cert import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/pipelines" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/pipelines" ) type CertRenewOptions struct { diff --git a/cmd/ctl/completion/completion.go b/cmd/ctl/completion/completion.go index 9f493bef3..51f82590e 100644 --- a/cmd/ctl/completion/completion.go +++ b/cmd/ctl/completion/completion.go @@ -18,8 +18,10 @@ package completion import ( "fmt" - "github.com/kubesphere/kubekey/cmd/ctl/util" + "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" ) // CompletionOptions is the option of completion command diff --git a/cmd/ctl/create/cluster.go b/cmd/ctl/create/cluster.go index ea5ead6d5..c70a2f056 100644 --- a/cmd/ctl/create/cluster.go +++ b/cmd/ctl/create/cluster.go @@ -20,13 +20,14 @@ import ( "fmt" "time" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/pipelines" - "github.com/kubesphere/kubekey/pkg/version/kubernetes" - "github.com/kubesphere/kubekey/pkg/version/kubesphere" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/pipelines" + "github.com/kubesphere/kubekey/v2/pkg/version/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" ) type CreateClusterOptions struct { diff --git a/cmd/ctl/create/config.go b/cmd/ctl/create/config.go index 27fb899b4..520009e7a 100644 --- a/cmd/ctl/create/config.go +++ b/cmd/ctl/create/config.go @@ -17,15 +17,15 @@ limitations under the License. package create import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/config" - "github.com/kubesphere/kubekey/pkg/version/kubesphere" - "fmt" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/config" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" ) type CreateConfigOptions struct { diff --git a/cmd/ctl/create/create.go b/cmd/ctl/create/create.go index f5c83ff70..83c8a5bf0 100644 --- a/cmd/ctl/create/create.go +++ b/cmd/ctl/create/create.go @@ -17,9 +17,10 @@ limitations under the License. package create import ( - "github.com/kubesphere/kubekey/cmd/ctl/create/phase" - "github.com/kubesphere/kubekey/cmd/ctl/options" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/create/phase" + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" ) type CreateOptions struct { diff --git a/cmd/ctl/create/manifest.go b/cmd/ctl/create/manifest.go index 53f06d0a4..3ec0a6c60 100644 --- a/cmd/ctl/create/manifest.go +++ b/cmd/ctl/create/manifest.go @@ -18,16 +18,18 @@ package create import ( "fmt" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/artifact" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/pkg/errors" - "github.com/spf13/cobra" - "k8s.io/client-go/util/homedir" "os" "path/filepath" "strings" + + "github.com/pkg/errors" + "github.com/spf13/cobra" + "k8s.io/client-go/util/homedir" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/artifact" + "github.com/kubesphere/kubekey/v2/pkg/common" ) type CreateManifestOptions struct { diff --git a/cmd/ctl/create/phase/binary.go b/cmd/ctl/create/phase/binary.go index 26a5a8a79..dc1516c4c 100755 --- a/cmd/ctl/create/phase/binary.go +++ b/cmd/ctl/create/phase/binary.go @@ -19,12 +19,13 @@ package phase import ( "fmt" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/phase/binary" - "github.com/kubesphere/kubekey/pkg/version/kubernetes" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/phase/binary" + "github.com/kubesphere/kubekey/v2/pkg/version/kubernetes" ) type CreateBinaryOptions struct { diff --git a/cmd/ctl/create/phase/configure.go b/cmd/ctl/create/phase/configure.go index 4510fbd9d..32a9f7002 100644 --- a/cmd/ctl/create/phase/configure.go +++ b/cmd/ctl/create/phase/configure.go @@ -19,11 +19,12 @@ package phase import ( "fmt" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/phase/kubernetes" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/phase/kubernetes" ) type CreateConfigureKubernetesOptions struct { diff --git a/cmd/ctl/create/phase/etcd.go b/cmd/ctl/create/phase/etcd.go index 27afd0748..34fd9cc5e 100755 --- a/cmd/ctl/create/phase/etcd.go +++ b/cmd/ctl/create/phase/etcd.go @@ -17,11 +17,12 @@ limitations under the License. package phase import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/phase/etcd" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/phase/etcd" ) type CreateEtcdOptions struct { diff --git a/cmd/ctl/create/phase/images.go b/cmd/ctl/create/phase/images.go index f27fb063e..adb4acf29 100755 --- a/cmd/ctl/create/phase/images.go +++ b/cmd/ctl/create/phase/images.go @@ -19,11 +19,12 @@ package phase import ( "fmt" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/phase/images" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/phase/images" ) type CreateImagesOptions struct { diff --git a/cmd/ctl/create/phase/init.go b/cmd/ctl/create/phase/init.go index ad3aff66d..64db822c3 100644 --- a/cmd/ctl/create/phase/init.go +++ b/cmd/ctl/create/phase/init.go @@ -19,11 +19,12 @@ package phase import ( "fmt" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/phase/kubernetes" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/phase/kubernetes" ) type CreateInitClusterOptions struct { diff --git a/cmd/ctl/create/phase/join.go b/cmd/ctl/create/phase/join.go index d5b6feb46..59c5ddb15 100644 --- a/cmd/ctl/create/phase/join.go +++ b/cmd/ctl/create/phase/join.go @@ -19,11 +19,12 @@ package phase import ( "fmt" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/phase/kubernetes" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/phase/kubernetes" ) type CreateJoinNodesOptions struct { diff --git a/cmd/ctl/create/phase/kubesphere.go b/cmd/ctl/create/phase/kubesphere.go index eac270532..18c49b023 100755 --- a/cmd/ctl/create/phase/kubesphere.go +++ b/cmd/ctl/create/phase/kubesphere.go @@ -20,12 +20,13 @@ import ( "fmt" "time" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - alpha "github.com/kubesphere/kubekey/pkg/phase/kubesphere" - "github.com/kubesphere/kubekey/pkg/version/kubesphere" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + alpha "github.com/kubesphere/kubekey/v2/pkg/phase/kubesphere" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" ) type CreateKubeSphereOptions struct { diff --git a/cmd/ctl/create/phase/os.go b/cmd/ctl/create/phase/os.go index b91c4dcb4..f2136eca3 100755 --- a/cmd/ctl/create/phase/os.go +++ b/cmd/ctl/create/phase/os.go @@ -17,11 +17,12 @@ limitations under the License. package phase import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/phase/os" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/phase/os" ) type ConfigOSOptions struct { diff --git a/cmd/ctl/create/phase/phase.go b/cmd/ctl/create/phase/phase.go index 7be66adef..655fddeae 100755 --- a/cmd/ctl/create/phase/phase.go +++ b/cmd/ctl/create/phase/phase.go @@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + package phase import ( diff --git a/cmd/ctl/cri/cri.go b/cmd/ctl/cri/cri.go index 1e80f28e5..b9fc580e5 100644 --- a/cmd/ctl/cri/cri.go +++ b/cmd/ctl/cri/cri.go @@ -17,8 +17,9 @@ limitations under the License. package cri import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" ) type MigrateOptions struct { diff --git a/cmd/ctl/cri/migrate_cri.go b/cmd/ctl/cri/migrate_cri.go index fbf52948e..8122f16c4 100644 --- a/cmd/ctl/cri/migrate_cri.go +++ b/cmd/ctl/cri/migrate_cri.go @@ -19,11 +19,12 @@ package cri import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/pipelines" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/pipelines" ) type MigrateCriOptions struct { diff --git a/cmd/ctl/delete/delete.go b/cmd/ctl/delete/delete.go index 0aa6cf7a6..706fb13e3 100644 --- a/cmd/ctl/delete/delete.go +++ b/cmd/ctl/delete/delete.go @@ -17,8 +17,9 @@ limitations under the License. package delete import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" ) type DeleteOptions struct { diff --git a/cmd/ctl/delete/delete_cluster.go b/cmd/ctl/delete/delete_cluster.go index 3285c5579..c621e00b0 100644 --- a/cmd/ctl/delete/delete_cluster.go +++ b/cmd/ctl/delete/delete_cluster.go @@ -17,11 +17,12 @@ limitations under the License. package delete import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/pipelines" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/pipelines" ) type DeleteClusterOptions struct { diff --git a/cmd/ctl/delete/delete_node.go b/cmd/ctl/delete/delete_node.go index 34e12f653..b408c712c 100644 --- a/cmd/ctl/delete/delete_node.go +++ b/cmd/ctl/delete/delete_node.go @@ -19,12 +19,13 @@ package delete import ( "strings" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/pipelines" "github.com/pkg/errors" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/pipelines" ) type DeleteNodeOptions struct { diff --git a/cmd/ctl/init/init.go b/cmd/ctl/init/init.go index 13c190d57..95440af46 100644 --- a/cmd/ctl/init/init.go +++ b/cmd/ctl/init/init.go @@ -17,8 +17,9 @@ limitations under the License. package init import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" ) type InitOptions struct { diff --git a/cmd/ctl/init/init_os.go b/cmd/ctl/init/init_os.go index e56060ea1..e09319c34 100644 --- a/cmd/ctl/init/init_os.go +++ b/cmd/ctl/init/init_os.go @@ -17,11 +17,12 @@ limitations under the License. package init import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/pipelines" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/pipelines" ) type InitOsOptions struct { diff --git a/cmd/ctl/init/init_registry.go b/cmd/ctl/init/init_registry.go index c96fc7dce..9c2024e03 100644 --- a/cmd/ctl/init/init_registry.go +++ b/cmd/ctl/init/init_registry.go @@ -17,11 +17,12 @@ limitations under the License. package init import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/pipelines" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/pipelines" ) type InitRegistryOptions struct { diff --git a/cmd/ctl/plugin/list.go b/cmd/ctl/plugin/list.go index a9056785b..89d787b99 100644 --- a/cmd/ctl/plugin/list.go +++ b/cmd/ctl/plugin/list.go @@ -25,10 +25,11 @@ import ( "runtime" "strings" - "github.com/kubesphere/kubekey/cmd/ctl/options" "github.com/spf13/cobra" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/util/i18n" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" ) type PluginListOptions struct { diff --git a/cmd/ctl/plugin/plugin.go b/cmd/ctl/plugin/plugin.go index 2c2376ba5..ae1fa5218 100644 --- a/cmd/ctl/plugin/plugin.go +++ b/cmd/ctl/plugin/plugin.go @@ -17,8 +17,9 @@ package plugin import ( - "github.com/kubesphere/kubekey/cmd/ctl/options" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" ) var ( diff --git a/cmd/ctl/root.go b/cmd/ctl/root.go index a70597ea5..497ab9202 100755 --- a/cmd/ctl/root.go +++ b/cmd/ctl/root.go @@ -24,19 +24,20 @@ import ( "strings" "syscall" - "github.com/kubesphere/kubekey/cmd/ctl/add" - "github.com/kubesphere/kubekey/cmd/ctl/artifact" - "github.com/kubesphere/kubekey/cmd/ctl/cert" - "github.com/kubesphere/kubekey/cmd/ctl/completion" - "github.com/kubesphere/kubekey/cmd/ctl/create" - "github.com/kubesphere/kubekey/cmd/ctl/cri" - "github.com/kubesphere/kubekey/cmd/ctl/delete" - initOs "github.com/kubesphere/kubekey/cmd/ctl/init" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/plugin" - "github.com/kubesphere/kubekey/cmd/ctl/upgrade" - "github.com/kubesphere/kubekey/cmd/ctl/version" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/add" + "github.com/kubesphere/kubekey/v2/cmd/ctl/artifact" + "github.com/kubesphere/kubekey/v2/cmd/ctl/cert" + "github.com/kubesphere/kubekey/v2/cmd/ctl/completion" + "github.com/kubesphere/kubekey/v2/cmd/ctl/create" + "github.com/kubesphere/kubekey/v2/cmd/ctl/cri" + "github.com/kubesphere/kubekey/v2/cmd/ctl/delete" + initOs "github.com/kubesphere/kubekey/v2/cmd/ctl/init" + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/plugin" + "github.com/kubesphere/kubekey/v2/cmd/ctl/upgrade" + "github.com/kubesphere/kubekey/v2/cmd/ctl/version" ) type KubeKeyOptions struct { diff --git a/cmd/ctl/upgrade/phase/binary.go b/cmd/ctl/upgrade/phase/binary.go index ed53a2c08..b60417ec4 100755 --- a/cmd/ctl/upgrade/phase/binary.go +++ b/cmd/ctl/upgrade/phase/binary.go @@ -19,12 +19,13 @@ package phase import ( "fmt" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/phase/binary" - "github.com/kubesphere/kubekey/pkg/version/kubernetes" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/phase/binary" + "github.com/kubesphere/kubekey/v2/pkg/version/kubernetes" ) type UpgradeBinaryOptions struct { diff --git a/cmd/ctl/upgrade/phase/images.go b/cmd/ctl/upgrade/phase/images.go index 3f79ecd02..40c624f15 100755 --- a/cmd/ctl/upgrade/phase/images.go +++ b/cmd/ctl/upgrade/phase/images.go @@ -19,11 +19,12 @@ package phase import ( "fmt" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/phase/images" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/phase/images" ) type UpgradeImagesOptions struct { diff --git a/cmd/ctl/upgrade/phase/kubesphere.go b/cmd/ctl/upgrade/phase/kubesphere.go index 9f4ba31d9..61f5ad427 100755 --- a/cmd/ctl/upgrade/phase/kubesphere.go +++ b/cmd/ctl/upgrade/phase/kubesphere.go @@ -20,12 +20,13 @@ import ( "fmt" "time" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - alpha "github.com/kubesphere/kubekey/pkg/phase/kubesphere" - "github.com/kubesphere/kubekey/pkg/version/kubesphere" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + alpha "github.com/kubesphere/kubekey/v2/pkg/phase/kubesphere" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" ) type UpgradeKubeSphereOptions struct { diff --git a/cmd/ctl/upgrade/phase/nodes.go b/cmd/ctl/upgrade/phase/nodes.go index f52f851c4..ca4b72ae2 100755 --- a/cmd/ctl/upgrade/phase/nodes.go +++ b/cmd/ctl/upgrade/phase/nodes.go @@ -19,11 +19,12 @@ package phase import ( "fmt" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/phase/nodes" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/phase/nodes" ) type UpgradeNodesOptions struct { diff --git a/cmd/ctl/upgrade/phase/phase.go b/cmd/ctl/upgrade/phase/phase.go index cb2fc6180..f17d1c7be 100755 --- a/cmd/ctl/upgrade/phase/phase.go +++ b/cmd/ctl/upgrade/phase/phase.go @@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + package phase import ( diff --git a/cmd/ctl/upgrade/upgrade.go b/cmd/ctl/upgrade/upgrade.go index fc509c194..ea8af6423 100644 --- a/cmd/ctl/upgrade/upgrade.go +++ b/cmd/ctl/upgrade/upgrade.go @@ -20,14 +20,15 @@ import ( "fmt" "time" - "github.com/kubesphere/kubekey/cmd/ctl/options" - "github.com/kubesphere/kubekey/cmd/ctl/upgrade/phase" - "github.com/kubesphere/kubekey/cmd/ctl/util" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/pipelines" - "github.com/kubesphere/kubekey/pkg/version/kubernetes" - "github.com/kubesphere/kubekey/pkg/version/kubesphere" "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/cmd/ctl/options" + "github.com/kubesphere/kubekey/v2/cmd/ctl/upgrade/phase" + "github.com/kubesphere/kubekey/v2/cmd/ctl/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/pipelines" + "github.com/kubesphere/kubekey/v2/pkg/version/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" ) type UpgradeOptions struct { diff --git a/cmd/ctl/version/version.go b/cmd/ctl/version/version.go index 0733fd814..2c7ed052a 100644 --- a/cmd/ctl/version/version.go +++ b/cmd/ctl/version/version.go @@ -18,11 +18,13 @@ package version import ( "fmt" - "github.com/kubesphere/kubekey/pkg/version/kubernetes" - "github.com/kubesphere/kubekey/version" - "github.com/spf13/cobra" "io" "strings" + + "github.com/spf13/cobra" + + "github.com/kubesphere/kubekey/v2/pkg/version/kubernetes" + "github.com/kubesphere/kubekey/v2/version" ) type VersionOptions struct { diff --git a/cmd/main.go b/cmd/main.go index fd17a3d49..c9b7289c3 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -17,9 +17,10 @@ limitations under the License. package main import ( - "github.com/kubesphere/kubekey/cmd/ctl" "os" "os/exec" + + "github.com/kubesphere/kubekey/v2/cmd/ctl" ) // Using a separate entry-point can reduce the size of the binary file diff --git a/controllers/kubekey/cluster_controller.go b/controllers/kubekey/cluster_controller.go index 61180bc7f..7299baac1 100644 --- a/controllers/kubekey/cluster_controller.go +++ b/controllers/kubekey/cluster_controller.go @@ -25,29 +25,28 @@ import ( "net/http" "os" "regexp" - "sigs.k8s.io/yaml" "strings" "time" - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/pkg/errors" - "k8s.io/apimachinery/pkg/util/wait" - "github.com/go-logr/logr" + "github.com/pkg/errors" yamlV2 "gopkg.in/yaml.v2" + batchv1 "k8s.io/api/batch/v1" + corev1 "k8s.io/api/core/v1" kubeErr "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" "sigs.k8s.io/controller-runtime/pkg/predicate" + "sigs.k8s.io/yaml" - batchv1 "k8s.io/api/batch/v1" - corev1 "k8s.io/api/core/v1" + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" ) const ( diff --git a/controllers/kubekey/suite_test.go b/controllers/kubekey/suite_test.go index 4aa2be214..338b2679d 100644 --- a/controllers/kubekey/suite_test.go +++ b/controllers/kubekey/suite_test.go @@ -30,7 +30,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - kubekeyv1alpha1 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha1" + kubekeyv1alpha1 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha1" //+kubebuilder:scaffold:imports ) diff --git a/controllers/kubekey/update_cluster.go b/controllers/kubekey/update_cluster.go index 75181767d..e7827dda0 100644 --- a/controllers/kubekey/update_cluster.go +++ b/controllers/kubekey/update_cluster.go @@ -22,15 +22,8 @@ import ( "fmt" "text/template" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/addons" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/ending" - "github.com/pkg/errors" - - kubekeyclientset "github.com/kubesphere/kubekey/clients/clientset/versioned" - "github.com/kubesphere/kubekey/pkg/core/util" "github.com/lithammer/dedent" + "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" kubeErr "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -39,6 +32,13 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" "sigs.k8s.io/controller-runtime/pkg/client" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + kubekeyclientset "github.com/kubesphere/kubekey/v2/clients/clientset/versioned" + "github.com/kubesphere/kubekey/v2/pkg/addons" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) const ( diff --git a/go.mod b/go.mod index 608fa0b64..a39e6b18c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/kubesphere/kubekey +module github.com/kubesphere/kubekey/v2 go 1.18 diff --git a/main.go b/main.go index 17f7856a9..a2b10e2c2 100644 --- a/main.go +++ b/main.go @@ -31,9 +31,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" - kubekeyv1alpha1 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha1" - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/controllers/kubekey" + kubekeyv1alpha1 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha1" + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/controllers/kubekey" //+kubebuilder:scaffold:imports ) diff --git a/pkg/addons/addons.go b/pkg/addons/addons.go index f251e03a0..fbbbad282 100644 --- a/pkg/addons/addons.go +++ b/pkg/addons/addons.go @@ -17,15 +17,17 @@ package addons import ( - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/pkg/errors" - "helm.sh/helm/v3/pkg/cli" - "helm.sh/helm/v3/pkg/getter" "net/url" "os" "path/filepath" "strings" + + "github.com/pkg/errors" + "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v3/pkg/getter" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" ) func InstallAddons(kubeConf *common.KubeConf, addon *kubekeyapiv1alpha2.Addon, kubeConfig string) error { diff --git a/pkg/addons/charts.go b/pkg/addons/charts.go index 59492b644..76d96d816 100644 --- a/pkg/addons/charts.go +++ b/pkg/addons/charts.go @@ -40,9 +40,9 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/util/homedir" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/logger" + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" ) func debug(format string, v ...interface{}) { diff --git a/pkg/addons/module.go b/pkg/addons/module.go index 5b221ddeb..708e9f3d2 100644 --- a/pkg/addons/module.go +++ b/pkg/addons/module.go @@ -17,8 +17,8 @@ package addons import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/task" ) type AddonsModule struct { diff --git a/pkg/addons/tasks.go b/pkg/addons/tasks.go index e9529e742..ff3298d24 100644 --- a/pkg/addons/tasks.go +++ b/pkg/addons/tasks.go @@ -18,10 +18,11 @@ package addons import ( "fmt" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" "path/filepath" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" ) type Install struct { diff --git a/pkg/artifact/manifest.go b/pkg/artifact/manifest.go index d1041dd59..ee9c8096b 100644 --- a/pkg/artifact/manifest.go +++ b/pkg/artifact/manifest.go @@ -27,15 +27,14 @@ import ( mapset "github.com/deckarep/golang-set" "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" versionutil "k8s.io/apimachinery/pkg/util/version" - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/artifact/templates" - "github.com/kubesphere/kubekey/pkg/client/kubernetes" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/util" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/artifact/templates" + "github.com/kubesphere/kubekey/v2/pkg/client/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) func CreateManifest(arg common.Argument, name string) error { diff --git a/pkg/artifact/module.go b/pkg/artifact/module.go index d690cc344..17118b366 100644 --- a/pkg/artifact/module.go +++ b/pkg/artifact/module.go @@ -17,8 +17,8 @@ package artifact import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/task" ) type RepositoryModule struct { diff --git a/pkg/artifact/prepares.go b/pkg/artifact/prepares.go index a04b5d0be..c80263def 100644 --- a/pkg/artifact/prepares.go +++ b/pkg/artifact/prepares.go @@ -18,8 +18,9 @@ package artifact import ( "fmt" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type EnableDownload struct { diff --git a/pkg/artifact/tasks.go b/pkg/artifact/tasks.go index fdb932e15..1abea8569 100644 --- a/pkg/artifact/tasks.go +++ b/pkg/artifact/tasks.go @@ -27,10 +27,10 @@ import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" - coreutil "github.com/kubesphere/kubekey/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + coreutil "github.com/kubesphere/kubekey/v2/pkg/core/util" ) type DownloadISOFile struct { diff --git a/pkg/artifact/templates/manifest.go b/pkg/artifact/templates/manifest.go index c1311b6ad..e39e50ed0 100644 --- a/pkg/artifact/templates/manifest.go +++ b/pkg/artifact/templates/manifest.go @@ -17,10 +17,12 @@ package templates import ( - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/lithammer/dedent" "text/template" + + "github.com/lithammer/dedent" + + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) // Manifest defines the template of manifest file. diff --git a/pkg/binaries/k3s.go b/pkg/binaries/k3s.go index 1b1f07606..20afc3aac 100644 --- a/pkg/binaries/k3s.go +++ b/pkg/binaries/k3s.go @@ -20,13 +20,14 @@ import ( "fmt" "os/exec" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/files" "github.com/pkg/errors" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/files" ) // K3sFilesDownloadHTTP defines the kubernetes' binaries that need to be downloaded in advance and downloads them. diff --git a/pkg/binaries/k8e.go b/pkg/binaries/k8e.go index 8aa49f450..ab602b274 100644 --- a/pkg/binaries/k8e.go +++ b/pkg/binaries/k8e.go @@ -20,13 +20,14 @@ import ( "fmt" "os/exec" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/files" "github.com/pkg/errors" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/files" ) // K8eFilesDownloadHTTP defines the kubernetes' binaries that need to be downloaded in advance and downloads them. diff --git a/pkg/binaries/kubernetes.go b/pkg/binaries/kubernetes.go index d674e5f9b..96d603cb7 100644 --- a/pkg/binaries/kubernetes.go +++ b/pkg/binaries/kubernetes.go @@ -20,13 +20,14 @@ import ( "fmt" "os/exec" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/files" "github.com/pkg/errors" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/files" ) // K8sFilesDownloadHTTP defines the kubernetes' binaries that need to be downloaded in advance and downloads them. diff --git a/pkg/binaries/module.go b/pkg/binaries/module.go index f87f2668e..2be4642f2 100644 --- a/pkg/binaries/module.go +++ b/pkg/binaries/module.go @@ -17,10 +17,11 @@ package binaries import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/task" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/task" ) type NodeBinariesModule struct { diff --git a/pkg/binaries/registry.go b/pkg/binaries/registry.go index 78aeb5215..c18a3a376 100644 --- a/pkg/binaries/registry.go +++ b/pkg/binaries/registry.go @@ -18,14 +18,16 @@ package binaries import ( "fmt" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/files" - "github.com/pkg/errors" "os/exec" + + "github.com/pkg/errors" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/files" ) // RegistryPackageDownloadHTTP defines the kubernetes' binaries that need to be downloaded in advance and downloads them. diff --git a/pkg/binaries/tasks.go b/pkg/binaries/tasks.go index 6e691a769..d8f9e55ae 100644 --- a/pkg/binaries/tasks.go +++ b/pkg/binaries/tasks.go @@ -21,10 +21,11 @@ import ( "path/filepath" mapset "github.com/deckarep/golang-set" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" "github.com/pkg/errors" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type Download struct { diff --git a/pkg/bootstrap/confirm/module.go b/pkg/bootstrap/confirm/module.go index 59a29ffbe..7a082d9b6 100644 --- a/pkg/bootstrap/confirm/module.go +++ b/pkg/bootstrap/confirm/module.go @@ -17,9 +17,9 @@ package confirm import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/task" ) type InstallConfirmModule struct { diff --git a/pkg/bootstrap/confirm/tasks.go b/pkg/bootstrap/confirm/tasks.go index afd01fe45..4c46644ff 100644 --- a/pkg/bootstrap/confirm/tasks.go +++ b/pkg/bootstrap/confirm/tasks.go @@ -28,11 +28,11 @@ import ( "github.com/pkg/errors" versionutil "k8s.io/apimachinery/pkg/util/version" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) // PreCheckResults defines the items to be checked. diff --git a/pkg/bootstrap/os/module.go b/pkg/bootstrap/os/module.go index d3a9cf61d..4e5fbc8d5 100644 --- a/pkg/bootstrap/os/module.go +++ b/pkg/bootstrap/os/module.go @@ -19,12 +19,12 @@ package os import ( "path/filepath" - "github.com/kubesphere/kubekey/pkg/bootstrap/os/templates" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/os/templates" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) type ConfigureOSModule struct { diff --git a/pkg/bootstrap/os/prepares.go b/pkg/bootstrap/os/prepares.go index 3922e3af0..2fbfb46f1 100644 --- a/pkg/bootstrap/os/prepares.go +++ b/pkg/bootstrap/os/prepares.go @@ -17,9 +17,9 @@ package os import ( - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type NodeConfigureNtpCheck struct { diff --git a/pkg/bootstrap/os/repository/repository.go b/pkg/bootstrap/os/repository/repository.go index 82f55f4ba..d93006f1b 100644 --- a/pkg/bootstrap/os/repository/repository.go +++ b/pkg/bootstrap/os/repository/repository.go @@ -18,8 +18,9 @@ package repository import ( "fmt" - "github.com/kubesphere/kubekey/pkg/core/connector" "strings" + + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type Interface interface { diff --git a/pkg/bootstrap/os/repository/repository_deb.go b/pkg/bootstrap/os/repository/repository_deb.go index 6225585ae..350eb4271 100644 --- a/pkg/bootstrap/os/repository/repository_deb.go +++ b/pkg/bootstrap/os/repository/repository_deb.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type Debian struct { diff --git a/pkg/bootstrap/os/repository/repository_rpm.go b/pkg/bootstrap/os/repository/repository_rpm.go index 8cdc9c6cd..8307baaea 100644 --- a/pkg/bootstrap/os/repository/repository_rpm.go +++ b/pkg/bootstrap/os/repository/repository_rpm.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type RedhatPackageManager struct { diff --git a/pkg/bootstrap/os/rollback.go b/pkg/bootstrap/os/rollback.go index 70cee66a0..a0d0755c3 100644 --- a/pkg/bootstrap/os/rollback.go +++ b/pkg/bootstrap/os/rollback.go @@ -18,12 +18,14 @@ package os import ( "fmt" - "github.com/kubesphere/kubekey/pkg/bootstrap/os/repository" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/ending" - "github.com/pkg/errors" "path/filepath" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/os/repository" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" ) type RollbackUmount struct { diff --git a/pkg/bootstrap/os/tasks.go b/pkg/bootstrap/os/tasks.go index c5ff639fd..c8a8eb524 100644 --- a/pkg/bootstrap/os/tasks.go +++ b/pkg/bootstrap/os/tasks.go @@ -24,10 +24,10 @@ import ( osrelease "github.com/dominodatalab/os-release" "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/bootstrap/os/repository" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/utils" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/os/repository" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/utils" ) type NodeConfigureOS struct { diff --git a/pkg/bootstrap/os/templates/init_script.go b/pkg/bootstrap/os/templates/init_script.go index fd0ffe10e..e3f99daa5 100644 --- a/pkg/bootstrap/os/templates/init_script.go +++ b/pkg/bootstrap/os/templates/init_script.go @@ -20,11 +20,11 @@ import ( "fmt" "text/template" - "github.com/kubesphere/kubekey/pkg/bootstrap/registry" - - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" "github.com/lithammer/dedent" + + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/registry" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) var InitOsScriptTmpl = template.Must(template.New("initOS.sh").Parse( diff --git a/pkg/bootstrap/precheck/module.go b/pkg/bootstrap/precheck/module.go index 0fa08e489..265e51414 100644 --- a/pkg/bootstrap/precheck/module.go +++ b/pkg/bootstrap/precheck/module.go @@ -19,10 +19,10 @@ package precheck import ( "time" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" ) type GreetingsModule struct { diff --git a/pkg/bootstrap/precheck/prepares.go b/pkg/bootstrap/precheck/prepares.go index ee558d446..400352625 100644 --- a/pkg/bootstrap/precheck/prepares.go +++ b/pkg/bootstrap/precheck/prepares.go @@ -17,9 +17,10 @@ package precheck import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type KubeSphereExist struct { diff --git a/pkg/bootstrap/precheck/tasks.go b/pkg/bootstrap/precheck/tasks.go index 77440736a..b9b07a73c 100644 --- a/pkg/bootstrap/precheck/tasks.go +++ b/pkg/bootstrap/precheck/tasks.go @@ -24,12 +24,12 @@ import ( "github.com/pkg/errors" versionutil "k8s.io/apimachinery/pkg/util/version" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/version/kubernetes" - "github.com/kubesphere/kubekey/pkg/version/kubesphere" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/version/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" ) type GreetingsTask struct { diff --git a/pkg/bootstrap/registry/certs.go b/pkg/bootstrap/registry/certs.go index 4784ce90d..d1871210c 100644 --- a/pkg/bootstrap/registry/certs.go +++ b/pkg/bootstrap/registry/certs.go @@ -19,16 +19,18 @@ package registry import ( "crypto/x509" "fmt" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/utils/certs" + "net" + "path/filepath" + "strings" + "github.com/pkg/errors" "k8s.io/client-go/util/cert" certutil "k8s.io/client-go/util/cert" netutils "k8s.io/utils/net" - "net" - "path/filepath" - "strings" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/utils/certs" ) const ( diff --git a/pkg/bootstrap/registry/module.go b/pkg/bootstrap/registry/module.go index 3dd02e4bd..939563984 100644 --- a/pkg/bootstrap/registry/module.go +++ b/pkg/bootstrap/registry/module.go @@ -20,14 +20,14 @@ import ( "fmt" "path/filepath" - "github.com/kubesphere/kubekey/pkg/bootstrap/registry/templates" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/container" - docker_template "github.com/kubesphere/kubekey/pkg/container/templates" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/registry/templates" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/container" + docker_template "github.com/kubesphere/kubekey/v2/pkg/container/templates" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) type RegistryCertsModule struct { diff --git a/pkg/bootstrap/registry/prepares.go b/pkg/bootstrap/registry/prepares.go index efb5fd465..4f2413868 100644 --- a/pkg/bootstrap/registry/prepares.go +++ b/pkg/bootstrap/registry/prepares.go @@ -17,8 +17,8 @@ package registry import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type FirstRegistryNode struct { diff --git a/pkg/bootstrap/registry/tasks.go b/pkg/bootstrap/registry/tasks.go index c84a2c3fe..83f904e2a 100644 --- a/pkg/bootstrap/registry/tasks.go +++ b/pkg/bootstrap/registry/tasks.go @@ -21,11 +21,12 @@ import ( "path/filepath" "strings" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/files" - "github.com/kubesphere/kubekey/pkg/utils" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/files" + "github.com/kubesphere/kubekey/v2/pkg/utils" ) type SyncCertsFile struct { diff --git a/pkg/certs/module.go b/pkg/certs/module.go index 97d3857cb..2ee3484cc 100644 --- a/pkg/certs/module.go +++ b/pkg/certs/module.go @@ -21,13 +21,13 @@ import ( versionutil "k8s.io/apimachinery/pkg/util/version" - "github.com/kubesphere/kubekey/pkg/certs/templates" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/certs/templates" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" ) type CheckCertsModule struct { diff --git a/pkg/certs/prepares.go b/pkg/certs/prepares.go index f74fa6dc7..344859a4f 100644 --- a/pkg/certs/prepares.go +++ b/pkg/certs/prepares.go @@ -19,9 +19,9 @@ package certs import ( "path/filepath" - "github.com/kubesphere/kubekey/pkg/certs/templates" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/certs/templates" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type AutoRenewCertsEnabled struct { diff --git a/pkg/certs/tasks.go b/pkg/certs/tasks.go index 863043f60..2b2697b57 100644 --- a/pkg/certs/tasks.go +++ b/pkg/certs/tasks.go @@ -19,21 +19,23 @@ package certs import ( "encoding/base64" "fmt" - "github.com/kubesphere/kubekey/pkg/certs/templates" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/utils" + "os" + "path/filepath" + "strings" + "text/tabwriter" + "time" + "github.com/pkg/errors" "k8s.io/apimachinery/pkg/runtime/schema" versionutil "k8s.io/apimachinery/pkg/util/version" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" clientcmdlatest "k8s.io/client-go/tools/clientcmd/api/latest" certutil "k8s.io/client-go/util/cert" - "os" - "path/filepath" - "strings" - "text/tabwriter" - "time" + + "github.com/kubesphere/kubekey/v2/pkg/certs/templates" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/utils" ) type Certificate struct { diff --git a/pkg/common/artifact_action.go b/pkg/common/artifact_action.go index 53cd171aa..8d8766af9 100644 --- a/pkg/common/artifact_action.go +++ b/pkg/common/artifact_action.go @@ -17,8 +17,8 @@ package common import ( - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type ArtifactAction struct { diff --git a/pkg/common/artifact_module.go b/pkg/common/artifact_module.go index 6343bd558..2ef3d43cf 100644 --- a/pkg/common/artifact_module.go +++ b/pkg/common/artifact_module.go @@ -17,8 +17,8 @@ package common import ( - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/core/module" + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/core/module" ) type ArtifactManifest struct { diff --git a/pkg/common/artifact_prepare.go b/pkg/common/artifact_prepare.go index bd9e5cf8f..f87a1b418 100644 --- a/pkg/common/artifact_prepare.go +++ b/pkg/common/artifact_prepare.go @@ -17,8 +17,8 @@ package common import ( - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" ) type ArtifactPrepare struct { diff --git a/pkg/common/artifact_runtime.go b/pkg/common/artifact_runtime.go index 951e99e8c..e4939865d 100644 --- a/pkg/common/artifact_runtime.go +++ b/pkg/common/artifact_runtime.go @@ -18,12 +18,14 @@ package common import ( "encoding/json" - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/pkg/errors" "io/ioutil" - k8syaml "k8s.io/apimachinery/pkg/util/yaml" "path/filepath" + + "github.com/pkg/errors" + k8syaml "k8s.io/apimachinery/pkg/util/yaml" + + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type ArtifactArgument struct { diff --git a/pkg/common/kube_action.go b/pkg/common/kube_action.go index 5354a3ca1..be306dec6 100644 --- a/pkg/common/kube_action.go +++ b/pkg/common/kube_action.go @@ -17,8 +17,8 @@ package common import ( - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type KubeAction struct { diff --git a/pkg/common/kube_module.go b/pkg/common/kube_module.go index df31284a4..273c137c7 100644 --- a/pkg/common/kube_module.go +++ b/pkg/common/kube_module.go @@ -17,9 +17,9 @@ package common import ( - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - kubekeyclientset "github.com/kubesphere/kubekey/clients/clientset/versioned" - "github.com/kubesphere/kubekey/pkg/core/module" + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + kubekeyclientset "github.com/kubesphere/kubekey/v2/clients/clientset/versioned" + "github.com/kubesphere/kubekey/v2/pkg/core/module" ) type KubeConf struct { diff --git a/pkg/common/kube_prepare.go b/pkg/common/kube_prepare.go index 56e97eba7..d0b86dd0b 100644 --- a/pkg/common/kube_prepare.go +++ b/pkg/common/kube_prepare.go @@ -17,8 +17,8 @@ package common import ( - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" ) type KubePrepare struct { diff --git a/pkg/common/kube_rollback.go b/pkg/common/kube_rollback.go index ad6efbeab..ac867af5a 100644 --- a/pkg/common/kube_rollback.go +++ b/pkg/common/kube_rollback.go @@ -17,8 +17,8 @@ package common import ( - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/rollback" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/rollback" ) type KubeRollback struct { diff --git a/pkg/common/kube_runtime.go b/pkg/common/kube_runtime.go index 309af0449..30a47fe3e 100644 --- a/pkg/common/kube_runtime.go +++ b/pkg/common/kube_runtime.go @@ -17,9 +17,9 @@ package common import ( - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - kubekeyclientset "github.com/kubesphere/kubekey/clients/clientset/versioned" - "github.com/kubesphere/kubekey/pkg/core/connector" + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + kubekeyclientset "github.com/kubesphere/kubekey/v2/clients/clientset/versioned" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type KubeRuntime struct { diff --git a/pkg/common/loader.go b/pkg/common/loader.go index 4c21b1bb1..43d6dec64 100644 --- a/pkg/common/loader.go +++ b/pkg/common/loader.go @@ -33,9 +33,9 @@ import ( "gopkg.in/yaml.v2" k8syaml "k8s.io/apimachinery/pkg/util/yaml" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/version/kubesphere" + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" ) var ( diff --git a/pkg/common/local_runtime.go b/pkg/common/local_runtime.go index dd7cd6772..568f000de 100644 --- a/pkg/common/local_runtime.go +++ b/pkg/common/local_runtime.go @@ -18,13 +18,15 @@ package common import ( "fmt" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/pkg/errors" "os" "os/exec" "os/user" "runtime" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) type LocalRuntime struct { diff --git a/pkg/config/from_cluster.go b/pkg/config/from_cluster.go index a5022ed90..dcabdb2de 100644 --- a/pkg/config/from_cluster.go +++ b/pkg/config/from_cluster.go @@ -21,7 +21,6 @@ import ( "context" "encoding/base64" "fmt" - "github.com/kubesphere/kubekey/pkg/utils" "net" "os" "os/exec" @@ -29,12 +28,14 @@ import ( "strings" "text/template" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/core/util" "github.com/lithammer/dedent" "github.com/pkg/errors" "github.com/spf13/viper" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/utils" ) var ( diff --git a/pkg/config/generate.go b/pkg/config/generate.go index 22cdf1ffe..496dc3f1a 100644 --- a/pkg/config/generate.go +++ b/pkg/config/generate.go @@ -28,11 +28,11 @@ import ( "github.com/pkg/errors" versionutil "k8s.io/apimachinery/pkg/util/version" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/config/templates" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/version/kubesphere" + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/config/templates" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" ) // GenerateKubeKeyConfig is used to generate cluster configuration file diff --git a/pkg/config/templates/cluster.go b/pkg/config/templates/cluster.go index 914410320..79fb0f30d 100644 --- a/pkg/config/templates/cluster.go +++ b/pkg/config/templates/cluster.go @@ -21,7 +21,7 @@ import ( "github.com/lithammer/dedent" - "github.com/kubesphere/kubekey/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) // Cluster defines the template of cluster configuration file default. diff --git a/pkg/container/containerd.go b/pkg/container/containerd.go index 1ef4d5d35..fcc6ca2e2 100644 --- a/pkg/container/containerd.go +++ b/pkg/container/containerd.go @@ -21,19 +21,20 @@ import ( "path/filepath" "strings" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/container/templates" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/files" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/registry" - "github.com/kubesphere/kubekey/pkg/utils" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/container/templates" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/files" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/registry" + "github.com/kubesphere/kubekey/v2/pkg/utils" ) type SyncContainerd struct { diff --git a/pkg/container/docker.go b/pkg/container/docker.go index e399b53a4..84d27115c 100644 --- a/pkg/container/docker.go +++ b/pkg/container/docker.go @@ -21,14 +21,14 @@ import ( "path/filepath" "strings" - "github.com/kubesphere/kubekey/pkg/container/templates" - "github.com/kubesphere/kubekey/pkg/registry" - - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/files" - "github.com/kubesphere/kubekey/pkg/utils" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/container/templates" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/files" + "github.com/kubesphere/kubekey/v2/pkg/registry" + "github.com/kubesphere/kubekey/v2/pkg/utils" ) type SyncDockerBinaries struct { diff --git a/pkg/container/module.go b/pkg/container/module.go index 8e0a4cbe4..b23e59fea 100644 --- a/pkg/container/module.go +++ b/pkg/container/module.go @@ -20,17 +20,16 @@ import ( "path/filepath" "strings" - "github.com/kubesphere/kubekey/pkg/registry" - - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/container/templates" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/container/templates" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/registry" ) type InstallContainerModule struct { diff --git a/pkg/container/prepares.go b/pkg/container/prepares.go index 69214329a..9c2b9ef76 100644 --- a/pkg/container/prepares.go +++ b/pkg/container/prepares.go @@ -19,8 +19,8 @@ package container import ( "strings" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type DockerExist struct { diff --git a/pkg/container/templates/docker_config.go b/pkg/container/templates/docker_config.go index 62775f75d..cd59e4553 100644 --- a/pkg/container/templates/docker_config.go +++ b/pkg/container/templates/docker_config.go @@ -21,8 +21,9 @@ import ( "strings" "text/template" - "github.com/kubesphere/kubekey/pkg/common" "github.com/lithammer/dedent" + + "github.com/kubesphere/kubekey/v2/pkg/common" ) var DockerConfig = template.Must(template.New("daemon.json").Parse( diff --git a/pkg/core/action/base.go b/pkg/core/action/base.go index 0bbb6c97c..31ba30d42 100644 --- a/pkg/core/action/base.go +++ b/pkg/core/action/base.go @@ -17,8 +17,8 @@ package action import ( - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type BaseAction struct { diff --git a/pkg/core/action/interface.go b/pkg/core/action/interface.go index cf982fc34..8731e418c 100644 --- a/pkg/core/action/interface.go +++ b/pkg/core/action/interface.go @@ -17,8 +17,8 @@ package action import ( - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type Action interface { diff --git a/pkg/core/action/template.go b/pkg/core/action/template.go index ca84e4a82..350d28b99 100644 --- a/pkg/core/action/template.go +++ b/pkg/core/action/template.go @@ -18,11 +18,13 @@ package action import ( "fmt" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/pkg/errors" "path/filepath" "text/template" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) type Template struct { diff --git a/pkg/core/connector/dialer.go b/pkg/core/connector/dialer.go index 1e206e687..3ae9fbaf9 100644 --- a/pkg/core/connector/dialer.go +++ b/pkg/core/connector/dialer.go @@ -17,9 +17,10 @@ package connector import ( - "github.com/kubesphere/kubekey/pkg/core/logger" "sync" "time" + + "github.com/kubesphere/kubekey/v2/pkg/core/logger" ) type Dialer struct { diff --git a/pkg/core/connector/host.go b/pkg/core/connector/host.go index 9dad3d8e6..73453555b 100644 --- a/pkg/core/connector/host.go +++ b/pkg/core/connector/host.go @@ -17,7 +17,7 @@ package connector import ( - "github.com/kubesphere/kubekey/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" ) type BaseHost struct { diff --git a/pkg/core/connector/interface.go b/pkg/core/connector/interface.go index 69f5dbbbc..2a101c9fb 100644 --- a/pkg/core/connector/interface.go +++ b/pkg/core/connector/interface.go @@ -17,9 +17,10 @@ package connector import ( - "github.com/kubesphere/kubekey/pkg/core/cache" "io" "os" + + "github.com/kubesphere/kubekey/v2/pkg/core/cache" ) type Connection interface { diff --git a/pkg/core/connector/runner.go b/pkg/core/connector/runner.go index 87e28499a..44a917b78 100644 --- a/pkg/core/connector/runner.go +++ b/pkg/core/connector/runner.go @@ -19,11 +19,12 @@ package connector import ( "errors" "fmt" - "github.com/kubesphere/kubekey/pkg/core/common" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/util" "os" "path/filepath" + + "github.com/kubesphere/kubekey/v2/pkg/core/common" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) type Runner struct { diff --git a/pkg/core/connector/runtime.go b/pkg/core/connector/runtime.go index d396ce3d9..5a8931b77 100644 --- a/pkg/core/connector/runtime.go +++ b/pkg/core/connector/runtime.go @@ -23,9 +23,9 @@ import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/core/common" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/core/common" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) type BaseRuntime struct { diff --git a/pkg/core/connector/ssh.go b/pkg/core/connector/ssh.go index 7e28d5e4f..b9ceea4c9 100644 --- a/pkg/core/connector/ssh.go +++ b/pkg/core/connector/ssh.go @@ -21,12 +21,6 @@ import ( "context" "encoding/base64" "fmt" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/pkg/errors" - "github.com/pkg/sftp" - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/agent" "io" "io/ioutil" "net" @@ -37,6 +31,14 @@ import ( "strings" "sync" "time" + + "github.com/pkg/errors" + "github.com/pkg/sftp" + "golang.org/x/crypto/ssh" + "golang.org/x/crypto/ssh/agent" + + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) type Cfg struct { diff --git a/pkg/core/ending/action_results.go b/pkg/core/ending/action_results.go index f32acdc49..79b2d51ca 100644 --- a/pkg/core/ending/action_results.go +++ b/pkg/core/ending/action_results.go @@ -17,8 +17,9 @@ package ending import ( - "github.com/kubesphere/kubekey/pkg/core/connector" "time" + + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type ActionResult struct { diff --git a/pkg/core/ending/interface.go b/pkg/core/ending/interface.go index 34de235d1..bbd3416e1 100644 --- a/pkg/core/ending/interface.go +++ b/pkg/core/ending/interface.go @@ -17,8 +17,9 @@ package ending import ( - "github.com/kubesphere/kubekey/pkg/core/connector" "time" + + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type Interface interface { diff --git a/pkg/core/ending/module_result.go b/pkg/core/ending/module_result.go index 115ebeca8..ea4bf0c5c 100644 --- a/pkg/core/ending/module_result.go +++ b/pkg/core/ending/module_result.go @@ -17,9 +17,10 @@ package ending import ( - "github.com/kubesphere/kubekey/pkg/core/common" - "github.com/kubesphere/kubekey/pkg/core/connector" "time" + + "github.com/kubesphere/kubekey/v2/pkg/core/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type ModuleResult struct { diff --git a/pkg/core/ending/task_result.go b/pkg/core/ending/task_result.go index 14ef17f0d..dc9d2957c 100644 --- a/pkg/core/ending/task_result.go +++ b/pkg/core/ending/task_result.go @@ -18,10 +18,12 @@ package ending import ( "fmt" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/pkg/errors" "sync" "time" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type TaskResult struct { diff --git a/pkg/core/logger/formatter.go b/pkg/core/logger/formatter.go index 748d27854..b9df8ee48 100644 --- a/pkg/core/logger/formatter.go +++ b/pkg/core/logger/formatter.go @@ -19,11 +19,12 @@ package logger import ( "bytes" "fmt" - "github.com/sirupsen/logrus" "runtime" "sort" "strings" "time" + + "github.com/sirupsen/logrus" ) type Formatter struct { diff --git a/pkg/core/logger/logger.go b/pkg/core/logger/logger.go index 71593e5a1..7106dafe3 100644 --- a/pkg/core/logger/logger.go +++ b/pkg/core/logger/logger.go @@ -25,7 +25,7 @@ import ( "github.com/rifflock/lfshook" "github.com/sirupsen/logrus" - "github.com/kubesphere/kubekey/pkg/core/common" + "github.com/kubesphere/kubekey/v2/pkg/core/common" ) var Log *KubeKeyLog diff --git a/pkg/core/module/base.go b/pkg/core/module/base.go index 6cd8afc43..206a7ed04 100644 --- a/pkg/core/module/base.go +++ b/pkg/core/module/base.go @@ -17,11 +17,12 @@ package module import ( - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/ending" - "github.com/kubesphere/kubekey/pkg/core/hook" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" + "github.com/kubesphere/kubekey/v2/pkg/core/hook" ) type BaseModule struct { diff --git a/pkg/core/module/hook.go b/pkg/core/module/hook.go index 17a3e61f5..6bbe097b2 100644 --- a/pkg/core/module/hook.go +++ b/pkg/core/module/hook.go @@ -17,8 +17,8 @@ package module import ( - "github.com/kubesphere/kubekey/pkg/core/ending" - "github.com/kubesphere/kubekey/pkg/core/hook" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" + "github.com/kubesphere/kubekey/v2/pkg/core/hook" ) type PostHookInterface interface { diff --git a/pkg/core/module/interface.go b/pkg/core/module/interface.go index a6312c6be..5fdcd0c3c 100644 --- a/pkg/core/module/interface.go +++ b/pkg/core/module/interface.go @@ -17,9 +17,9 @@ package module import ( - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/ending" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" ) type Module interface { diff --git a/pkg/core/module/task_module.go b/pkg/core/module/task_module.go index abe3148b3..d1e0303ba 100644 --- a/pkg/core/module/task_module.go +++ b/pkg/core/module/task_module.go @@ -17,11 +17,12 @@ package module import ( - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/ending" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/task" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/task" ) type BaseTaskModule struct { diff --git a/pkg/core/pipeline/pipeline.go b/pkg/core/pipeline/pipeline.go index e131295dd..19b1444f6 100644 --- a/pkg/core/pipeline/pipeline.go +++ b/pkg/core/pipeline/pipeline.go @@ -23,11 +23,11 @@ import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/ending" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/module" ) var logo = ` diff --git a/pkg/core/prepare/base.go b/pkg/core/prepare/base.go index 6c91e8bc8..5bb869a42 100644 --- a/pkg/core/prepare/base.go +++ b/pkg/core/prepare/base.go @@ -17,8 +17,8 @@ package prepare import ( - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type BasePrepare struct { diff --git a/pkg/core/prepare/fast_prepare.go b/pkg/core/prepare/fast_prepare.go index 820cc2b27..2dc0ce9cc 100644 --- a/pkg/core/prepare/fast_prepare.go +++ b/pkg/core/prepare/fast_prepare.go @@ -17,7 +17,7 @@ package prepare import ( - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type FastPrepare struct { diff --git a/pkg/core/prepare/file_check.go b/pkg/core/prepare/file_check.go index 714f9bc2e..ee3f4f52f 100644 --- a/pkg/core/prepare/file_check.go +++ b/pkg/core/prepare/file_check.go @@ -16,7 +16,7 @@ package prepare -import "github.com/kubesphere/kubekey/pkg/core/connector" +import "github.com/kubesphere/kubekey/v2/pkg/core/connector" type FileExist struct { BasePrepare diff --git a/pkg/core/prepare/interface.go b/pkg/core/prepare/interface.go index 1caad99e1..b62438a30 100644 --- a/pkg/core/prepare/interface.go +++ b/pkg/core/prepare/interface.go @@ -17,8 +17,8 @@ package prepare import ( - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type Prepare interface { diff --git a/pkg/core/rollback/base.go b/pkg/core/rollback/base.go index 635842ae5..02fb438e7 100644 --- a/pkg/core/rollback/base.go +++ b/pkg/core/rollback/base.go @@ -17,9 +17,9 @@ package rollback import ( - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/ending" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" ) type BaseRollback struct { diff --git a/pkg/core/rollback/interface.go b/pkg/core/rollback/interface.go index 1f117314e..aafdcdb93 100644 --- a/pkg/core/rollback/interface.go +++ b/pkg/core/rollback/interface.go @@ -17,9 +17,9 @@ package rollback import ( - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/ending" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" ) type Rollback interface { diff --git a/pkg/core/task/interface.go b/pkg/core/task/interface.go index 0e2765f5b..373738cfd 100644 --- a/pkg/core/task/interface.go +++ b/pkg/core/task/interface.go @@ -17,9 +17,9 @@ package task import ( - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/ending" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" ) type Interface interface { diff --git a/pkg/core/task/local_task.go b/pkg/core/task/local_task.go index e4e656575..c294dda5f 100644 --- a/pkg/core/task/local_task.go +++ b/pkg/core/task/local_task.go @@ -23,15 +23,15 @@ import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/ending" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/rollback" - "github.com/kubesphere/kubekey/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/rollback" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) type LocalTask struct { diff --git a/pkg/core/task/remote_task.go b/pkg/core/task/remote_task.go index 8022ab325..942b78db1 100644 --- a/pkg/core/task/remote_task.go +++ b/pkg/core/task/remote_task.go @@ -24,14 +24,14 @@ import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/ending" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/rollback" - "github.com/kubesphere/kubekey/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/ending" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/rollback" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) type RemoteTask struct { diff --git a/pkg/core/task/remote_task_test.go b/pkg/core/task/remote_task_test.go index 7d8bfe7ac..cb50a8f39 100644 --- a/pkg/core/task/remote_task_test.go +++ b/pkg/core/task/remote_task_test.go @@ -17,8 +17,9 @@ package task import ( - "github.com/kubesphere/kubekey/pkg/core/connector" "testing" + + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) func TestTask_calculateConcurrency(t1 *testing.T) { diff --git a/pkg/core/util/file.go b/pkg/core/util/file.go index 433adeb96..85860a068 100644 --- a/pkg/core/util/file.go +++ b/pkg/core/util/file.go @@ -21,14 +21,15 @@ import ( "compress/gzip" "crypto/md5" "fmt" - "github.com/kubesphere/kubekey/pkg/core/common" - "github.com/kubesphere/kubekey/pkg/core/logger" "io" "io/fs" "io/ioutil" "os" "path/filepath" "strings" + + "github.com/kubesphere/kubekey/v2/pkg/core/common" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" ) func IsExist(path string) bool { diff --git a/pkg/core/util/ip.go b/pkg/core/util/ip.go index 9378f267e..038c4e83e 100644 --- a/pkg/core/util/ip.go +++ b/pkg/core/util/ip.go @@ -18,11 +18,13 @@ package util import ( "encoding/binary" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/pkg/errors" "net" "strconv" "strings" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/core/logger" ) func ParseIp(ip string) []string { diff --git a/pkg/etcd/certs.go b/pkg/etcd/certs.go index d08e96d60..84ffb331c 100644 --- a/pkg/etcd/certs.go +++ b/pkg/etcd/certs.go @@ -19,20 +19,22 @@ package etcd import ( "crypto/x509" "fmt" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/utils/certs" - "github.com/pkg/errors" "io/ioutil" - "k8s.io/client-go/util/cert" - certutil "k8s.io/client-go/util/cert" - netutils "k8s.io/utils/net" "net" "os" "path/filepath" "strings" + + "github.com/pkg/errors" + "k8s.io/client-go/util/cert" + certutil "k8s.io/client-go/util/cert" + netutils "k8s.io/utils/net" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/utils/certs" ) // KubekeyCertEtcdCA is the definition of the root CA used by the hosted etcd server. diff --git a/pkg/etcd/module.go b/pkg/etcd/module.go index 0bd1f9b98..ed587485c 100644 --- a/pkg/etcd/module.go +++ b/pkg/etcd/module.go @@ -19,12 +19,12 @@ package etcd import ( "path/filepath" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/etcd/templates" + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/etcd/templates" ) type PreCheckModule struct { diff --git a/pkg/etcd/prepares.go b/pkg/etcd/prepares.go index 49153acdf..b0652829c 100644 --- a/pkg/etcd/prepares.go +++ b/pkg/etcd/prepares.go @@ -19,9 +19,10 @@ package etcd import ( "strings" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type FirstETCDNode struct { diff --git a/pkg/etcd/tasks.go b/pkg/etcd/tasks.go index ab9b75985..426729bff 100644 --- a/pkg/etcd/tasks.go +++ b/pkg/etcd/tasks.go @@ -21,17 +21,16 @@ import ( "path/filepath" "strings" - "github.com/kubesphere/kubekey/pkg/files" - "github.com/pkg/errors" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/etcd/templates" - "github.com/kubesphere/kubekey/pkg/utils" + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/etcd/templates" + "github.com/kubesphere/kubekey/v2/pkg/files" + "github.com/kubesphere/kubekey/v2/pkg/utils" ) type EtcdNode struct { diff --git a/pkg/files/file.go b/pkg/files/file.go index 6ffed791b..9fd0f6c77 100644 --- a/pkg/files/file.go +++ b/pkg/files/file.go @@ -26,9 +26,10 @@ import ( "path/filepath" "strings" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/util" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) const ( diff --git a/pkg/filesystem/module.go b/pkg/filesystem/module.go index af2f1d404..ab1b5e6aa 100644 --- a/pkg/filesystem/module.go +++ b/pkg/filesystem/module.go @@ -17,9 +17,9 @@ package filesystem import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/task" ) type ChownModule struct { diff --git a/pkg/filesystem/task.go b/pkg/filesystem/task.go index ee5d4aad4..236d9ea14 100644 --- a/pkg/filesystem/task.go +++ b/pkg/filesystem/task.go @@ -18,11 +18,13 @@ package filesystem import ( "fmt" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/pkg/errors" "os/exec" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/util" ) type ChownFileAndDir struct { diff --git a/pkg/hooks/kube_hook.go b/pkg/hooks/kube_hook.go index 2be428f17..af80c26b9 100644 --- a/pkg/hooks/kube_hook.go +++ b/pkg/hooks/kube_hook.go @@ -17,9 +17,9 @@ package hooks import ( - kubekeycontroller "github.com/kubesphere/kubekey/controllers/kubekey" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" + kubekeycontroller "github.com/kubesphere/kubekey/v2/controllers/kubekey" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" ) type UpdateCRStatusHook struct { diff --git a/pkg/images/images.go b/pkg/images/images.go index 329066b2b..a5b5040e0 100644 --- a/pkg/images/images.go +++ b/pkg/images/images.go @@ -18,12 +18,14 @@ package images import ( "fmt" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/pkg/errors" "os" + + "github.com/pkg/errors" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" ) const ( diff --git a/pkg/images/module.go b/pkg/images/module.go index e7bb65028..e299d489f 100644 --- a/pkg/images/module.go +++ b/pkg/images/module.go @@ -17,8 +17,8 @@ package images import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/task" ) type PullModule struct { diff --git a/pkg/images/tasks.go b/pkg/images/tasks.go index 05ce3388e..1680e4841 100644 --- a/pkg/images/tasks.go +++ b/pkg/images/tasks.go @@ -23,17 +23,17 @@ import ( "path/filepath" "strings" - manifesttypes "github.com/estesp/manifest-tool/v2/pkg/types" - coreutil "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/registry" - manifestregistry "github.com/estesp/manifest-tool/v2/pkg/registry" - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" + manifesttypes "github.com/estesp/manifest-tool/v2/pkg/types" "github.com/pkg/errors" versionutil "k8s.io/apimachinery/pkg/util/version" + + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + coreutil "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/registry" ) type PullImage struct { diff --git a/pkg/images/utils.go b/pkg/images/utils.go index 4bb41c0df..d301a342c 100644 --- a/pkg/images/utils.go +++ b/pkg/images/utils.go @@ -18,12 +18,14 @@ package images import ( "fmt" + "strings" + "github.com/containerd/containerd/platforms" "github.com/containers/image/v5/types" manifesttypes "github.com/estesp/manifest-tool/v2/pkg/types" - "github.com/kubesphere/kubekey/pkg/core/logger" ocispec "github.com/opencontainers/image-spec/specs-go/v1" - "strings" + + "github.com/kubesphere/kubekey/v2/pkg/core/logger" ) var defaultUserAgent = "kubekey" diff --git a/pkg/k3s/k3s_status.go b/pkg/k3s/k3s_status.go index 35a3885ba..8b34e9cee 100644 --- a/pkg/k3s/k3s_status.go +++ b/pkg/k3s/k3s_status.go @@ -18,13 +18,15 @@ package k3s import ( "fmt" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/pkg/errors" "io/ioutil" "path/filepath" "regexp" "strings" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type K3sStatus struct { diff --git a/pkg/k3s/module.go b/pkg/k3s/module.go index 919f6fcdd..bcb16c99e 100644 --- a/pkg/k3s/module.go +++ b/pkg/k3s/module.go @@ -17,12 +17,13 @@ package k3s import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/k3s/templates" "path/filepath" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/k3s/templates" ) type StatusModule struct { diff --git a/pkg/k3s/prepares.go b/pkg/k3s/prepares.go index ceecbe499..d416d0518 100644 --- a/pkg/k3s/prepares.go +++ b/pkg/k3s/prepares.go @@ -17,9 +17,10 @@ package k3s import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type NodeInCluster struct { diff --git a/pkg/k3s/tasks.go b/pkg/k3s/tasks.go index 250219e47..d5aeae713 100644 --- a/pkg/k3s/tasks.go +++ b/pkg/k3s/tasks.go @@ -20,26 +20,27 @@ import ( "context" "encoding/base64" "fmt" - "github.com/kubesphere/kubekey/pkg/registry" "path/filepath" "strings" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - kubekeyregistry "github.com/kubesphere/kubekey/pkg/bootstrap/registry" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/files" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/k3s/templates" - "github.com/kubesphere/kubekey/pkg/utils" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" versionutil "k8s.io/apimachinery/pkg/util/version" kube "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + kubekeyregistry "github.com/kubesphere/kubekey/v2/pkg/bootstrap/registry" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/files" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/k3s/templates" + "github.com/kubesphere/kubekey/v2/pkg/registry" + "github.com/kubesphere/kubekey/v2/pkg/utils" ) type GetClusterStatus struct { diff --git a/pkg/k3s/templates/k3sRegistryConfig.go b/pkg/k3s/templates/k3sRegistryConfig.go index 55e36fa8e..f1bf5adec 100644 --- a/pkg/k3s/templates/k3sRegistryConfig.go +++ b/pkg/k3s/templates/k3sRegistryConfig.go @@ -17,9 +17,11 @@ package templates import ( - "github.com/kubesphere/kubekey/pkg/utils" - "github.com/lithammer/dedent" "text/template" + + "github.com/lithammer/dedent" + + "github.com/kubesphere/kubekey/v2/pkg/utils" ) var ( diff --git a/pkg/k8e/k8e_status.go b/pkg/k8e/k8e_status.go index adbf05d52..ac83d4ecc 100644 --- a/pkg/k8e/k8e_status.go +++ b/pkg/k8e/k8e_status.go @@ -23,9 +23,10 @@ import ( "regexp" "strings" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type K8eStatus struct { diff --git a/pkg/k8e/module.go b/pkg/k8e/module.go index 5e1b0bde6..480b0064d 100644 --- a/pkg/k8e/module.go +++ b/pkg/k8e/module.go @@ -19,11 +19,11 @@ package k8e import ( "path/filepath" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/k8e/templates" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/k8e/templates" ) type StatusModule struct { diff --git a/pkg/k8e/prepares.go b/pkg/k8e/prepares.go index b2eb94e71..0f2e0a7cc 100644 --- a/pkg/k8e/prepares.go +++ b/pkg/k8e/prepares.go @@ -17,9 +17,10 @@ package k8e import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type NodeInCluster struct { diff --git a/pkg/k8e/tasks.go b/pkg/k8e/tasks.go index 3825fb766..2233f439a 100644 --- a/pkg/k8e/tasks.go +++ b/pkg/k8e/tasks.go @@ -23,21 +23,22 @@ import ( "path/filepath" "strings" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/files" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/k8e/templates" - "github.com/kubesphere/kubekey/pkg/utils" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" versionutil "k8s.io/apimachinery/pkg/util/version" kube "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/files" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/k8e/templates" + "github.com/kubesphere/kubekey/v2/pkg/utils" ) type GetClusterStatus struct { diff --git a/pkg/kubernetes/kubernetes_status.go b/pkg/kubernetes/kubernetes_status.go index 4221d1d30..6c01d57d6 100644 --- a/pkg/kubernetes/kubernetes_status.go +++ b/pkg/kubernetes/kubernetes_status.go @@ -18,13 +18,15 @@ package kubernetes import ( "fmt" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/pkg/errors" "io/ioutil" "path/filepath" "regexp" "strings" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type KubernetesStatus struct { diff --git a/pkg/kubernetes/module.go b/pkg/kubernetes/module.go index b98f4b45f..ba8b89192 100644 --- a/pkg/kubernetes/module.go +++ b/pkg/kubernetes/module.go @@ -23,13 +23,13 @@ import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/binaries" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/kubernetes/templates" + "github.com/kubesphere/kubekey/v2/pkg/binaries" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes/templates" ) type StatusModule struct { diff --git a/pkg/kubernetes/prepares.go b/pkg/kubernetes/prepares.go index b02598c64..e863f0b29 100644 --- a/pkg/kubernetes/prepares.go +++ b/pkg/kubernetes/prepares.go @@ -17,9 +17,10 @@ package kubernetes import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type NoClusterInfo struct { diff --git a/pkg/kubernetes/tasks.go b/pkg/kubernetes/tasks.go index 94f23fc2b..be3681a12 100644 --- a/pkg/kubernetes/tasks.go +++ b/pkg/kubernetes/tasks.go @@ -26,8 +26,6 @@ import ( "strings" "time" - "github.com/kubesphere/kubekey/pkg/etcd" - "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" kubeerrors "k8s.io/apimachinery/pkg/api/errors" @@ -36,21 +34,22 @@ import ( kube "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" - kubekeyv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/files" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/kubernetes/templates" - "github.com/kubesphere/kubekey/pkg/kubernetes/templates/v1beta2" - "github.com/kubesphere/kubekey/pkg/plugins/dns" - dnsTemplates "github.com/kubesphere/kubekey/pkg/plugins/dns/templates" - "github.com/kubesphere/kubekey/pkg/utils" + kubekeyv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/etcd" + "github.com/kubesphere/kubekey/v2/pkg/files" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes/templates" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes/templates/v1beta2" + "github.com/kubesphere/kubekey/v2/pkg/plugins/dns" + dnsTemplates "github.com/kubesphere/kubekey/v2/pkg/plugins/dns/templates" + "github.com/kubesphere/kubekey/v2/pkg/utils" ) type GetClusterStatus struct { diff --git a/pkg/kubernetes/templates/v1beta2/kubeadm_config.go b/pkg/kubernetes/templates/v1beta2/kubeadm_config.go index d711edd66..c55743b3e 100644 --- a/pkg/kubernetes/templates/v1beta2/kubeadm_config.go +++ b/pkg/kubernetes/templates/v1beta2/kubeadm_config.go @@ -21,17 +21,15 @@ import ( "strings" "text/template" - "github.com/kubesphere/kubekey/pkg/utils" - - versionutil "k8s.io/apimachinery/pkg/util/version" - "github.com/lithammer/dedent" "github.com/pkg/errors" "gopkg.in/yaml.v2" + versionutil "k8s.io/apimachinery/pkg/util/version" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/utils" ) var ( diff --git a/pkg/kubesphere/kubesphere_test.go b/pkg/kubesphere/kubesphere_test.go index 70ed952c3..049c541dd 100644 --- a/pkg/kubesphere/kubesphere_test.go +++ b/pkg/kubesphere/kubesphere_test.go @@ -17,9 +17,10 @@ package kubesphere import ( - "github.com/kubesphere/kubekey/pkg/version/kubesphere" "reflect" "testing" + + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" ) func Test_mirrorRepo(t *testing.T) { diff --git a/pkg/kubesphere/modules.go b/pkg/kubesphere/modules.go index 506ef5c8e..04bebf965 100644 --- a/pkg/kubesphere/modules.go +++ b/pkg/kubesphere/modules.go @@ -18,15 +18,16 @@ package kubesphere import ( "fmt" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/version/kubesphere" - "github.com/kubesphere/kubekey/pkg/version/kubesphere/templates" "os" "path/filepath" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere/templates" ) type DeployModule struct { diff --git a/pkg/kubesphere/prepares.go b/pkg/kubesphere/prepares.go index 134e64867..dc71834ee 100644 --- a/pkg/kubesphere/prepares.go +++ b/pkg/kubesphere/prepares.go @@ -17,10 +17,11 @@ package kubesphere import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" "github.com/pkg/errors" versionutil "k8s.io/apimachinery/pkg/util/version" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type VersionBelowV3 struct { diff --git a/pkg/kubesphere/tasks.go b/pkg/kubesphere/tasks.go index 3ecccd799..352d3ae1c 100644 --- a/pkg/kubesphere/tasks.go +++ b/pkg/kubesphere/tasks.go @@ -20,20 +20,22 @@ import ( "context" "encoding/base64" "fmt" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" - ksv2 "github.com/kubesphere/kubekey/pkg/kubesphere/v2" - ksv3 "github.com/kubesphere/kubekey/pkg/kubesphere/v3" - "github.com/kubesphere/kubekey/pkg/version/kubesphere" - "github.com/kubesphere/kubekey/pkg/version/kubesphere/templates" - "github.com/pkg/errors" - yamlV2 "gopkg.in/yaml.v2" "os" "path/filepath" "strings" "time" + + "github.com/pkg/errors" + yamlV2 "gopkg.in/yaml.v2" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + ksv2 "github.com/kubesphere/kubekey/v2/pkg/kubesphere/v2" + ksv3 "github.com/kubesphere/kubekey/v2/pkg/kubesphere/v3" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere/templates" ) type AddInstallerConfig struct { diff --git a/pkg/loadbalancer/module.go b/pkg/loadbalancer/module.go index 908edfa95..8ef0f0b77 100644 --- a/pkg/loadbalancer/module.go +++ b/pkg/loadbalancer/module.go @@ -19,14 +19,14 @@ package loadbalancer import ( "path/filepath" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/loadbalancer/templates" + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/loadbalancer/templates" ) type HaproxyModule struct { diff --git a/pkg/loadbalancer/prepares.go b/pkg/loadbalancer/prepares.go index 243fb5861..ba164544f 100644 --- a/pkg/loadbalancer/prepares.go +++ b/pkg/loadbalancer/prepares.go @@ -17,11 +17,13 @@ package loadbalancer import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/pkg/errors" "strings" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" ) type updateK3sPrepare struct { diff --git a/pkg/loadbalancer/tasks.go b/pkg/loadbalancer/tasks.go index 1954850bd..fc6464311 100644 --- a/pkg/loadbalancer/tasks.go +++ b/pkg/loadbalancer/tasks.go @@ -22,13 +22,14 @@ import ( "strconv" "strings" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/loadbalancer/templates" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/loadbalancer/templates" ) type GetChecksum struct { diff --git a/pkg/loadbalancer/templates/haproxyConfig.go b/pkg/loadbalancer/templates/haproxyConfig.go index 70545f542..f4e279826 100644 --- a/pkg/loadbalancer/templates/haproxyConfig.go +++ b/pkg/loadbalancer/templates/haproxyConfig.go @@ -17,12 +17,14 @@ package templates import ( - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/lithammer/dedent" "strconv" "text/template" + + "github.com/lithammer/dedent" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) var HaproxyConfig = template.Must(template.New("haproxy.cfg").Parse( diff --git a/pkg/phase/artifact/artifact.go b/pkg/phase/artifact/artifact.go index 74c259ffa..6a2806e1b 100755 --- a/pkg/phase/artifact/artifact.go +++ b/pkg/phase/artifact/artifact.go @@ -19,10 +19,10 @@ package artifact import ( "errors" - "github.com/kubesphere/kubekey/pkg/artifact" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/artifact" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" ) func NewArtifactImportPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/binary/create_binary.go b/pkg/phase/binary/create_binary.go index a8eca0ab9..670af3560 100755 --- a/pkg/phase/binary/create_binary.go +++ b/pkg/phase/binary/create_binary.go @@ -20,11 +20,11 @@ import ( "errors" "fmt" - "github.com/kubesphere/kubekey/pkg/binaries" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/binaries" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" ) func NewCreateBinaryPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/binary/modules.go b/pkg/phase/binary/modules.go index a6151e373..3939ed3c0 100755 --- a/pkg/phase/binary/modules.go +++ b/pkg/phase/binary/modules.go @@ -17,9 +17,9 @@ package binary import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" ) type SyncBinaryModule struct { diff --git a/pkg/phase/binary/task.go b/pkg/phase/binary/task.go index 955ae7b97..237ebdf93 100755 --- a/pkg/phase/binary/task.go +++ b/pkg/phase/binary/task.go @@ -3,12 +3,13 @@ package binary import ( "fmt" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/cache" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/files" "github.com/pkg/errors" + + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/cache" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/files" ) type GetBinaryPath struct { diff --git a/pkg/phase/binary/upgrade_binary.go b/pkg/phase/binary/upgrade_binary.go index f053b7ae5..13afb70a4 100755 --- a/pkg/phase/binary/upgrade_binary.go +++ b/pkg/phase/binary/upgrade_binary.go @@ -20,11 +20,11 @@ import ( "errors" "fmt" - "github.com/kubesphere/kubekey/pkg/binaries" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/phase/precheck" + "github.com/kubesphere/kubekey/v2/pkg/binaries" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/phase/precheck" ) func NewUpgradeBinaryPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/confirm/confirm.go b/pkg/phase/confirm/confirm.go index 586097757..25d2aa4d1 100644 --- a/pkg/phase/confirm/confirm.go +++ b/pkg/phase/confirm/confirm.go @@ -1,8 +1,8 @@ package confirm import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/task" ) type UpgradeK8sConfirmModule struct { diff --git a/pkg/phase/confirm/task.go b/pkg/phase/confirm/task.go index 53d088b3e..6c0d20912 100644 --- a/pkg/phase/confirm/task.go +++ b/pkg/phase/confirm/task.go @@ -7,13 +7,14 @@ import ( "os" "strings" - "github.com/kubesphere/kubekey/pkg/bootstrap/confirm" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" "github.com/mitchellh/mapstructure" "github.com/modood/table" versionutil "k8s.io/apimachinery/pkg/util/version" + + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/confirm" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" ) type UpgradeK8sConfirm struct { diff --git a/pkg/phase/etcd/etcd.go b/pkg/phase/etcd/etcd.go index f4704ecbe..32875a7bb 100755 --- a/pkg/phase/etcd/etcd.go +++ b/pkg/phase/etcd/etcd.go @@ -19,11 +19,11 @@ package etcd import ( "errors" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/etcd" + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/etcd" ) func NewCreateEtcdPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/etcd/modules.go b/pkg/phase/etcd/modules.go index ef392177e..15478eb1e 100755 --- a/pkg/phase/etcd/modules.go +++ b/pkg/phase/etcd/modules.go @@ -1,10 +1,10 @@ package etcd import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/etcd" - "github.com/kubesphere/kubekey/pkg/phase/binary" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/etcd" + "github.com/kubesphere/kubekey/v2/pkg/phase/binary" ) type PreCheckModule struct { diff --git a/pkg/phase/images/create_images.go b/pkg/phase/images/create_images.go index 1bd6e54c1..c7b4dd932 100755 --- a/pkg/phase/images/create_images.go +++ b/pkg/phase/images/create_images.go @@ -19,12 +19,12 @@ package images import ( "errors" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/container" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/container" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" ) func NewCreateImagesPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/images/modules.go b/pkg/phase/images/modules.go index 67504be6b..30a32e80a 100644 --- a/pkg/phase/images/modules.go +++ b/pkg/phase/images/modules.go @@ -17,11 +17,11 @@ package images import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/kubernetes" - "github.com/kubesphere/kubekey/pkg/phase/binary" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/phase/binary" ) type UpgradeImagesModule struct { diff --git a/pkg/phase/images/upgrade_images.go b/pkg/phase/images/upgrade_images.go index d66acc4d8..9cfc72714 100755 --- a/pkg/phase/images/upgrade_images.go +++ b/pkg/phase/images/upgrade_images.go @@ -19,10 +19,10 @@ package images import ( "errors" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/phase/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/phase/precheck" ) func NewUpgradeImagesPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/kubernetes/configure.go b/pkg/phase/kubernetes/configure.go index f52181752..74c33d353 100755 --- a/pkg/phase/kubernetes/configure.go +++ b/pkg/phase/kubernetes/configure.go @@ -19,17 +19,17 @@ package kubernetes import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/addons" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/certs" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/filesystem" - "github.com/kubesphere/kubekey/pkg/kubernetes" - "github.com/kubesphere/kubekey/pkg/plugins" - "github.com/kubesphere/kubekey/pkg/plugins/network" - "github.com/kubesphere/kubekey/pkg/plugins/storage" + "github.com/kubesphere/kubekey/v2/pkg/addons" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/certs" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/filesystem" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/plugins" + "github.com/kubesphere/kubekey/v2/pkg/plugins/network" + "github.com/kubesphere/kubekey/v2/pkg/plugins/storage" ) func NewCreateConfigureKubernetesPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/kubernetes/init.go b/pkg/phase/kubernetes/init.go index 56c47af09..89372f4e7 100644 --- a/pkg/phase/kubernetes/init.go +++ b/pkg/phase/kubernetes/init.go @@ -19,13 +19,13 @@ package kubernetes import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/kubernetes" - "github.com/kubesphere/kubekey/pkg/phase/confirm" - "github.com/kubesphere/kubekey/pkg/plugins/dns" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/phase/confirm" + "github.com/kubesphere/kubekey/v2/pkg/plugins/dns" ) func NewCreateInitClusterPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/kubernetes/join.go b/pkg/phase/kubernetes/join.go index f03219d6f..65f5f6be3 100644 --- a/pkg/phase/kubernetes/join.go +++ b/pkg/phase/kubernetes/join.go @@ -19,11 +19,11 @@ package kubernetes import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" ) func NewCreateJoinNodesPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/kubernetes/modules.go b/pkg/phase/kubernetes/modules.go index 684bb370e..826a5b1f8 100644 --- a/pkg/phase/kubernetes/modules.go +++ b/pkg/phase/kubernetes/modules.go @@ -3,11 +3,11 @@ package kubernetes import ( "path/filepath" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/kubernetes" - "github.com/kubesphere/kubekey/pkg/kubernetes/templates" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes/templates" ) type InstallKubeletModule struct { diff --git a/pkg/phase/kubesphere/create_kubesphere.go b/pkg/phase/kubesphere/create_kubesphere.go index 3c698f722..7ae4e32e7 100755 --- a/pkg/phase/kubesphere/create_kubesphere.go +++ b/pkg/phase/kubesphere/create_kubesphere.go @@ -19,12 +19,12 @@ package alpha import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/kubesphere" - "github.com/kubesphere/kubekey/pkg/phase/confirm" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/kubesphere" + "github.com/kubesphere/kubekey/v2/pkg/phase/confirm" ) func NewCreateKubeSpherePipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/kubesphere/upgrade_kubesphere.go b/pkg/phase/kubesphere/upgrade_kubesphere.go index ed6df5508..9d50d719e 100755 --- a/pkg/phase/kubesphere/upgrade_kubesphere.go +++ b/pkg/phase/kubesphere/upgrade_kubesphere.go @@ -19,12 +19,12 @@ package alpha import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/kubesphere" - "github.com/kubesphere/kubekey/pkg/phase/confirm" - "github.com/kubesphere/kubekey/pkg/phase/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/kubesphere" + "github.com/kubesphere/kubekey/v2/pkg/phase/confirm" + "github.com/kubesphere/kubekey/v2/pkg/phase/precheck" ) func NewUpgradeKubeSpherePipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/nodes/modules.go b/pkg/phase/nodes/modules.go index 00128b75d..20f8c8973 100644 --- a/pkg/phase/nodes/modules.go +++ b/pkg/phase/nodes/modules.go @@ -17,10 +17,10 @@ package nodes import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" ) type UpgradeNodesModule struct { diff --git a/pkg/phase/nodes/nodes.go b/pkg/phase/nodes/nodes.go index 12535179e..b7791e608 100755 --- a/pkg/phase/nodes/nodes.go +++ b/pkg/phase/nodes/nodes.go @@ -19,11 +19,11 @@ package nodes import ( "errors" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/phase/confirm" - "github.com/kubesphere/kubekey/pkg/phase/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/phase/confirm" + "github.com/kubesphere/kubekey/v2/pkg/phase/precheck" ) func NewUpgradeNodesPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/os/config.go b/pkg/phase/os/config.go index 7a9a78cc1..887f725d2 100755 --- a/pkg/phase/os/config.go +++ b/pkg/phase/os/config.go @@ -19,11 +19,11 @@ package os import ( "errors" - "github.com/kubesphere/kubekey/pkg/bootstrap/os" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/os" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" ) func NewConfigOSPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/phase/precheck/modules.go b/pkg/phase/precheck/modules.go index 1b5f2f02d..b53e96245 100755 --- a/pkg/phase/precheck/modules.go +++ b/pkg/phase/precheck/modules.go @@ -13,13 +13,14 @@ See the License for the specific language governing permissions and limitations under the License. */ + package precheck import ( - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" ) type UprgadePreCheckModule struct { diff --git a/pkg/phase/precheck/task.go b/pkg/phase/precheck/task.go index 798175bc8..a887cf274 100644 --- a/pkg/phase/precheck/task.go +++ b/pkg/phase/precheck/task.go @@ -1,18 +1,19 @@ /* - Copyright 2022 The KubeSphere Authors. +Copyright 2022 The KubeSphere Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + package precheck import ( @@ -21,10 +22,11 @@ import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/version/kubesphere" versionutil "k8s.io/apimachinery/pkg/util/version" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere" ) type CheckUpgradeK8sVersion struct { diff --git a/pkg/pipelines/add_nodes.go b/pkg/pipelines/add_nodes.go index 4b2e18902..5d1313b6f 100644 --- a/pkg/pipelines/add_nodes.go +++ b/pkg/pipelines/add_nodes.go @@ -19,27 +19,27 @@ package pipelines import ( "fmt" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - kubekeycontroller "github.com/kubesphere/kubekey/controllers/kubekey" - "github.com/kubesphere/kubekey/pkg/artifact" - "github.com/kubesphere/kubekey/pkg/binaries" - "github.com/kubesphere/kubekey/pkg/bootstrap/confirm" - "github.com/kubesphere/kubekey/pkg/bootstrap/os" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/bootstrap/registry" - "github.com/kubesphere/kubekey/pkg/certs" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/container" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/etcd" - "github.com/kubesphere/kubekey/pkg/filesystem" - "github.com/kubesphere/kubekey/pkg/hooks" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/k3s" - "github.com/kubesphere/kubekey/pkg/k8e" - "github.com/kubesphere/kubekey/pkg/kubernetes" - "github.com/kubesphere/kubekey/pkg/loadbalancer" + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + kubekeycontroller "github.com/kubesphere/kubekey/v2/controllers/kubekey" + "github.com/kubesphere/kubekey/v2/pkg/artifact" + "github.com/kubesphere/kubekey/v2/pkg/binaries" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/confirm" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/os" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/registry" + "github.com/kubesphere/kubekey/v2/pkg/certs" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/container" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/etcd" + "github.com/kubesphere/kubekey/v2/pkg/filesystem" + "github.com/kubesphere/kubekey/v2/pkg/hooks" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/k3s" + "github.com/kubesphere/kubekey/v2/pkg/k8e" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/loadbalancer" ) func NewAddNodesPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/pipelines/artifact_export.go b/pkg/pipelines/artifact_export.go index cbe67f49d..0c2cea738 100644 --- a/pkg/pipelines/artifact_export.go +++ b/pkg/pipelines/artifact_export.go @@ -21,14 +21,14 @@ import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/artifact" - "github.com/kubesphere/kubekey/pkg/binaries" - "github.com/kubesphere/kubekey/pkg/bootstrap/confirm" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/filesystem" - "github.com/kubesphere/kubekey/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/artifact" + "github.com/kubesphere/kubekey/v2/pkg/binaries" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/confirm" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/filesystem" + "github.com/kubesphere/kubekey/v2/pkg/images" ) func NewArtifactExportPipeline(runtime *common.ArtifactRuntime) error { diff --git a/pkg/pipelines/check_certs.go b/pkg/pipelines/check_certs.go index 011ec809e..39c5eaf19 100644 --- a/pkg/pipelines/check_certs.go +++ b/pkg/pipelines/check_certs.go @@ -17,11 +17,11 @@ package pipelines import ( - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/certs" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/certs" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" ) func CheckCertsPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/pipelines/create_cluster.go b/pkg/pipelines/create_cluster.go index ba2769723..bf339eb7a 100644 --- a/pkg/pipelines/create_cluster.go +++ b/pkg/pipelines/create_cluster.go @@ -22,33 +22,32 @@ import ( "io/ioutil" "path/filepath" - kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/artifact" - "github.com/kubesphere/kubekey/pkg/bootstrap/confirm" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/certs" - "github.com/kubesphere/kubekey/pkg/container" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/k8e" - "github.com/kubesphere/kubekey/pkg/kubernetes" - "github.com/kubesphere/kubekey/pkg/plugins" - "github.com/kubesphere/kubekey/pkg/plugins/dns" - - kubekeycontroller "github.com/kubesphere/kubekey/controllers/kubekey" - "github.com/kubesphere/kubekey/pkg/addons" - "github.com/kubesphere/kubekey/pkg/binaries" - "github.com/kubesphere/kubekey/pkg/bootstrap/os" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/etcd" - "github.com/kubesphere/kubekey/pkg/filesystem" - "github.com/kubesphere/kubekey/pkg/hooks" - "github.com/kubesphere/kubekey/pkg/k3s" - "github.com/kubesphere/kubekey/pkg/kubesphere" - "github.com/kubesphere/kubekey/pkg/loadbalancer" - "github.com/kubesphere/kubekey/pkg/plugins/network" - "github.com/kubesphere/kubekey/pkg/plugins/storage" + kubekeyapiv1alpha2 "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + kubekeycontroller "github.com/kubesphere/kubekey/v2/controllers/kubekey" + "github.com/kubesphere/kubekey/v2/pkg/addons" + "github.com/kubesphere/kubekey/v2/pkg/artifact" + "github.com/kubesphere/kubekey/v2/pkg/binaries" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/confirm" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/os" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/certs" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/container" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/etcd" + "github.com/kubesphere/kubekey/v2/pkg/filesystem" + "github.com/kubesphere/kubekey/v2/pkg/hooks" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/k3s" + "github.com/kubesphere/kubekey/v2/pkg/k8e" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/kubesphere" + "github.com/kubesphere/kubekey/v2/pkg/loadbalancer" + "github.com/kubesphere/kubekey/v2/pkg/plugins" + "github.com/kubesphere/kubekey/v2/pkg/plugins/dns" + "github.com/kubesphere/kubekey/v2/pkg/plugins/network" + "github.com/kubesphere/kubekey/v2/pkg/plugins/storage" ) func NewCreateClusterPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/pipelines/delete_cluster.go b/pkg/pipelines/delete_cluster.go index 2d5f6169a..d0af95e5a 100644 --- a/pkg/pipelines/delete_cluster.go +++ b/pkg/pipelines/delete_cluster.go @@ -17,18 +17,18 @@ package pipelines import ( - "github.com/kubesphere/kubekey/pkg/bootstrap/confirm" - "github.com/kubesphere/kubekey/pkg/bootstrap/os" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/certs" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/container" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/k3s" - "github.com/kubesphere/kubekey/pkg/k8e" - "github.com/kubesphere/kubekey/pkg/kubernetes" - "github.com/kubesphere/kubekey/pkg/loadbalancer" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/confirm" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/os" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/certs" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/container" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/k3s" + "github.com/kubesphere/kubekey/v2/pkg/k8e" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/loadbalancer" ) func NewDeleteClusterPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/pipelines/delete_node.go b/pkg/pipelines/delete_node.go index cfd230645..ff4ea32c7 100644 --- a/pkg/pipelines/delete_node.go +++ b/pkg/pipelines/delete_node.go @@ -17,14 +17,14 @@ package pipelines import ( - "github.com/kubesphere/kubekey/pkg/bootstrap/confirm" - "github.com/kubesphere/kubekey/pkg/bootstrap/os" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/kubernetes" - "github.com/kubesphere/kubekey/pkg/loadbalancer" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/confirm" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/os" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/loadbalancer" ) func DeleteNodePipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/pipelines/init_dependencies.go b/pkg/pipelines/init_dependencies.go index 778f8bce7..47211df08 100644 --- a/pkg/pipelines/init_dependencies.go +++ b/pkg/pipelines/init_dependencies.go @@ -17,13 +17,13 @@ package pipelines import ( - "github.com/kubesphere/kubekey/pkg/artifact" - "github.com/kubesphere/kubekey/pkg/bootstrap/os" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/filesystem" + "github.com/kubesphere/kubekey/v2/pkg/artifact" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/os" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/filesystem" ) func NewInitDependenciesPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/pipelines/init_registry.go b/pkg/pipelines/init_registry.go index 44559fe41..6b807f4dd 100644 --- a/pkg/pipelines/init_registry.go +++ b/pkg/pipelines/init_registry.go @@ -18,15 +18,16 @@ package pipelines import ( "fmt" - "github.com/kubesphere/kubekey/pkg/artifact" - "github.com/kubesphere/kubekey/pkg/binaries" - "github.com/kubesphere/kubekey/pkg/bootstrap/os" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/bootstrap/registry" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/filesystem" + + "github.com/kubesphere/kubekey/v2/pkg/artifact" + "github.com/kubesphere/kubekey/v2/pkg/binaries" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/os" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/registry" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/filesystem" ) func NewInitRegistryPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/pipelines/migrate_container.go b/pkg/pipelines/migrate_container.go index f2547223d..00ca436a6 100644 --- a/pkg/pipelines/migrate_container.go +++ b/pkg/pipelines/migrate_container.go @@ -19,13 +19,13 @@ package pipelines import ( "fmt" - "github.com/kubesphere/kubekey/pkg/binaries" - "github.com/kubesphere/kubekey/pkg/bootstrap/confirm" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/container" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/binaries" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/confirm" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/container" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" ) func MigrateCriPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/pipelines/renew_certs.go b/pkg/pipelines/renew_certs.go index 617f2820c..a22adb479 100644 --- a/pkg/pipelines/renew_certs.go +++ b/pkg/pipelines/renew_certs.go @@ -17,11 +17,11 @@ package pipelines import ( - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/certs" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/certs" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" ) func RenewCertsPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/pipelines/upgrade_cluster.go b/pkg/pipelines/upgrade_cluster.go index 49f2047a1..0182b7e36 100644 --- a/pkg/pipelines/upgrade_cluster.go +++ b/pkg/pipelines/upgrade_cluster.go @@ -21,17 +21,17 @@ import ( "github.com/pkg/errors" - "github.com/kubesphere/kubekey/pkg/artifact" - "github.com/kubesphere/kubekey/pkg/bootstrap/confirm" - "github.com/kubesphere/kubekey/pkg/bootstrap/precheck" - "github.com/kubesphere/kubekey/pkg/certs" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/module" - "github.com/kubesphere/kubekey/pkg/core/pipeline" - "github.com/kubesphere/kubekey/pkg/filesystem" - "github.com/kubesphere/kubekey/pkg/kubernetes" - "github.com/kubesphere/kubekey/pkg/kubesphere" - "github.com/kubesphere/kubekey/pkg/loadbalancer" + "github.com/kubesphere/kubekey/v2/pkg/artifact" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/confirm" + "github.com/kubesphere/kubekey/v2/pkg/bootstrap/precheck" + "github.com/kubesphere/kubekey/v2/pkg/certs" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/module" + "github.com/kubesphere/kubekey/v2/pkg/core/pipeline" + "github.com/kubesphere/kubekey/v2/pkg/filesystem" + "github.com/kubesphere/kubekey/v2/pkg/kubernetes" + "github.com/kubesphere/kubekey/v2/pkg/kubesphere" + "github.com/kubesphere/kubekey/v2/pkg/loadbalancer" ) func NewUpgradeClusterPipeline(runtime *common.KubeRuntime) error { diff --git a/pkg/plugins/dns/module.go b/pkg/plugins/dns/module.go index ace83b603..c57a55370 100644 --- a/pkg/plugins/dns/module.go +++ b/pkg/plugins/dns/module.go @@ -17,14 +17,15 @@ package dns import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/plugins/dns/templates" "path/filepath" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/plugins/dns/templates" ) type ClusterDNSModule struct { diff --git a/pkg/plugins/dns/prepares.go b/pkg/plugins/dns/prepares.go index 62be04050..4000a4a77 100644 --- a/pkg/plugins/dns/prepares.go +++ b/pkg/plugins/dns/prepares.go @@ -17,9 +17,10 @@ package dns import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" "strings" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type CoreDNSExist struct { diff --git a/pkg/plugins/dns/tasks.go b/pkg/plugins/dns/tasks.go index e3ad2f4d7..a5891133b 100644 --- a/pkg/plugins/dns/tasks.go +++ b/pkg/plugins/dns/tasks.go @@ -17,14 +17,16 @@ package dns import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/plugins/dns/templates" - "github.com/pkg/errors" "path/filepath" "strings" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/plugins/dns/templates" ) type OverrideCoreDNS struct { diff --git a/pkg/plugins/dns/templates/coredns_service.go b/pkg/plugins/dns/templates/coredns_service.go index b290547aa..4cf936f52 100644 --- a/pkg/plugins/dns/templates/coredns_service.go +++ b/pkg/plugins/dns/templates/coredns_service.go @@ -17,8 +17,9 @@ package templates import ( - "github.com/lithammer/dedent" "text/template" + + "github.com/lithammer/dedent" ) var ( diff --git a/pkg/plugins/kata.go b/pkg/plugins/kata.go index a05b04a9c..bd0cfb8f9 100644 --- a/pkg/plugins/kata.go +++ b/pkg/plugins/kata.go @@ -14,16 +14,18 @@ package plugins import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/lithammer/dedent" - "github.com/pkg/errors" "path/filepath" "text/template" + + "github.com/lithammer/dedent" + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/images" ) // Kata Containers is an open source community working to build a secure container runtime with lightweight virtual diff --git a/pkg/plugins/modules.go b/pkg/plugins/modules.go index aa8abb5c7..4d990f5e5 100644 --- a/pkg/plugins/modules.go +++ b/pkg/plugins/modules.go @@ -14,7 +14,7 @@ package plugins import ( - "github.com/kubesphere/kubekey/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/common" ) type DeployPluginsModule struct { diff --git a/pkg/plugins/network/modules.go b/pkg/plugins/network/modules.go index 24e2659e5..e9096e6da 100644 --- a/pkg/plugins/network/modules.go +++ b/pkg/plugins/network/modules.go @@ -19,15 +19,16 @@ package network import ( "path/filepath" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/plugins/network/templates" versionutil "k8s.io/apimachinery/pkg/util/version" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/plugins/network/templates" ) type DeployNetworkPluginModule struct { diff --git a/pkg/plugins/network/prepares.go b/pkg/plugins/network/prepares.go index 720d94e92..1ec4ed11c 100644 --- a/pkg/plugins/network/prepares.go +++ b/pkg/plugins/network/prepares.go @@ -17,9 +17,10 @@ package network import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" versionutil "k8s.io/apimachinery/pkg/util/version" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type OldK8sVersion struct { diff --git a/pkg/plugins/network/tasks.go b/pkg/plugins/network/tasks.go index 6c8daeedc..dfeeede49 100644 --- a/pkg/plugins/network/tasks.go +++ b/pkg/plugins/network/tasks.go @@ -23,14 +23,15 @@ import ( "os" "path/filepath" - "github.com/kubesphere/kubekey/apis/kubekey/v1alpha2" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/plugins/network/templates" "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/apis/kubekey/v1alpha2" + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/plugins/network/templates" ) //go:embed cilium-1.11.6.tgz diff --git a/pkg/plugins/nfd.go b/pkg/plugins/nfd.go index 81ef20c58..4635c3194 100644 --- a/pkg/plugins/nfd.go +++ b/pkg/plugins/nfd.go @@ -14,16 +14,18 @@ package plugins import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/lithammer/dedent" - "github.com/pkg/errors" "path/filepath" "text/template" + + "github.com/lithammer/dedent" + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/images" ) // NodeFeatureDiscovery detects hardware features available on each node in a Kubernetes cluster, and advertises those diff --git a/pkg/plugins/storage/modules.go b/pkg/plugins/storage/modules.go index 78ad29bca..4af9d3101 100644 --- a/pkg/plugins/storage/modules.go +++ b/pkg/plugins/storage/modules.go @@ -17,14 +17,15 @@ package storage import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/action" - "github.com/kubesphere/kubekey/pkg/core/prepare" - "github.com/kubesphere/kubekey/pkg/core/task" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/images" - "github.com/kubesphere/kubekey/pkg/plugins/storage/templates" "path/filepath" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/action" + "github.com/kubesphere/kubekey/v2/pkg/core/prepare" + "github.com/kubesphere/kubekey/v2/pkg/core/task" + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/images" + "github.com/kubesphere/kubekey/v2/pkg/plugins/storage/templates" ) type DeployLocalVolumeModule struct { diff --git a/pkg/plugins/storage/prepares.go b/pkg/plugins/storage/prepares.go index 5747c37eb..ee61a681b 100644 --- a/pkg/plugins/storage/prepares.go +++ b/pkg/plugins/storage/prepares.go @@ -17,11 +17,13 @@ package storage import ( - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/pkg/errors" "regexp" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" + "github.com/kubesphere/kubekey/v2/pkg/core/logger" ) type CheckDefaultStorageClass struct { diff --git a/pkg/plugins/storage/tasks.go b/pkg/plugins/storage/tasks.go index e373570f4..df0ec6a1f 100644 --- a/pkg/plugins/storage/tasks.go +++ b/pkg/plugins/storage/tasks.go @@ -18,10 +18,12 @@ package storage import ( "fmt" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/pkg/errors" "path/filepath" + + "github.com/pkg/errors" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) type DeployLocalVolume struct { diff --git a/pkg/registry/docker_registry_config.go b/pkg/registry/docker_registry_config.go index 050c60adc..8cf743897 100644 --- a/pkg/registry/docker_registry_config.go +++ b/pkg/registry/docker_registry_config.go @@ -14,33 +14,19 @@ limitations under the License. */ -/* - Copyright 2022 The KubeSphere Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - package registry import ( "encoding/json" - "github.com/kubesphere/kubekey/pkg/core/logger" - "github.com/pkg/errors" "io/ioutil" - "k8s.io/apimachinery/pkg/runtime" "os" "path/filepath" "strings" + + "github.com/pkg/errors" + "k8s.io/apimachinery/pkg/runtime" + + "github.com/kubesphere/kubekey/v2/pkg/core/logger" ) type DockerRegistryEntry struct { diff --git a/pkg/utils/certs/certs.go b/pkg/utils/certs/certs.go index 78efbb7bd..de36b08c5 100644 --- a/pkg/utils/certs/certs.go +++ b/pkg/utils/certs/certs.go @@ -19,15 +19,17 @@ import ( "crypto/x509" "crypto/x509/pkix" "fmt" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/util/sets" - certutil "k8s.io/client-go/util/cert" "math" "math/big" "net" "time" + + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "k8s.io/apimachinery/pkg/util/sets" + certutil "k8s.io/client-go/util/cert" + + "github.com/kubesphere/kubekey/v2/pkg/common" ) const ( diff --git a/pkg/utils/util.go b/pkg/utils/util.go index 5c6789b23..23aed4313 100644 --- a/pkg/utils/util.go +++ b/pkg/utils/util.go @@ -18,12 +18,14 @@ package utils import ( "fmt" - "github.com/kubesphere/kubekey/pkg/common" - "github.com/kubesphere/kubekey/pkg/core/connector" - "github.com/pkg/errors" - "gopkg.in/yaml.v2" "regexp" "strings" + + "github.com/pkg/errors" + "gopkg.in/yaml.v2" + + "github.com/kubesphere/kubekey/v2/pkg/common" + "github.com/kubesphere/kubekey/v2/pkg/core/connector" ) func ResetTmpDir(runtime connector.Runtime) error { diff --git a/pkg/version/kubesphere/ks_installer.go b/pkg/version/kubesphere/ks_installer.go index 687b10fd3..a50104eed 100644 --- a/pkg/version/kubesphere/ks_installer.go +++ b/pkg/version/kubesphere/ks_installer.go @@ -18,11 +18,13 @@ package kubesphere import ( "fmt" - "github.com/kubesphere/kubekey/pkg/core/util" - "github.com/kubesphere/kubekey/pkg/version/kubesphere/templates" - versionutil "k8s.io/apimachinery/pkg/util/version" "os" "text/template" + + versionutil "k8s.io/apimachinery/pkg/util/version" + + "github.com/kubesphere/kubekey/v2/pkg/core/util" + "github.com/kubesphere/kubekey/v2/pkg/version/kubesphere/templates" ) type KsInstaller struct {