Skip to content

Commit

Permalink
Merge pull request #7 from hanweisen/main
Browse files Browse the repository at this point in the history
change repo for clusterlink images
  • Loading branch information
hanweisen authored Aug 11, 2023
2 parents 22a2750 + 9586b47 commit b25dee6
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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?=""
Expand Down
2 changes: 1 addition & 1 deletion deploy/clusterlink-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/clusterlink-controller-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/clusterlink-elector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion deploy/clusterlink-network-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/clusterlink-operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/clusterlink-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
42 changes: 15 additions & 27 deletions hack/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand All @@ -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
2 changes: 1 addition & 1 deletion pkg/clusterlinkctl/floaterclient/doctor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
4 changes: 2 additions & 2 deletions pkg/clusterlinkctl/initmaster/ctlmaster/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions pkg/clusterlinkctl/initmaster/initmaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b25dee6

Please sign in to comment.