Skip to content

Commit

Permalink
feat: support promote dependent resources automatically
Browse files Browse the repository at this point in the history
Signed-off-by: zhy76 <958474674@qq.com>
  • Loading branch information
zhy76 committed Nov 15, 2023
1 parent 1b2c6ed commit 16f0163
Show file tree
Hide file tree
Showing 8 changed files with 271 additions and 19 deletions.
2 changes: 1 addition & 1 deletion artifacts/deploy/karmada-apiserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
- --tls-cert-file=/etc/karmada/pki/apiserver.crt
- --tls-private-key-file=/etc/karmada/pki/apiserver.key
name: karmada-apiserver
image: registry.k8s.io/kube-apiserver:v1.25.4
image: registry.aliyuncs.com/google_containers/kube-apiserver:v1.25.4
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 8
Expand Down
2 changes: 1 addition & 1 deletion artifacts/deploy/karmada-etcd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
- operator: Exists
containers:
- name: etcd
image: registry.k8s.io/etcd:3.5.9-0
image: registry.aliyuncs.com/google_containers/etcd:3.5.9-0
imagePullPolicy: IfNotPresent
livenessProbe:
exec:
Expand Down
2 changes: 1 addition & 1 deletion artifacts/deploy/kube-controller-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
- --service-cluster-ip-range=10.96.0.0/12
- --use-service-account-credentials=true
- --v=4
image: registry.k8s.io/kube-controller-manager:v1.25.4
image: registry.aliyuncs.com/google_containers/kube-controller-manager:v1.25.4
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 8
Expand Down
1 change: 1 addition & 0 deletions cluster/images/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM alpine:3.18.3
RUN echo -e http://mirrors.ustc.edu.cn/alpine/v3.18/main/ > /etc/apk/repositories

ARG BINARY

Expand Down
1 change: 1 addition & 0 deletions cluster/images/buildx.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM alpine:3.18.3
RUN echo -e http://mirrors.ustc.edu.cn/alpine/v3.18/main/ > /etc/apk/repositories

ARG BINARY
ARG TARGETPLATFORM
Expand Down
3 changes: 2 additions & 1 deletion hack/deploy-k8s-metrics-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ fi
MEMBER_CLUSTER_NAME=$2

# get deploy yaml
wget https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.6.3/components.yaml -O "${_tmp}/components.yaml"
curl -sSLo "${_tmp}/components.yaml" https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.6.3/components.yaml
#wget https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.6.3/components.yaml -O "${_tmp}/components.yaml"
sed -i'' -e 's/args:/args:\n - --kubelet-insecure-tls=true/' "${_tmp}/components.yaml"

# deploy metrics-server in member cluster
Expand Down
2 changes: 1 addition & 1 deletion hack/local-up-karmada.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export REGISTRY="docker.io/karmada"
make images GOOS="linux" --directory="${REPO_ROOT}"

GO111MODULE=on go install "github.com/karmada-io/karmada/cmd/karmadactl"
GOPATH=$(go env GOPATH | awk -F ':' '{print $1}')
GOPATH=$(go env GOROOT | awk -F ':' '{print $1}')
KARMADACTL_BIN="${GOPATH}/bin/karmadactl"

#step3. wait until the host cluster ready
Expand Down
277 changes: 263 additions & 14 deletions pkg/karmadactl/promote/promote.go

Large diffs are not rendered by default.

0 comments on commit 16f0163

Please sign in to comment.