diff --git a/Makefile b/Makefile index ce6d35165..5834fcaf3 100644 --- a/Makefile +++ b/Makefile @@ -46,8 +46,8 @@ $(CMD_TARGET): # # Example: # make images -# make make image-clusterlink-controller-manager -# make make image-clusterlink-controller-manager GOARCH=arm64 +# make image-clusterlink-controller-manager +# make image-clusterlink-controller-manager GOARCH=arm64 IMAGE_TARGET=$(addprefix image-, $(TARGETS)) .PHONY: $(IMAGE_TARGET) $(IMAGE_TARGET): diff --git a/cmd/link-agent/app/agent.go b/cmd/clusterlink/agent/app/agent.go similarity index 95% rename from cmd/link-agent/app/agent.go rename to cmd/clusterlink/agent/app/agent.go index 69b5707d9..dc1b54abb 100644 --- a/cmd/link-agent/app/agent.go +++ b/cmd/clusterlink/agent/app/agent.go @@ -14,11 +14,11 @@ import ( "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" - "github.com/kosmos.io/kosmos/cmd/link-agent/app/options" + "github.com/kosmos.io/kosmos/cmd/clusterlink/agent/app/options" + linkagent "github.com/kosmos.io/kosmos/pkg/clusterlink/agent" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network" kosmosclientset "github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned" kosmosinformer "github.com/kosmos.io/kosmos/pkg/generated/informers/externalversions" - linkagent "github.com/kosmos.io/kosmos/pkg/link-agent" - "github.com/kosmos.io/kosmos/pkg/network" "github.com/kosmos.io/kosmos/pkg/scheme" "github.com/kosmos.io/kosmos/pkg/sharedcli" "github.com/kosmos.io/kosmos/pkg/sharedcli/klogflag" diff --git a/cmd/link-agent/app/options/options.go b/cmd/clusterlink/agent/app/options/options.go similarity index 100% rename from cmd/link-agent/app/options/options.go rename to cmd/clusterlink/agent/app/options/options.go diff --git a/cmd/floater/app/options/validation.go b/cmd/clusterlink/agent/app/options/validation.go similarity index 100% rename from cmd/floater/app/options/validation.go rename to cmd/clusterlink/agent/app/options/validation.go diff --git a/cmd/network-manager/main.go b/cmd/clusterlink/agent/main.go similarity index 80% rename from cmd/network-manager/main.go rename to cmd/clusterlink/agent/main.go index 2e28a6161..6401f8db1 100644 --- a/cmd/network-manager/main.go +++ b/cmd/clusterlink/agent/main.go @@ -6,7 +6,7 @@ import ( apiserver "k8s.io/apiserver/pkg/server" "k8s.io/component-base/cli" - "github.com/kosmos.io/kosmos/cmd/network-manager/app" + "github.com/kosmos.io/kosmos/cmd/clusterlink/agent/app" ) func main() { diff --git a/cmd/link-controller-manager/app/controller-manager.go b/cmd/clusterlink/controller-manager/app/controller-manager.go similarity index 96% rename from cmd/link-controller-manager/app/controller-manager.go rename to cmd/clusterlink/controller-manager/app/controller-manager.go index 49146cf84..f7b83b10d 100644 --- a/cmd/link-controller-manager/app/controller-manager.go +++ b/cmd/clusterlink/controller-manager/app/controller-manager.go @@ -12,9 +12,9 @@ import ( "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" - "github.com/kosmos.io/kosmos/cmd/link-controller-manager/app/options" + "github.com/kosmos.io/kosmos/cmd/clusterlink/controller-manager/app/options" + ctrlcontext "github.com/kosmos.io/kosmos/pkg/clusterlink/controllers/context" "github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned" - ctrlcontext "github.com/kosmos.io/kosmos/pkg/link-controllers/context" "github.com/kosmos.io/kosmos/pkg/scheme" "github.com/kosmos.io/kosmos/pkg/sharedcli/klogflag" ) diff --git a/cmd/link-controller-manager/app/controllerstarter.go b/cmd/clusterlink/controller-manager/app/controllerstarter.go similarity index 97% rename from cmd/link-controller-manager/app/controllerstarter.go rename to cmd/clusterlink/controller-manager/app/controllerstarter.go index 6976f8eda..33076e819 100644 --- a/cmd/link-controller-manager/app/controllerstarter.go +++ b/cmd/clusterlink/controller-manager/app/controllerstarter.go @@ -11,12 +11,12 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/kosmos.io/kosmos/cmd/link-controller-manager/app/options" + "github.com/kosmos.io/kosmos/cmd/clusterlink/controller-manager/app/options" clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" + ctrlcontext "github.com/kosmos.io/kosmos/pkg/clusterlink/controllers/context" "github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned" "github.com/kosmos.io/kosmos/pkg/generated/informers/externalversions" "github.com/kosmos.io/kosmos/pkg/generated/listers/kosmos/v1alpha1" - ctrlcontext "github.com/kosmos.io/kosmos/pkg/link-controllers/context" "github.com/kosmos.io/kosmos/pkg/utils" "github.com/kosmos.io/kosmos/pkg/utils/keys" ) diff --git a/cmd/link-controller-manager/app/core.go b/cmd/clusterlink/controller-manager/app/core.go similarity index 88% rename from cmd/link-controller-manager/app/core.go rename to cmd/clusterlink/controller-manager/app/core.go index 04d6582eb..9b7fc856d 100644 --- a/cmd/link-controller-manager/app/core.go +++ b/cmd/clusterlink/controller-manager/app/core.go @@ -5,12 +5,12 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" + "github.com/kosmos.io/kosmos/pkg/clusterlink/controllers/calicoippool" + "github.com/kosmos.io/kosmos/pkg/clusterlink/controllers/cluster" + ctrlcontext "github.com/kosmos.io/kosmos/pkg/clusterlink/controllers/context" + "github.com/kosmos.io/kosmos/pkg/clusterlink/controllers/node" + "github.com/kosmos.io/kosmos/pkg/clusterlink/controllers/nodecidr" "github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned" - "github.com/kosmos.io/kosmos/pkg/link-controllers/calicoippool" - "github.com/kosmos.io/kosmos/pkg/link-controllers/cluster" - ctrlcontext "github.com/kosmos.io/kosmos/pkg/link-controllers/context" - "github.com/kosmos.io/kosmos/pkg/link-controllers/node" - "github.com/kosmos.io/kosmos/pkg/link-controllers/nodecidr" ) func startClusterController(ctx ctrlcontext.Context) (bool, ctrlcontext.CleanFunc, error) { diff --git a/cmd/link-controller-manager/app/options/options.go b/cmd/clusterlink/controller-manager/app/options/options.go similarity index 100% rename from cmd/link-controller-manager/app/options/options.go rename to cmd/clusterlink/controller-manager/app/options/options.go diff --git a/cmd/link-controller-manager/main.go b/cmd/clusterlink/controller-manager/main.go similarity index 76% rename from cmd/link-controller-manager/main.go rename to cmd/clusterlink/controller-manager/main.go index 5912df0ed..bae2b0633 100644 --- a/cmd/link-controller-manager/main.go +++ b/cmd/clusterlink/controller-manager/main.go @@ -6,7 +6,7 @@ import ( "k8s.io/component-base/cli" ctrl "sigs.k8s.io/controller-runtime" - "github.com/kosmos.io/kosmos/cmd/link-controller-manager/app" + "github.com/kosmos.io/kosmos/cmd/clusterlink/controller-manager/app" ) func main() { diff --git a/cmd/link-elector/app/elector.go b/cmd/clusterlink/elector/app/elector.go similarity index 97% rename from cmd/link-elector/app/elector.go rename to cmd/clusterlink/elector/app/elector.go index d1557e683..e805615f1 100644 --- a/cmd/link-elector/app/elector.go +++ b/cmd/clusterlink/elector/app/elector.go @@ -17,8 +17,8 @@ import ( "k8s.io/component-base/term" "k8s.io/klog/v2" - "github.com/kosmos.io/kosmos/cmd/link-elector/app/options" - "github.com/kosmos.io/kosmos/pkg/elector" + "github.com/kosmos.io/kosmos/cmd/clusterlink/elector/app/options" + "github.com/kosmos.io/kosmos/pkg/clusterlink/elector" "github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned" "github.com/kosmos.io/kosmos/pkg/sharedcli" "github.com/kosmos.io/kosmos/pkg/sharedcli/klogflag" diff --git a/cmd/link-elector/app/options/options.go b/cmd/clusterlink/elector/app/options/options.go similarity index 100% rename from cmd/link-elector/app/options/options.go rename to cmd/clusterlink/elector/app/options/options.go diff --git a/cmd/link-elector/main.go b/cmd/clusterlink/elector/main.go similarity index 79% rename from cmd/link-elector/main.go rename to cmd/clusterlink/elector/main.go index 5fd994817..ee05838ee 100644 --- a/cmd/link-elector/main.go +++ b/cmd/clusterlink/elector/main.go @@ -6,7 +6,7 @@ import ( "k8s.io/component-base/cli" ctrl "sigs.k8s.io/controller-runtime" - "github.com/kosmos.io/kosmos/cmd/link-elector/app" + "github.com/kosmos.io/kosmos/cmd/clusterlink/elector/app" ) func main() { diff --git a/cmd/floater/app/floater.go b/cmd/clusterlink/floater/app/floater.go similarity index 96% rename from cmd/floater/app/floater.go rename to cmd/clusterlink/floater/app/floater.go index f6c045312..9349011f0 100644 --- a/cmd/floater/app/floater.go +++ b/cmd/clusterlink/floater/app/floater.go @@ -12,7 +12,7 @@ import ( "k8s.io/component-base/term" "k8s.io/klog/v2" - "github.com/kosmos.io/kosmos/cmd/floater/app/options" + "github.com/kosmos.io/kosmos/cmd/clusterlink/floater/app/options" "github.com/kosmos.io/kosmos/pkg/sharedcli" "github.com/kosmos.io/kosmos/pkg/sharedcli/klogflag" ) diff --git a/cmd/floater/app/options/options.go b/cmd/clusterlink/floater/app/options/options.go similarity index 100% rename from cmd/floater/app/options/options.go rename to cmd/clusterlink/floater/app/options/options.go diff --git a/cmd/link-agent/app/options/validation.go b/cmd/clusterlink/floater/app/options/validation.go similarity index 100% rename from cmd/link-agent/app/options/validation.go rename to cmd/clusterlink/floater/app/options/validation.go diff --git a/cmd/floater/certificate/file.crt b/cmd/clusterlink/floater/certificate/file.crt similarity index 100% rename from cmd/floater/certificate/file.crt rename to cmd/clusterlink/floater/certificate/file.crt diff --git a/cmd/floater/certificate/file.key b/cmd/clusterlink/floater/certificate/file.key similarity index 100% rename from cmd/floater/certificate/file.key rename to cmd/clusterlink/floater/certificate/file.key diff --git a/cmd/floater/main.go b/cmd/clusterlink/floater/main.go similarity index 79% rename from cmd/floater/main.go rename to cmd/clusterlink/floater/main.go index 0cc3dec74..914c64eef 100644 --- a/cmd/floater/main.go +++ b/cmd/clusterlink/floater/main.go @@ -6,7 +6,7 @@ import ( apiserver "k8s.io/apiserver/pkg/server" "k8s.io/component-base/cli" - "github.com/kosmos.io/kosmos/cmd/floater/app" + "github.com/kosmos.io/kosmos/cmd/clusterlink/floater/app" ) func main() { diff --git a/cmd/network-manager/app/manager.go b/cmd/clusterlink/network-manager/app/manager.go similarity index 93% rename from cmd/network-manager/app/manager.go rename to cmd/clusterlink/network-manager/app/manager.go index 39ecfc473..0e884cac5 100644 --- a/cmd/network-manager/app/manager.go +++ b/cmd/clusterlink/network-manager/app/manager.go @@ -10,8 +10,8 @@ import ( "k8s.io/klog/v2" controllerruntime "sigs.k8s.io/controller-runtime" - "github.com/kosmos.io/kosmos/cmd/network-manager/app/options" - networkmanager "github.com/kosmos.io/kosmos/pkg/network-manager" + "github.com/kosmos.io/kosmos/cmd/clusterlink/network-manager/app/options" + networkmanager "github.com/kosmos.io/kosmos/pkg/clusterlink/network-manager" "github.com/kosmos.io/kosmos/pkg/scheme" "github.com/kosmos.io/kosmos/pkg/sharedcli/klogflag" ) diff --git a/cmd/network-manager/app/options/options.go b/cmd/clusterlink/network-manager/app/options/options.go similarity index 100% rename from cmd/network-manager/app/options/options.go rename to cmd/clusterlink/network-manager/app/options/options.go diff --git a/cmd/network-manager/app/options/validation.go b/cmd/clusterlink/network-manager/app/options/validation.go similarity index 100% rename from cmd/network-manager/app/options/validation.go rename to cmd/clusterlink/network-manager/app/options/validation.go diff --git a/cmd/link-agent/main.go b/cmd/clusterlink/network-manager/main.go similarity index 77% rename from cmd/link-agent/main.go rename to cmd/clusterlink/network-manager/main.go index 79ec6def9..3439f2980 100644 --- a/cmd/link-agent/main.go +++ b/cmd/clusterlink/network-manager/main.go @@ -6,7 +6,7 @@ import ( apiserver "k8s.io/apiserver/pkg/server" "k8s.io/component-base/cli" - "github.com/kosmos.io/kosmos/cmd/link-agent/app" + "github.com/kosmos.io/kosmos/cmd/clusterlink/network-manager/app" ) func main() { diff --git a/cmd/operator/app/operator.go b/cmd/clusterlink/operator/app/operator.go similarity index 96% rename from cmd/operator/app/operator.go rename to cmd/clusterlink/operator/app/operator.go index 20bf1d696..c83864229 100644 --- a/cmd/operator/app/operator.go +++ b/cmd/clusterlink/operator/app/operator.go @@ -16,8 +16,8 @@ import ( "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" - "github.com/kosmos.io/kosmos/cmd/operator/app/options" - "github.com/kosmos.io/kosmos/pkg/operator" + "github.com/kosmos.io/kosmos/cmd/clusterlink/operator/app/options" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator" "github.com/kosmos.io/kosmos/pkg/scheme" "github.com/kosmos.io/kosmos/pkg/sharedcli" "github.com/kosmos.io/kosmos/pkg/sharedcli/klogflag" diff --git a/cmd/operator/app/options/options.go b/cmd/clusterlink/operator/app/options/options.go similarity index 100% rename from cmd/operator/app/options/options.go rename to cmd/clusterlink/operator/app/options/options.go diff --git a/cmd/operator/app/options/validation.go b/cmd/clusterlink/operator/app/options/validation.go similarity index 100% rename from cmd/operator/app/options/validation.go rename to cmd/clusterlink/operator/app/options/validation.go diff --git a/cmd/operator/main.go b/cmd/clusterlink/operator/main.go similarity index 79% rename from cmd/operator/main.go rename to cmd/clusterlink/operator/main.go index 88f6d1761..89666ee02 100644 --- a/cmd/operator/main.go +++ b/cmd/clusterlink/operator/main.go @@ -6,7 +6,7 @@ import ( apiserver "k8s.io/apiserver/pkg/server" "k8s.io/component-base/cli" - "github.com/kosmos.io/kosmos/cmd/operator/app" + "github.com/kosmos.io/kosmos/cmd/clusterlink/operator/app" ) func main() { diff --git a/cmd/link-proxy/app/clusterlink-proxy.go b/cmd/clusterlink/proxy/app/clusterlink-proxy.go similarity index 95% rename from cmd/link-proxy/app/clusterlink-proxy.go rename to cmd/clusterlink/proxy/app/clusterlink-proxy.go index 83158af2b..654c2e46e 100644 --- a/cmd/link-proxy/app/clusterlink-proxy.go +++ b/cmd/clusterlink/proxy/app/clusterlink-proxy.go @@ -9,7 +9,7 @@ import ( "k8s.io/component-base/term" "k8s.io/klog/v2" - "github.com/kosmos.io/kosmos/cmd/link-proxy/app/options" + "github.com/kosmos.io/kosmos/cmd/clusterlink/proxy/app/options" ) // NewClusterLinkProxyCommand creates a *cobra.Command object with default parameters diff --git a/cmd/link-proxy/app/options/options.go b/cmd/clusterlink/proxy/app/options/options.go similarity index 99% rename from cmd/link-proxy/app/options/options.go rename to cmd/clusterlink/proxy/app/options/options.go index e3267bbe1..ba13a74a2 100644 --- a/cmd/link-proxy/app/options/options.go +++ b/cmd/clusterlink/proxy/app/options/options.go @@ -17,7 +17,7 @@ import ( "k8s.io/component-base/logs" logsapi "k8s.io/component-base/logs/api/v1" - "github.com/kosmos.io/kosmos/pkg/proxy" + "github.com/kosmos.io/kosmos/pkg/clusterlink/proxy" ) // Options contains command line parameters for clusterlink-proxy diff --git a/cmd/link-proxy/main.go b/cmd/clusterlink/proxy/main.go similarity index 80% rename from cmd/link-proxy/main.go rename to cmd/clusterlink/proxy/main.go index 3760ca9b2..a168ae30e 100644 --- a/cmd/link-proxy/main.go +++ b/cmd/clusterlink/proxy/main.go @@ -6,7 +6,7 @@ import ( apiserver "k8s.io/apiserver/pkg/server" "k8s.io/component-base/cli" - "github.com/kosmos.io/kosmos/cmd/link-proxy/app" + "github.com/kosmos.io/kosmos/cmd/clusterlink/proxy/app" ) func main() { diff --git a/hack/build.sh b/hack/build.sh index dd86ca55d..d1b6f5027 100755 --- a/hack/build.sh +++ b/hack/build.sh @@ -54,7 +54,7 @@ function build_binary_for_platform() { set +x if [[ "${target}" == "clusterlink-floater" ]]; then - cp -r "cmd/floater/certificate" "_output/bin/${platform}/" + cp -r "cmd/clusterlink/floater/certificate" "_output/bin/${platform}/" fi } diff --git a/hack/util.sh b/hack/util.sh index ddccf49d7..f981852d1 100755 --- a/hack/util.sh +++ b/hack/util.sh @@ -13,14 +13,14 @@ CLUSTERLINK_GO_PACKAGE="github.com/kosmos.io/kosmos" MIN_Go_VERSION=go1.19.0 CLUSTERLINK_TARGET_SOURCE=( - clusterlink-proxy=cmd/link-proxy - clusterlink-operator=cmd/operator - clusterlink-elector=cmd/link-elector - clusterlink-agent=cmd/link-agent - clusterlink-controller-manager=cmd/link-controller-manager + clusterlink-proxy=cmd/clusterlink/proxy + clusterlink-operator=cmd/clusterlink/operator + clusterlink-elector=cmd/clusterlink/elector + clusterlink-agent=cmd/clusterlink/agent + clusterlink-floater=cmd/clusterlink/floater + clusterlink-network-manager=cmd/clusterlink/network-manager + clusterlink-controller-manager=cmd/clusterlink/controller-manager kosmosctl=cmd/kosmosctl - clusterlink-floater=cmd/floater - clusterlink-network-manager=cmd/network-manager ) #https://textkool.com/en/ascii-art-generator?hl=default&vl=default&font=DOS%20Rebel&text=KOSMOS diff --git a/pkg/link-agent/controller.go b/pkg/clusterlink/agent/controller.go similarity index 96% rename from pkg/link-agent/controller.go rename to pkg/clusterlink/agent/controller.go index 7280d8463..2a662ef9a 100644 --- a/pkg/link-agent/controller.go +++ b/pkg/clusterlink/agent/controller.go @@ -1,4 +1,4 @@ -package link_agent +package agent import ( "context" @@ -18,9 +18,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" kosmosv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" + networkmanager "github.com/kosmos.io/kosmos/pkg/clusterlink/agent/network-manager" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network" kosmosv1alpha1lister "github.com/kosmos.io/kosmos/pkg/generated/listers/kosmos/v1alpha1" - networkmanager "github.com/kosmos.io/kosmos/pkg/link-agent/network-manager" - "github.com/kosmos.io/kosmos/pkg/network" ) const ( diff --git a/pkg/link-agent/network-manager/network_manager.go b/pkg/clusterlink/agent/network-manager/network_manager.go similarity index 99% rename from pkg/link-agent/network-manager/network_manager.go rename to pkg/clusterlink/agent/network-manager/network_manager.go index 6e20f6ecb..f1898fa55 100644 --- a/pkg/link-agent/network-manager/network_manager.go +++ b/pkg/clusterlink/agent/network-manager/network_manager.go @@ -8,7 +8,7 @@ import ( "k8s.io/klog/v2" clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" - "github.com/kosmos.io/kosmos/pkg/network" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network" ) var lock = &sync.RWMutex{} diff --git a/pkg/link-controllers/calicoippool/calicoippool_controller.go b/pkg/clusterlink/controllers/calicoippool/calicoippool_controller.go similarity index 99% rename from pkg/link-controllers/calicoippool/calicoippool_controller.go rename to pkg/clusterlink/controllers/calicoippool/calicoippool_controller.go index 0852331ec..32303a34a 100644 --- a/pkg/link-controllers/calicoippool/calicoippool_controller.go +++ b/pkg/clusterlink/controllers/calicoippool/calicoippool_controller.go @@ -23,10 +23,10 @@ import ( "k8s.io/klog/v2" kosmosv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" + helper "github.com/kosmos.io/kosmos/pkg/clusterlink/controllers/cluster" "github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned" "github.com/kosmos.io/kosmos/pkg/generated/informers/externalversions" "github.com/kosmos.io/kosmos/pkg/generated/listers/kosmos/v1alpha1" - helper "github.com/kosmos.io/kosmos/pkg/link-controllers/cluster" "github.com/kosmos.io/kosmos/pkg/utils" "github.com/kosmos.io/kosmos/pkg/utils/flags" "github.com/kosmos.io/kosmos/pkg/utils/keys" diff --git a/pkg/link-controllers/calicoippool/calicoippool_controller_test.go b/pkg/clusterlink/controllers/calicoippool/calicoippool_controller_test.go similarity index 100% rename from pkg/link-controllers/calicoippool/calicoippool_controller_test.go rename to pkg/clusterlink/controllers/calicoippool/calicoippool_controller_test.go diff --git a/pkg/link-controllers/calicoippool/manifests.go b/pkg/clusterlink/controllers/calicoippool/manifests.go similarity index 100% rename from pkg/link-controllers/calicoippool/manifests.go rename to pkg/clusterlink/controllers/calicoippool/manifests.go diff --git a/pkg/link-controllers/cluster/cluster_controller.go b/pkg/clusterlink/controllers/cluster/cluster_controller.go similarity index 100% rename from pkg/link-controllers/cluster/cluster_controller.go rename to pkg/clusterlink/controllers/cluster/cluster_controller.go diff --git a/pkg/link-controllers/cluster/helper.go b/pkg/clusterlink/controllers/cluster/helper.go similarity index 100% rename from pkg/link-controllers/cluster/helper.go rename to pkg/clusterlink/controllers/cluster/helper.go diff --git a/pkg/link-controllers/context/context.go b/pkg/clusterlink/controllers/context/context.go similarity index 100% rename from pkg/link-controllers/context/context.go rename to pkg/clusterlink/controllers/context/context.go diff --git a/pkg/link-controllers/node/node_controller.go b/pkg/clusterlink/controllers/node/node_controller.go similarity index 100% rename from pkg/link-controllers/node/node_controller.go rename to pkg/clusterlink/controllers/node/node_controller.go diff --git a/pkg/link-controllers/nodecidr/adapter.go b/pkg/clusterlink/controllers/nodecidr/adapter.go similarity index 100% rename from pkg/link-controllers/nodecidr/adapter.go rename to pkg/clusterlink/controllers/nodecidr/adapter.go diff --git a/pkg/link-controllers/nodecidr/nodecidr_controller.go b/pkg/clusterlink/controllers/nodecidr/nodecidr_controller.go similarity index 100% rename from pkg/link-controllers/nodecidr/nodecidr_controller.go rename to pkg/clusterlink/controllers/nodecidr/nodecidr_controller.go diff --git a/pkg/elector/elector.go b/pkg/clusterlink/elector/elector.go similarity index 100% rename from pkg/elector/elector.go rename to pkg/clusterlink/elector/elector.go diff --git a/pkg/elector/elector_test.go b/pkg/clusterlink/elector/elector_test.go similarity index 100% rename from pkg/elector/elector_test.go rename to pkg/clusterlink/elector/elector_test.go diff --git a/pkg/network-manager/controller.go b/pkg/clusterlink/network-manager/controller.go similarity index 98% rename from pkg/network-manager/controller.go rename to pkg/clusterlink/network-manager/controller.go index 48065405e..7bde7592c 100644 --- a/pkg/network-manager/controller.go +++ b/pkg/clusterlink/network-manager/controller.go @@ -23,7 +23,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/source" clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" - "github.com/kosmos.io/kosmos/pkg/network-manager/handlers" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network-manager/handlers" ) const ( diff --git a/pkg/network-manager/handlers/context.go b/pkg/clusterlink/network-manager/handlers/context.go similarity index 86% rename from pkg/network-manager/handlers/context.go rename to pkg/clusterlink/network-manager/handlers/context.go index 4072150bb..87120e34b 100644 --- a/pkg/network-manager/handlers/context.go +++ b/pkg/clusterlink/network-manager/handlers/context.go @@ -2,7 +2,7 @@ package handlers import ( "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" - "github.com/kosmos.io/kosmos/pkg/network-manager/helpers" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network-manager/helpers" ) // Context Context diff --git a/pkg/network-manager/handlers/globalmap.go b/pkg/clusterlink/network-manager/handlers/globalmap.go similarity index 95% rename from pkg/network-manager/handlers/globalmap.go rename to pkg/clusterlink/network-manager/handlers/globalmap.go index 98470cdee..823685b98 100644 --- a/pkg/network-manager/handlers/globalmap.go +++ b/pkg/clusterlink/network-manager/handlers/globalmap.go @@ -7,8 +7,8 @@ import ( "k8s.io/klog/v2" "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network-manager/helpers" "github.com/kosmos.io/kosmos/pkg/constants" - "github.com/kosmos.io/kosmos/pkg/network-manager/helpers" ) type GlobalMap struct { diff --git a/pkg/network-manager/handlers/host_network.go b/pkg/clusterlink/network-manager/handlers/host_network.go similarity index 100% rename from pkg/network-manager/handlers/host_network.go rename to pkg/clusterlink/network-manager/handlers/host_network.go diff --git a/pkg/network-manager/handlers/init_nodes.go b/pkg/clusterlink/network-manager/handlers/init_nodes.go similarity index 100% rename from pkg/network-manager/handlers/init_nodes.go rename to pkg/clusterlink/network-manager/handlers/init_nodes.go diff --git a/pkg/network-manager/handlers/nodeconfig.go b/pkg/clusterlink/network-manager/handlers/nodeconfig.go similarity index 94% rename from pkg/network-manager/handlers/nodeconfig.go rename to pkg/clusterlink/network-manager/handlers/nodeconfig.go index a12dc49a0..e352c6671 100644 --- a/pkg/network-manager/handlers/nodeconfig.go +++ b/pkg/clusterlink/network-manager/handlers/nodeconfig.go @@ -7,7 +7,7 @@ import ( "k8s.io/klog/v2" "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" - "github.com/kosmos.io/kosmos/pkg/network-manager/helpers" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network-manager/helpers" ) // NodeConfig network configuration of the node diff --git a/pkg/network-manager/handlers/pod_routes.go b/pkg/clusterlink/network-manager/handlers/pod_routes.go similarity index 97% rename from pkg/network-manager/handlers/pod_routes.go rename to pkg/clusterlink/network-manager/handlers/pod_routes.go index fef3b16d5..8cba943db 100644 --- a/pkg/network-manager/handlers/pod_routes.go +++ b/pkg/clusterlink/network-manager/handlers/pod_routes.go @@ -6,8 +6,8 @@ import ( "k8s.io/klog/v2" "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network-manager/helpers" "github.com/kosmos.io/kosmos/pkg/constants" - "github.com/kosmos.io/kosmos/pkg/network-manager/helpers" utilnet "github.com/kosmos.io/kosmos/pkg/utils/net" ) diff --git a/pkg/network-manager/handlers/root_handler.go b/pkg/clusterlink/network-manager/handlers/root_handler.go similarity index 100% rename from pkg/network-manager/handlers/root_handler.go rename to pkg/clusterlink/network-manager/handlers/root_handler.go diff --git a/pkg/network-manager/handlers/svc_routes.go b/pkg/clusterlink/network-manager/handlers/svc_routes.go similarity index 100% rename from pkg/network-manager/handlers/svc_routes.go rename to pkg/clusterlink/network-manager/handlers/svc_routes.go diff --git a/pkg/network-manager/handlers/vxbridge_mac_cache.go b/pkg/clusterlink/network-manager/handlers/vxbridge_mac_cache.go similarity index 100% rename from pkg/network-manager/handlers/vxbridge_mac_cache.go rename to pkg/clusterlink/network-manager/handlers/vxbridge_mac_cache.go diff --git a/pkg/network-manager/handlers/vxbridge_network.go b/pkg/clusterlink/network-manager/handlers/vxbridge_network.go similarity index 96% rename from pkg/network-manager/handlers/vxbridge_network.go rename to pkg/clusterlink/network-manager/handlers/vxbridge_network.go index 51e5f59ad..be2a48b21 100644 --- a/pkg/network-manager/handlers/vxbridge_network.go +++ b/pkg/clusterlink/network-manager/handlers/vxbridge_network.go @@ -2,8 +2,8 @@ package handlers import ( "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network-manager/helpers" "github.com/kosmos.io/kosmos/pkg/constants" - "github.com/kosmos.io/kosmos/pkg/network-manager/helpers" ) type VxBridgeNetwork struct { diff --git a/pkg/network-manager/handlers/vxlocal_mac_cache.go b/pkg/clusterlink/network-manager/handlers/vxlocal_mac_cache.go similarity index 100% rename from pkg/network-manager/handlers/vxlocal_mac_cache.go rename to pkg/clusterlink/network-manager/handlers/vxlocal_mac_cache.go diff --git a/pkg/network-manager/handlers/vxlocal_network.go b/pkg/clusterlink/network-manager/handlers/vxlocal_network.go similarity index 96% rename from pkg/network-manager/handlers/vxlocal_network.go rename to pkg/clusterlink/network-manager/handlers/vxlocal_network.go index e45cd1ddf..3ed508b5f 100644 --- a/pkg/network-manager/handlers/vxlocal_network.go +++ b/pkg/clusterlink/network-manager/handlers/vxlocal_network.go @@ -2,8 +2,8 @@ package handlers import ( "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network-manager/helpers" "github.com/kosmos.io/kosmos/pkg/constants" - "github.com/kosmos.io/kosmos/pkg/network-manager/helpers" ) type VxLocalNetwork struct { diff --git a/pkg/network-manager/helpers/filter.go b/pkg/clusterlink/network-manager/helpers/filter.go similarity index 100% rename from pkg/network-manager/helpers/filter.go rename to pkg/clusterlink/network-manager/helpers/filter.go diff --git a/pkg/network-manager/helpers/network.go b/pkg/clusterlink/network-manager/helpers/network.go similarity index 100% rename from pkg/network-manager/helpers/network.go rename to pkg/clusterlink/network-manager/helpers/network.go diff --git a/pkg/network-manager/helpers/network_test.go b/pkg/clusterlink/network-manager/helpers/network_test.go similarity index 100% rename from pkg/network-manager/helpers/network_test.go rename to pkg/clusterlink/network-manager/helpers/network_test.go diff --git a/pkg/network-manager/helpers/sort.go b/pkg/clusterlink/network-manager/helpers/sort.go similarity index 100% rename from pkg/network-manager/helpers/sort.go rename to pkg/clusterlink/network-manager/helpers/sort.go diff --git a/pkg/network-manager/network_manager.go b/pkg/clusterlink/network-manager/network_manager.go similarity index 92% rename from pkg/network-manager/network_manager.go rename to pkg/clusterlink/network-manager/network_manager.go index af84e5ac1..55fbfa76d 100644 --- a/pkg/network-manager/network_manager.go +++ b/pkg/clusterlink/network-manager/network_manager.go @@ -7,8 +7,8 @@ import ( "k8s.io/klog/v2" "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" - "github.com/kosmos.io/kosmos/pkg/network-manager/handlers" - "github.com/kosmos.io/kosmos/pkg/network-manager/helpers" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network-manager/handlers" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network-manager/helpers" ) type Manager struct { diff --git a/pkg/network/adapter.go b/pkg/clusterlink/network/adapter.go similarity index 100% rename from pkg/network/adapter.go rename to pkg/clusterlink/network/adapter.go diff --git a/pkg/network/arp.go b/pkg/clusterlink/network/arp.go similarity index 100% rename from pkg/network/arp.go rename to pkg/clusterlink/network/arp.go diff --git a/pkg/network/constant.go b/pkg/clusterlink/network/constant.go similarity index 100% rename from pkg/network/constant.go rename to pkg/clusterlink/network/constant.go diff --git a/pkg/network/device.go b/pkg/clusterlink/network/device.go similarity index 100% rename from pkg/network/device.go rename to pkg/clusterlink/network/device.go diff --git a/pkg/network/env.go b/pkg/clusterlink/network/env.go similarity index 97% rename from pkg/network/env.go rename to pkg/clusterlink/network/env.go index 8d30c5c7d..a5d73a474 100644 --- a/pkg/network/env.go +++ b/pkg/clusterlink/network/env.go @@ -7,7 +7,7 @@ import ( ipt "github.com/coreos/go-iptables/iptables" "github.com/pkg/errors" - "github.com/kosmos.io/kosmos/pkg/network/iptables" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network/iptables" ) func UpdateDefaultIp6tablesBehavior(ifaceName string) error { diff --git a/pkg/network/fake-network/fake_network.go b/pkg/clusterlink/network/fake-network/fake_network.go similarity index 100% rename from pkg/network/fake-network/fake_network.go rename to pkg/clusterlink/network/fake-network/fake_network.go diff --git a/pkg/network/fdb.go b/pkg/clusterlink/network/fdb.go similarity index 100% rename from pkg/network/fdb.go rename to pkg/clusterlink/network/fdb.go diff --git a/pkg/network/interface.go b/pkg/clusterlink/network/interface.go similarity index 100% rename from pkg/network/interface.go rename to pkg/clusterlink/network/interface.go diff --git a/pkg/network/ip.go b/pkg/clusterlink/network/ip.go similarity index 100% rename from pkg/network/ip.go rename to pkg/clusterlink/network/ip.go diff --git a/pkg/network/iptables.go b/pkg/clusterlink/network/iptables.go similarity index 99% rename from pkg/network/iptables.go rename to pkg/clusterlink/network/iptables.go index e5c9943ab..0d34b2b0b 100644 --- a/pkg/network/iptables.go +++ b/pkg/clusterlink/network/iptables.go @@ -9,7 +9,7 @@ import ( "k8s.io/klog/v2" clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" - "github.com/kosmos.io/kosmos/pkg/network/iptables" + "github.com/kosmos.io/kosmos/pkg/clusterlink/network/iptables" ) type IptablesRecord struct { diff --git a/pkg/network/iptables/adapter.go b/pkg/clusterlink/network/iptables/adapter.go similarity index 100% rename from pkg/network/iptables/adapter.go rename to pkg/clusterlink/network/iptables/adapter.go diff --git a/pkg/network/iptables/iptables.go b/pkg/clusterlink/network/iptables/iptables.go similarity index 100% rename from pkg/network/iptables/iptables.go rename to pkg/clusterlink/network/iptables/iptables.go diff --git a/pkg/network/neigh.go b/pkg/clusterlink/network/neigh.go similarity index 100% rename from pkg/network/neigh.go rename to pkg/clusterlink/network/neigh.go diff --git a/pkg/network/route.go b/pkg/clusterlink/network/route.go similarity index 100% rename from pkg/network/route.go rename to pkg/clusterlink/network/route.go diff --git a/pkg/operator/addons/agent/agent.go b/pkg/clusterlink/operator/addons/agent/agent.go similarity index 94% rename from pkg/operator/addons/agent/agent.go rename to pkg/clusterlink/operator/addons/agent/agent.go index 486ffd04e..6b61be91f 100644 --- a/pkg/operator/addons/agent/agent.go +++ b/pkg/clusterlink/operator/addons/agent/agent.go @@ -15,9 +15,9 @@ import ( bootstrapapi "k8s.io/cluster-bootstrap/token/api" "k8s.io/klog/v2" - "github.com/kosmos.io/kosmos/pkg/operator/addons/option" - "github.com/kosmos.io/kosmos/pkg/operator/addons/utils" - cmdutil "github.com/kosmos.io/kosmos/pkg/operator/util" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/option" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/utils" + cmdutil "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/util" utils2 "github.com/kosmos.io/kosmos/pkg/utils" ) diff --git a/pkg/operator/addons/agent/manifests.go b/pkg/clusterlink/operator/addons/agent/manifests.go similarity index 100% rename from pkg/operator/addons/agent/manifests.go rename to pkg/clusterlink/operator/addons/agent/manifests.go diff --git a/pkg/operator/addons/elector/elector.go b/pkg/clusterlink/operator/addons/elector/elector.go similarity index 96% rename from pkg/operator/addons/elector/elector.go rename to pkg/clusterlink/operator/addons/elector/elector.go index 41b2ccfdd..5e0d207b7 100644 --- a/pkg/operator/addons/elector/elector.go +++ b/pkg/clusterlink/operator/addons/elector/elector.go @@ -13,9 +13,9 @@ import ( clientsetscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/klog/v2" - "github.com/kosmos.io/kosmos/pkg/operator/addons/option" - "github.com/kosmos.io/kosmos/pkg/operator/addons/utils" - cmdutil "github.com/kosmos.io/kosmos/pkg/operator/util" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/option" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/utils" + cmdutil "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/util" utils2 "github.com/kosmos.io/kosmos/pkg/utils" ) diff --git a/pkg/operator/addons/elector/manifests.go b/pkg/clusterlink/operator/addons/elector/manifests.go similarity index 100% rename from pkg/operator/addons/elector/manifests.go rename to pkg/clusterlink/operator/addons/elector/manifests.go diff --git a/pkg/operator/addons/global/global.go b/pkg/clusterlink/operator/addons/global/global.go similarity index 88% rename from pkg/operator/addons/global/global.go rename to pkg/clusterlink/operator/addons/global/global.go index b3d1601ec..47dac5eb7 100644 --- a/pkg/operator/addons/global/global.go +++ b/pkg/clusterlink/operator/addons/global/global.go @@ -8,9 +8,9 @@ import ( clientsetscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/klog/v2" - "github.com/kosmos.io/kosmos/pkg/operator/addons/option" - "github.com/kosmos.io/kosmos/pkg/operator/addons/utils" - cmdutil "github.com/kosmos.io/kosmos/pkg/operator/util" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/option" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/utils" + cmdutil "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/util" ) type Installer struct { diff --git a/pkg/operator/addons/global/manifests.go b/pkg/clusterlink/operator/addons/global/manifests.go similarity index 100% rename from pkg/operator/addons/global/manifests.go rename to pkg/clusterlink/operator/addons/global/manifests.go diff --git a/pkg/operator/addons/install.go b/pkg/clusterlink/operator/addons/install.go similarity index 63% rename from pkg/operator/addons/install.go rename to pkg/clusterlink/operator/addons/install.go index 097b5d4e3..3deada288 100644 --- a/pkg/operator/addons/install.go +++ b/pkg/clusterlink/operator/addons/install.go @@ -3,12 +3,12 @@ package addons import ( "k8s.io/klog/v2" - "github.com/kosmos.io/kosmos/pkg/operator/addons/agent" - "github.com/kosmos.io/kosmos/pkg/operator/addons/elector" - "github.com/kosmos.io/kosmos/pkg/operator/addons/global" - "github.com/kosmos.io/kosmos/pkg/operator/addons/manager" - "github.com/kosmos.io/kosmos/pkg/operator/addons/option" - "github.com/kosmos.io/kosmos/pkg/operator/addons/proxy" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/agent" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/elector" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/global" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/manager" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/option" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/proxy" ) type AddonInstaller interface { diff --git a/pkg/operator/addons/manager/manager.go b/pkg/clusterlink/operator/addons/manager/manager.go similarity index 96% rename from pkg/operator/addons/manager/manager.go rename to pkg/clusterlink/operator/addons/manager/manager.go index 90114dd8f..7d4ddfd9d 100644 --- a/pkg/operator/addons/manager/manager.go +++ b/pkg/clusterlink/operator/addons/manager/manager.go @@ -13,9 +13,9 @@ import ( clientsetscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/klog/v2" - "github.com/kosmos.io/kosmos/pkg/operator/addons/option" - "github.com/kosmos.io/kosmos/pkg/operator/addons/utils" - cmdutil "github.com/kosmos.io/kosmos/pkg/operator/util" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/option" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/utils" + cmdutil "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/util" utils2 "github.com/kosmos.io/kosmos/pkg/utils" ) diff --git a/pkg/operator/addons/manager/manifests.go b/pkg/clusterlink/operator/addons/manager/manifests.go similarity index 100% rename from pkg/operator/addons/manager/manifests.go rename to pkg/clusterlink/operator/addons/manager/manifests.go diff --git a/pkg/operator/addons/option/option.go b/pkg/clusterlink/operator/addons/option/option.go similarity index 94% rename from pkg/operator/addons/option/option.go rename to pkg/clusterlink/operator/addons/option/option.go index e1f8845fb..70921864b 100644 --- a/pkg/operator/addons/option/option.go +++ b/pkg/clusterlink/operator/addons/option/option.go @@ -8,7 +8,7 @@ import ( "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - cmdOptions "github.com/kosmos.io/kosmos/cmd/operator/app/options" + cmdOptions "github.com/kosmos.io/kosmos/cmd/clusterlink/operator/app/options" clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" "github.com/kosmos.io/kosmos/pkg/version" ) diff --git a/pkg/operator/addons/proxy/manifests.go b/pkg/clusterlink/operator/addons/proxy/manifests.go similarity index 100% rename from pkg/operator/addons/proxy/manifests.go rename to pkg/clusterlink/operator/addons/proxy/manifests.go diff --git a/pkg/operator/addons/proxy/proxy.go b/pkg/clusterlink/operator/addons/proxy/proxy.go similarity index 95% rename from pkg/operator/addons/proxy/proxy.go rename to pkg/clusterlink/operator/addons/proxy/proxy.go index 77884397e..1d658342a 100644 --- a/pkg/operator/addons/proxy/proxy.go +++ b/pkg/clusterlink/operator/addons/proxy/proxy.go @@ -14,9 +14,9 @@ import ( "k8s.io/client-go/tools/clientcmd" "k8s.io/klog/v2" - "github.com/kosmos.io/kosmos/pkg/operator/addons/option" - "github.com/kosmos.io/kosmos/pkg/operator/addons/utils" - cmdutil "github.com/kosmos.io/kosmos/pkg/operator/util" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/option" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/utils" + cmdutil "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/util" utils2 "github.com/kosmos.io/kosmos/pkg/utils" ) diff --git a/pkg/operator/addons/utils/template.go b/pkg/clusterlink/operator/addons/utils/template.go similarity index 100% rename from pkg/operator/addons/utils/template.go rename to pkg/clusterlink/operator/addons/utils/template.go diff --git a/pkg/operator/operator_controller.go b/pkg/clusterlink/operator/operator_controller.go similarity index 95% rename from pkg/operator/operator_controller.go rename to pkg/clusterlink/operator/operator_controller.go index bf927520e..c7399506c 100644 --- a/pkg/operator/operator_controller.go +++ b/pkg/clusterlink/operator/operator_controller.go @@ -16,11 +16,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" - cmdOptions "github.com/kosmos.io/kosmos/cmd/operator/app/options" + cmdOptions "github.com/kosmos.io/kosmos/cmd/clusterlink/operator/app/options" clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons" + "github.com/kosmos.io/kosmos/pkg/clusterlink/operator/addons/option" clusterlinkv1alpha1lister "github.com/kosmos.io/kosmos/pkg/generated/listers/kosmos/v1alpha1" - "github.com/kosmos.io/kosmos/pkg/operator/addons" - "github.com/kosmos.io/kosmos/pkg/operator/addons/option" "github.com/kosmos.io/kosmos/pkg/utils" ) diff --git a/pkg/operator/util/idempotency.go b/pkg/clusterlink/operator/util/idempotency.go similarity index 100% rename from pkg/operator/util/idempotency.go rename to pkg/clusterlink/operator/util/idempotency.go diff --git a/pkg/proxy/apiserver.go b/pkg/clusterlink/proxy/apiserver.go similarity index 100% rename from pkg/proxy/apiserver.go rename to pkg/clusterlink/proxy/apiserver.go diff --git a/pkg/proxy/storage.go b/pkg/clusterlink/proxy/storage.go similarity index 99% rename from pkg/proxy/storage.go rename to pkg/clusterlink/proxy/storage.go index 4ec05f937..deec6e6d2 100644 --- a/pkg/proxy/storage.go +++ b/pkg/clusterlink/proxy/storage.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/apiutil" "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" - "github.com/kosmos.io/kosmos/pkg/proxy/store" + "github.com/kosmos.io/kosmos/pkg/clusterlink/proxy/store" "github.com/kosmos.io/kosmos/pkg/utils/lifted" ) diff --git a/pkg/proxy/store/cluster_cache.go b/pkg/clusterlink/proxy/store/cluster_cache.go similarity index 100% rename from pkg/proxy/store/cluster_cache.go rename to pkg/clusterlink/proxy/store/cluster_cache.go diff --git a/pkg/proxy/store/conversion.go b/pkg/clusterlink/proxy/store/conversion.go similarity index 100% rename from pkg/proxy/store/conversion.go rename to pkg/clusterlink/proxy/store/conversion.go diff --git a/pkg/proxy/store/resource_cache.go b/pkg/clusterlink/proxy/store/resource_cache.go similarity index 100% rename from pkg/proxy/store/resource_cache.go rename to pkg/clusterlink/proxy/store/resource_cache.go diff --git a/pkg/proxy/store/store.go b/pkg/clusterlink/proxy/store/store.go similarity index 100% rename from pkg/proxy/store/store.go rename to pkg/clusterlink/proxy/store/store.go