From 9586b47625527335b90b3bcdd9e84718ff4c9025 Mon Sep 17 00:00:00 2001 From: hanweisen Date: Fri, 11 Aug 2023 18:14:35 +0800 Subject: [PATCH] change repo Signed-off-by: hanweisen --- Makefile | 2 +- deploy/clusterlink-agent.yaml | 2 +- deploy/clusterlink-controller-manager.yml | 2 +- deploy/clusterlink-elector.yml | 2 +- deploy/clusterlink-network-manager.yml | 2 +- deploy/clusterlink-operator.yml | 2 +- deploy/clusterlink-proxy.yml | 2 +- hack/cluster.sh | 42 +++++++------------ pkg/clusterlinkctl/floaterclient/doctor.go | 2 +- .../initmaster/ctlmaster/install.go | 4 +- pkg/clusterlinkctl/initmaster/initmaster.go | 4 +- 11 files changed, 27 insertions(+), 39 deletions(-) diff --git a/Makefile b/Makefile index cc7db780f..fd82f55f6 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ GOARCH ?= $(shell go env GOARCH) VERSION ?= '$(shell hack/version.sh)' # Images management -REGISTRY?="nexus.cmss.com:8086/cnp/clusterlink" +REGISTRY?="ghcr.io/kosmos-io/clusterlink" REGISTRY_USER_NAME?="" REGISTRY_PASSWORD?="" REGISTRY_SERVER_ADDRESS?="" diff --git a/deploy/clusterlink-agent.yaml b/deploy/clusterlink-agent.yaml index 3581937b0..c89f310a1 100644 --- a/deploy/clusterlink-agent.yaml +++ b/deploy/clusterlink-agent.yaml @@ -23,7 +23,7 @@ spec: effect: NoSchedule containers: - name: clusterlink-agent - image: nexus.cmss.com:8086/cnp/clusterlink/clusterlink-agent:__VERSION__ + image: ghcr.io/kosmos-io/clusterlink/clusterlink-agent:__VERSION__ imagePullPolicy: IfNotPresent command: - clusterlink-agent diff --git a/deploy/clusterlink-controller-manager.yml b/deploy/clusterlink-controller-manager.yml index f5fbee4a3..d7900fcf6 100644 --- a/deploy/clusterlink-controller-manager.yml +++ b/deploy/clusterlink-controller-manager.yml @@ -24,7 +24,7 @@ spec: serviceAccountName: clusterlink-controller-manager containers: - name: manager - image: nexus.cmss.com:8086/cnp/clusterlink/clusterlink-controller-manager:__VERSION__ + image: ghcr.io/kosmos-io/clusterlink/clusterlink-controller-manager:__VERSION__ imagePullPolicy: IfNotPresent command: - clusterlink-controller-manager diff --git a/deploy/clusterlink-elector.yml b/deploy/clusterlink-elector.yml index d6727b3a2..e6315d91d 100644 --- a/deploy/clusterlink-elector.yml +++ b/deploy/clusterlink-elector.yml @@ -34,7 +34,7 @@ spec: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - image: nexus.cmss.com:8086/cnp/clusterlink/clusterlink-elector:__VERSION__ + image: ghcr.io/kosmos-io/clusterlink/clusterlink-elector:__VERSION__ imagePullPolicy: IfNotPresent name: elector resources: diff --git a/deploy/clusterlink-network-manager.yml b/deploy/clusterlink-network-manager.yml index 49add9d7d..001daf740 100644 --- a/deploy/clusterlink-network-manager.yml +++ b/deploy/clusterlink-network-manager.yml @@ -48,7 +48,7 @@ spec: serviceAccountName: clusterlink-network-manager containers: - name: manager - image: nexus.cmss.com:8086/cnp/clusterlink/clusterlink-network-manager:__VERSION__ + image: ghcr.io/kosmos-io/clusterlink/clusterlink-network-manager:__VERSION__ imagePullPolicy: IfNotPresent command: - clusterlink-network-manager diff --git a/deploy/clusterlink-operator.yml b/deploy/clusterlink-operator.yml index c9356c988..7209da46e 100644 --- a/deploy/clusterlink-operator.yml +++ b/deploy/clusterlink-operator.yml @@ -24,7 +24,7 @@ spec: serviceAccountName: clusterlink-operator containers: - name: operator - image: nexus.cmss.com:8086/cnp/clusterlink/clusterlink-operator:__VERSION__ + image: ghcr.io/kosmos-io/clusterlink/clusterlink-operator:__VERSION__ imagePullPolicy: IfNotPresent command: - clusterlink-operator diff --git a/deploy/clusterlink-proxy.yml b/deploy/clusterlink-proxy.yml index f4039a1d7..0c6a1d386 100644 --- a/deploy/clusterlink-proxy.yml +++ b/deploy/clusterlink-proxy.yml @@ -37,7 +37,7 @@ spec: name: clusterlink-agent-proxy containers: - name: manager - image: nexus.cmss.com:8086/cnp/clusterlink/clusterlink-proxy:__VERSION__ + image: ghcr.io/kosmos-io/clusterlink/clusterlink-proxy:__VERSION__ imagePullPolicy: IfNotPresent command: - clusterlink-proxy diff --git a/hack/cluster.sh b/hack/cluster.sh index 81679231a..3ab92204a 100755 --- a/hack/cluster.sh +++ b/hack/cluster.sh @@ -7,7 +7,7 @@ set -o pipefail CURRENT="$(dirname "${BASH_SOURCE[0]}")" ROOT=$(dirname "${BASH_SOURCE[0]}")/.. DEFAULT_NAMESPACE="clusterlink-system" -KIND_IMAGE="nexus.cmss.com:8086/cnp/kindest/node:v1.25.3_1" +KIND_IMAGE="ghcr.io/kosmos-io/clusterlink/kindest/node:v1.25.3_1" # true: when cluster is exist reuse exist one REUSE=${REUSE:-false} VERSION=${VERSION:-latest} @@ -59,21 +59,13 @@ function create_cluster() { docker exec ${clustername}-control-plane /bin/sh -c "cat /etc/kubernetes/admin.conf"| sed -e "s|${clustername}-control-plane|$dockerip|g" -e "/certificate-authority-data:/d" -e "5s/^/ insecure-skip-tls-verify: true\n/" -e "w ${CLUSTER_DIR}/kubeconfig" # install calico - docker pull nexus.cmss.com:8086/quay.io/tigera/operator:v1.29.0 - docker pull nexus.cmss.com:8086/calico/cni:v3.25.0 - docker pull nexus.cmss.com:8086/calico/typha:v3.25.0 - docker pull nexus.cmss.com:8086/calico/pod2daemon-flexvol:v3.25.0 - docker pull nexus.cmss.com:8086/kube-controllers:v3.25.0 - docker pull nexus.cmss.com:8086/calico/node:v3.25.0 - docker pull nexus.cmss.com:8086/calico/csi:v3.25.0 - - docker tag nexus.cmss.com:8086/quay.io/tigera/operator:v1.29.0 quay.io/tigera/operator:v1.29.0 - docker tag nexus.cmss.com:8086/calico/cni:v3.25.0 docker.io/calico/cni:v3.25.0 - docker tag nexus.cmss.com:8086/calico/typha:v3.25.0 docker.io/calico/typha:v3.25.0 - docker tag nexus.cmss.com:8086/calico/pod2daemon-flexvol:v3.25.0 docker.io/calico/pod2daemon-flexvol:v3.25.0 - docker tag nexus.cmss.com:8086/kube-controllers:v3.25.0 docker.io/calico/kube-controllers:v3.25.0 - docker tag nexus.cmss.com:8086/calico/node:v3.25.0 docker.io/calico/node:v3.25.0 - docker tag nexus.cmss.com:8086/calico/csi:v3.25.0 docker.io/calico/csi:v3.25.0 + docker pull quay.io/tigera/operator:v1.29.0 + docker pull docker.io/calico/cni:v3.25.0 + docker pull docker.io/calico/typha:v3.25.0 + docker pull docker.io/calico/pod2daemon-flexvol:v3.25.0 + docker pull docker.io/calico/kube-controllers:v3.25.0 + docker pull docker.io/calico/node:v3.25.0 + docker pull docker.io/calico/csi:v3.25.0 kind load docker-image -n "$clustername" quay.io/tigera/operator:v1.29.0 kind load docker-image -n "$clustername" docker.io/calico/cni:v3.25.0 @@ -110,7 +102,7 @@ metadata: spec: cni: "calico" defaultNICName: eth0 - imageRepository: "nexus.cmss.com:8086/cnp/clusterlink" + imageRepository: "ghcr.io/kosmos-io/clusterlink" networkType: "gateway" EOF kubectl --context="kind-${member_cluster}" apply -f "$ROOT"/deploy/clusterlink-namespace.yml @@ -139,12 +131,12 @@ function deploy_clusterlink() { function load_clusterlink_images() { local -r clustername=$1 - kind load docker-image -n "$clustername" nexus.cmss.com:8086/cnp/clusterlink/clusterlink-network-manager:"${VERSION}" - kind load docker-image -n "$clustername" nexus.cmss.com:8086/cnp/clusterlink/clusterlink-controller-manager:"${VERSION}" - kind load docker-image -n "$clustername" nexus.cmss.com:8086/cnp/clusterlink/clusterlink-elector:"${VERSION}" - kind load docker-image -n "$clustername" nexus.cmss.com:8086/cnp/clusterlink/clusterlink-operator:"${VERSION}" - kind load docker-image -n "$clustername" nexus.cmss.com:8086/cnp/clusterlink/clusterlink-agent:"${VERSION}" - kind load docker-image -n "$clustername" nexus.cmss.com:8086/cnp/clusterlink/clusterlink-proxy:"${VERSION}" + kind load docker-image -n "$clustername" ghcr.io/kosmos-io/clusterlink/clusterlink-network-manager:"${VERSION}" + kind load docker-image -n "$clustername" ghcr.io/kosmos-io/clusterlink/clusterlink-controller-manager:"${VERSION}" + kind load docker-image -n "$clustername" ghcr.io/kosmos-io/clusterlink/clusterlink-elector:"${VERSION}" + kind load docker-image -n "$clustername" ghcr.io/kosmos-io/clusterlink/clusterlink-operator:"${VERSION}" + kind load docker-image -n "$clustername" ghcr.io/kosmos-io/clusterlink/clusterlink-agent:"${VERSION}" + kind load docker-image -n "$clustername" ghcr.io/kosmos-io/clusterlink/clusterlink-proxy:"${VERSION}" } function delete_cluster() { @@ -155,7 +147,3 @@ function delete_cluster() { #rm -rf CLUSTER_DIR echo "cluster $clustername delete success" } - -#create_cluster testcluster 10.233.64.0/18 10.233.0.0/18 -#deploy_clusterlink testcluster -#join_cluster testcluster testcluster diff --git a/pkg/clusterlinkctl/floaterclient/doctor.go b/pkg/clusterlinkctl/floaterclient/doctor.go index 39cefdd18..c057f672e 100644 --- a/pkg/clusterlinkctl/floaterclient/doctor.go +++ b/pkg/clusterlinkctl/floaterclient/doctor.go @@ -85,7 +85,7 @@ func CmdDoctor(parentCommand string) *cobra.Command { flags := cmd.Flags() flags.StringVarP(&opts.Namespace, "namespace", "n", "clusterlink-system", "Kubernetes namespace.") - flags.StringVarP(&opts.ImageRepository, "image-repository", "r", "nexus.cmss.com:8086/cnp/clusterlink", "Image repository.") + flags.StringVarP(&opts.ImageRepository, "image-repository", "r", "ghcr.io/kosmos-io/clusterlink", "Image repository.") flags.StringVarP(&opts.ImageRepositoryDst, "image-repository-dst", "", "", "Image repository.") flags.StringVar(&opts.HostKubeConfig, "host-kubeconfig", "", "Absolute path to the host kubeconfig file.") diff --git a/pkg/clusterlinkctl/initmaster/ctlmaster/install.go b/pkg/clusterlinkctl/initmaster/ctlmaster/install.go index eed85b737..5fd73ffcd 100644 --- a/pkg/clusterlinkctl/initmaster/ctlmaster/install.go +++ b/pkg/clusterlinkctl/initmaster/ctlmaster/install.go @@ -34,9 +34,9 @@ func init() { DefaultCrdURL = fmt.Sprintf("https://github.com/clusterlink-io/clusterlink/releases/download/%s/crds.tar.gz", releaseVer.FirstMinorRelease()) DefaultInitImage = "docker.io/alpine:3.15.1" - DefaultClusterlinkOperatorImage = "nexus.cmss.com:8086/cnp/clusterlink/clusterlink-operator:0.1.0" // fmt.Sprintf("docker.io/clusterlink/clusterlink-operator:%s", releaseVer.PatchRelease()) + DefaultClusterlinkOperatorImage = "ghcr.io/kosmos-io/clusterlink/clusterlink-operator:0.1.0" // fmt.Sprintf("docker.io/clusterlink/clusterlink-operator:%s", releaseVer.PatchRelease()) DefaultClusterlinkOperatorReplicas = 1 - DefaultClusterlinkControllerManagerImage = "nexus.cmss.com:8086/cnp/clusterlink/clusterlink-controller-manager:0.1.0" //fmt.Sprintf("docker.io/clusterlink/clusterlink-controller-manager:%s", releaseVer.PatchRelease()) + DefaultClusterlinkControllerManagerImage = "ghcr.io/kosmos-io/clusterlink/clusterlink-controller-manager:0.1.0" //fmt.Sprintf("docker.io/clusterlink/clusterlink-controller-manager:%s", releaseVer.PatchRelease()) } // CommandInitOption holds all flags options for init. diff --git a/pkg/clusterlinkctl/initmaster/initmaster.go b/pkg/clusterlinkctl/initmaster/initmaster.go index 041516225..b3ede51e5 100644 --- a/pkg/clusterlinkctl/initmaster/initmaster.go +++ b/pkg/clusterlinkctl/initmaster/initmaster.go @@ -24,9 +24,9 @@ var ( # Install Clusterlink Operator and Clusterlink Controller Manager by assigned namespace %[1]s init --namespace NAMESPACE_NAME # Install Clusterlink Operator and Clusterlink Controller Manager by required image - %[1]s init --clusterlink-controller-image nexus.cmss.com:8086/cnp/clusterlink/clusterlink-controller-manager:0.1.0 --clusterlink-operator-image nexus.cmss.com:8086/cnp/clusterlink/clusterlink-operator:0.1.0 + %[1]s init --clusterlink-controller-image ghcr.io/kosmos-io/clusterlink/clusterlink-controller-manager:0.1.0 --clusterlink-operator-image ghcr.io/kosmos-io/clusterlink/clusterlink-operator:0.1.0 # Install Clusterlink Operator and Clusterlink Controller Manager by required registry - %[1]s init --private-image-registry nexus.cmss.com:8086/cnp/clusterlink`) + %[1]s init --private-image-registry ghcr.io/kosmos-io/clusterlink`) deinitExamples = templates.Examples(` # Deinit Clusterlink Operator and Clusterlink Controller Manager in all namespaces