From 79bcd83645dc70087f37072a2c376cc8ab774dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A1=95?= Date: Mon, 21 Oct 2024 18:42:11 +0800 Subject: [PATCH] init --- .../ci-image-scanning-on-schedule.yml | 6 +- .github/workflows/ci-image-scanning.yaml | 6 +- Makefile | 6 +- artifacts/agent/karmada-agent.yaml | 4 +- .../deploy/karmada-aggregated-apiserver.yaml | 4 +- .../deploy/karmada-controller-manager.yaml | 4 +- artifacts/deploy/karmada-descheduler.yaml | 4 +- artifacts/deploy/karmada-metrics-adapter.yaml | 2 +- .../deploy/karmada-scheduler-estimator.yaml | 4 +- artifacts/deploy/karmada-scheduler.yaml | 4 +- artifacts/deploy/karmada-search.yaml | 4 +- artifacts/deploy/karmada-webhook.yaml | 4 +- .../kindClusterConfig/general-config.yaml | 1 + artifacts/kindClusterConfig/karmada-host.yaml | 10 + artifacts/kindClusterConfig/member1.yaml | 1 + artifacts/kindClusterConfig/member2.yaml | 1 + artifacts/kindClusterConfig/member3.yaml | 1 + case/service/1-control-plane.yaml | 31 +++ case/service/2-member1.yaml | 56 +++++ case/service/3-member1.yaml | 18 ++ case/service/4-member2.yaml | 24 +++ case/service/5-test.yaml | 45 ++++ case/service/broker-info.subm | 1 + case/service/install.sh | 64 ++++++ charts/karmada/README.md | 16 +- dump.sh | 18 ++ .../karmada-interpreter-webhook-example.yaml | 2 +- .../observed-deploy-nginx.yaml | 2 +- hack/cli-testing-environment.sh | 2 +- hack/deploy-k8s-metrics-server.sh | 3 +- hack/docker.sh | 2 +- hack/local-down-karmada.sh | 2 +- hack/local-up-karmada.sh | 2 +- hack/metrics-server.yaml | 196 ++++++++++++++++++ hack/pre-run-e2e.sh | 2 +- hack/scan-image-vuln.sh | 10 +- hack/util.sh | 24 +-- operator/config/deploy/karmada-operator.yaml | 2 +- operator/config/samples/karmada.yaml | 16 +- operator/pkg/constants/constants.go | 2 +- .../pkg/controlplane/controlplane_test.go | 12 +- .../pkg/controlplane/webhook/webhook_test.go | 4 +- pkg/karmadactl/addons/enable.go | 2 +- pkg/karmadactl/addons/init/enable_option.go | 8 +- pkg/karmadactl/cmdinit/kubernetes/deploy.go | 8 +- pkg/karmadactl/cmdinit/utils/examples.go | 4 +- pkg/karmadactl/register/register.go | 2 +- .../testdata/observed-cloneset-nginx.yaml | 4 +- .../CloneSet/testdata/status-file.yaml | 4 +- .../testdata/desired-statefulset-nginx.yaml | 2 +- .../testdata/observed-statefulset-nginx.yaml | 4 +- .../StatefulSet/testdata/status-file.yaml | 4 +- samples/nginx/deployment.yaml | 2 +- update.py | 22 ++ 54 files changed, 589 insertions(+), 99 deletions(-) create mode 100644 case/service/1-control-plane.yaml create mode 100644 case/service/2-member1.yaml create mode 100644 case/service/3-member1.yaml create mode 100644 case/service/4-member2.yaml create mode 100644 case/service/5-test.yaml create mode 100644 case/service/broker-info.subm create mode 100755 case/service/install.sh create mode 100755 dump.sh create mode 100644 hack/metrics-server.yaml create mode 100644 update.py diff --git a/.github/workflows/ci-image-scanning-on-schedule.yml b/.github/workflows/ci-image-scanning-on-schedule.yml index fb967d228590..8a67423c386d 100644 --- a/.github/workflows/ci-image-scanning-on-schedule.yml +++ b/.github/workflows/ci-image-scanning-on-schedule.yml @@ -44,12 +44,12 @@ jobs: - name: Build images from Dockerfile run: | export VERSION=${{ matrix.karmada-version }} - export REGISTRY="docker.io/karmada" + export REGISTRY="registry.cn-hangzhou.aliyuncs.com/acejilam" make image-${{ matrix.target }} - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@0.27.0 with: - image-ref: 'docker.io/karmada/${{ matrix.target }}:${{ matrix.karmada-version }}' + image-ref: 'registry.cn-hangzhou.aliyuncs.com/acejilam/${{ matrix.target }}:${{ matrix.karmada-version }}' format: 'sarif' ignore-unfixed: true vuln-type: 'os,library' @@ -57,7 +57,7 @@ jobs: - name: display scan results uses: aquasecurity/trivy-action@0.27.0 with: - image-ref: 'docker.io/karmada/${{ matrix.target }}:${{ matrix.karmada-version }}' + image-ref: 'registry.cn-hangzhou.aliyuncs.com/acejilam/${{ matrix.target }}:${{ matrix.karmada-version }}' format: 'table' ignore-unfixed: true vuln-type: 'os,library' diff --git a/.github/workflows/ci-image-scanning.yaml b/.github/workflows/ci-image-scanning.yaml index 630606275ce8..a30e0a3a5d42 100644 --- a/.github/workflows/ci-image-scanning.yaml +++ b/.github/workflows/ci-image-scanning.yaml @@ -39,12 +39,12 @@ jobs: - name: Build an image from Dockerfile run: | export VERSION="latest" - export REGISTRY="docker.io/karmada" + export REGISTRY="registry.cn-hangzhou.aliyuncs.com/acejilam" make image-${{ matrix.target }} - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@0.27.0 with: - image-ref: 'docker.io/karmada/${{ matrix.target }}:latest' + image-ref: 'registry.cn-hangzhou.aliyuncs.com/acejilam/${{ matrix.target }}:latest' format: 'sarif' ignore-unfixed: true vuln-type: 'os,library' @@ -52,7 +52,7 @@ jobs: - name: display scan results uses: aquasecurity/trivy-action@0.27.0 with: - image-ref: 'docker.io/karmada/${{ matrix.target }}:latest' + image-ref: 'registry.cn-hangzhou.aliyuncs.com/acejilam/${{ matrix.target }}:latest' format: 'table' ignore-unfixed: true vuln-type: 'os,library' diff --git a/Makefile b/Makefile index 0ff7f0c9df9d..326e073fe0cb 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ GOARCH ?= $(shell go env GOARCH) VERSION ?= '$(shell hack/version.sh)' # Images management -REGISTRY?="docker.io/karmada" +REGISTRY?="registry.cn-hangzhou.aliyuncs.com/acejilam" REGISTRY_USER_NAME?="" REGISTRY_PASSWORD?="" REGISTRY_SERVER_ADDRESS?="" @@ -99,8 +99,8 @@ package-chart: .PHONY: push-chart push-chart: - helm push _output/charts/karmada-chart-${VERSION}.tgz oci://docker.io/karmada - helm push _output/charts/karmada-operator-chart-${VERSION}.tgz oci://docker.io/karmada + helm push _output/charts/karmada-chart-${VERSION}.tgz oci://registry.cn-hangzhou.aliyuncs.com/acejilam + helm push _output/charts/karmada-operator-chart-${VERSION}.tgz oci://registry.cn-hangzhou.aliyuncs.com/acejilam GOTESTSUM_REGISTRY:=gotest.tools/gotestsum GOTESTSUM_VERSION:=ec99a250836f069a524bb9d9b5de0a7a96334ea7 # v1.11.0 diff --git a/artifacts/agent/karmada-agent.yaml b/artifacts/agent/karmada-agent.yaml index 4f4eb5801763..b295471343dd 100644 --- a/artifacts/agent/karmada-agent.yaml +++ b/artifacts/agent/karmada-agent.yaml @@ -6,7 +6,7 @@ metadata: labels: app: karmada-agent spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: karmada-agent @@ -21,7 +21,7 @@ spec: operator: Exists containers: - name: karmada-agent - image: docker.io/karmada/karmada-agent:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-agent:latest imagePullPolicy: {{image_pull_policy}} command: - /bin/karmada-agent diff --git a/artifacts/deploy/karmada-aggregated-apiserver.yaml b/artifacts/deploy/karmada-aggregated-apiserver.yaml index 58493c5ceff0..091d3ac11cca 100644 --- a/artifacts/deploy/karmada-aggregated-apiserver.yaml +++ b/artifacts/deploy/karmada-aggregated-apiserver.yaml @@ -12,7 +12,7 @@ spec: matchLabels: app: karmada-aggregated-apiserver apiserver: "true" - replicas: 2 + replicas: 1 template: metadata: labels: @@ -22,7 +22,7 @@ spec: automountServiceAccountToken: false containers: - name: karmada-aggregated-apiserver - image: docker.io/karmada/karmada-aggregated-apiserver:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-aggregated-apiserver:latest imagePullPolicy: IfNotPresent volumeMounts: - name: karmada-certs diff --git a/artifacts/deploy/karmada-controller-manager.yaml b/artifacts/deploy/karmada-controller-manager.yaml index 6e5afc50856d..e279bc456ed0 100644 --- a/artifacts/deploy/karmada-controller-manager.yaml +++ b/artifacts/deploy/karmada-controller-manager.yaml @@ -6,7 +6,7 @@ metadata: labels: app: karmada-controller-manager spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: karmada-controller-manager @@ -21,7 +21,7 @@ spec: operator: Exists containers: - name: karmada-controller-manager - image: docker.io/karmada/karmada-controller-manager:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-controller-manager:latest imagePullPolicy: IfNotPresent command: - /bin/karmada-controller-manager diff --git a/artifacts/deploy/karmada-descheduler.yaml b/artifacts/deploy/karmada-descheduler.yaml index 696507be4b2c..2040a9ec7af7 100644 --- a/artifacts/deploy/karmada-descheduler.yaml +++ b/artifacts/deploy/karmada-descheduler.yaml @@ -6,7 +6,7 @@ metadata: labels: app: karmada-descheduler spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: karmada-descheduler @@ -21,7 +21,7 @@ spec: operator: Exists containers: - name: karmada-descheduler - image: docker.io/karmada/karmada-descheduler:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-descheduler:latest imagePullPolicy: IfNotPresent command: - /bin/karmada-descheduler diff --git a/artifacts/deploy/karmada-metrics-adapter.yaml b/artifacts/deploy/karmada-metrics-adapter.yaml index 437b18c419b0..ccd27e221640 100644 --- a/artifacts/deploy/karmada-metrics-adapter.yaml +++ b/artifacts/deploy/karmada-metrics-adapter.yaml @@ -22,7 +22,7 @@ spec: automountServiceAccountToken: false containers: - name: karmada-metrics-adapter - image: docker.io/karmada/karmada-metrics-adapter:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-metrics-adapter:latest imagePullPolicy: IfNotPresent volumeMounts: - name: karmada-certs diff --git a/artifacts/deploy/karmada-scheduler-estimator.yaml b/artifacts/deploy/karmada-scheduler-estimator.yaml index b1ed2a3abaed..a084a3017624 100644 --- a/artifacts/deploy/karmada-scheduler-estimator.yaml +++ b/artifacts/deploy/karmada-scheduler-estimator.yaml @@ -6,7 +6,7 @@ metadata: labels: cluster: {{member_cluster_name}} spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: karmada-scheduler-estimator-{{member_cluster_name}} @@ -21,7 +21,7 @@ spec: operator: Exists containers: - name: karmada-scheduler-estimator - image: docker.io/karmada/karmada-scheduler-estimator:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler-estimator:latest imagePullPolicy: IfNotPresent command: - /bin/karmada-scheduler-estimator diff --git a/artifacts/deploy/karmada-scheduler.yaml b/artifacts/deploy/karmada-scheduler.yaml index 78ea39224650..0bb5976eaf3a 100644 --- a/artifacts/deploy/karmada-scheduler.yaml +++ b/artifacts/deploy/karmada-scheduler.yaml @@ -6,7 +6,7 @@ metadata: labels: app: karmada-scheduler spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: karmada-scheduler @@ -21,7 +21,7 @@ spec: operator: Exists containers: - name: karmada-scheduler - image: docker.io/karmada/karmada-scheduler:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler:latest imagePullPolicy: IfNotPresent livenessProbe: httpGet: diff --git a/artifacts/deploy/karmada-search.yaml b/artifacts/deploy/karmada-search.yaml index b972096f05dc..3a1e5df79cac 100644 --- a/artifacts/deploy/karmada-search.yaml +++ b/artifacts/deploy/karmada-search.yaml @@ -12,7 +12,7 @@ spec: matchLabels: app: karmada-search apiserver: "true" - replicas: 2 + replicas: 1 template: metadata: labels: @@ -22,7 +22,7 @@ spec: automountServiceAccountToken: false containers: - name: karmada-search - image: docker.io/karmada/karmada-search:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-search:latest imagePullPolicy: IfNotPresent volumeMounts: - name: karmada-certs diff --git a/artifacts/deploy/karmada-webhook.yaml b/artifacts/deploy/karmada-webhook.yaml index bd54acec983c..b0173a738bca 100644 --- a/artifacts/deploy/karmada-webhook.yaml +++ b/artifacts/deploy/karmada-webhook.yaml @@ -6,7 +6,7 @@ metadata: labels: app: karmada-webhook spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: karmada-webhook @@ -21,7 +21,7 @@ spec: operator: Exists containers: - name: karmada-webhook - image: docker.io/karmada/karmada-webhook:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-webhook:latest imagePullPolicy: IfNotPresent command: - /bin/karmada-webhook diff --git a/artifacts/kindClusterConfig/general-config.yaml b/artifacts/kindClusterConfig/general-config.yaml index 08b327abd30c..de7a0b35e9e5 100644 --- a/artifacts/kindClusterConfig/general-config.yaml +++ b/artifacts/kindClusterConfig/general-config.yaml @@ -5,3 +5,4 @@ networking: serviceSubnet: {{service_cidr}} nodes: - role: control-plane + - role: worker diff --git a/artifacts/kindClusterConfig/karmada-host.yaml b/artifacts/kindClusterConfig/karmada-host.yaml index 1342653a5fde..56e1b9454d37 100644 --- a/artifacts/kindClusterConfig/karmada-host.yaml +++ b/artifacts/kindClusterConfig/karmada-host.yaml @@ -3,9 +3,19 @@ apiVersion: "kind.x-k8s.io/v1alpha4" networking: apiServerAddress: "{{host_ipaddress}}" nodes: + - role: worker - role: control-plane extraPortMappings: - containerPort: 5443 hostPort: 5443 protocol: TCP listenAddress: "{{host_ipaddress}}" + +kubeadmConfigPatches: + - | + kind: ClusterConfiguration + apiServer: + certSANs: + - {{host_ipaddress}} + - 127.0.0.1 + - localhost \ No newline at end of file diff --git a/artifacts/kindClusterConfig/member1.yaml b/artifacts/kindClusterConfig/member1.yaml index a78a0b158081..c4aa263c9fc8 100644 --- a/artifacts/kindClusterConfig/member1.yaml +++ b/artifacts/kindClusterConfig/member1.yaml @@ -5,3 +5,4 @@ networking: serviceSubnet: "10.11.0.0/16" nodes: - role: control-plane + - role: worker diff --git a/artifacts/kindClusterConfig/member2.yaml b/artifacts/kindClusterConfig/member2.yaml index 394b6aab96ea..1c2422fb1b6a 100644 --- a/artifacts/kindClusterConfig/member2.yaml +++ b/artifacts/kindClusterConfig/member2.yaml @@ -5,3 +5,4 @@ networking: serviceSubnet: "10.13.0.0/16" nodes: - role: control-plane + - role: worker \ No newline at end of file diff --git a/artifacts/kindClusterConfig/member3.yaml b/artifacts/kindClusterConfig/member3.yaml index f8faaebad6af..e3a04abb7ebc 100644 --- a/artifacts/kindClusterConfig/member3.yaml +++ b/artifacts/kindClusterConfig/member3.yaml @@ -5,3 +5,4 @@ networking: serviceSubnet: "10.15.0.0/16" nodes: - role: control-plane + - role: worker \ No newline at end of file diff --git a/case/service/1-control-plane.yaml b/case/service/1-control-plane.yaml new file mode 100644 index 000000000000..4ae02bfca3a4 --- /dev/null +++ b/case/service/1-control-plane.yaml @@ -0,0 +1,31 @@ +# propagate ServiceExport CRD +apiVersion: policy.karmada.io/v1alpha1 +kind: ClusterPropagationPolicy +metadata: + name: serviceexport-policy +spec: + resourceSelectors: + - apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + name: serviceexports.multicluster.x-k8s.io + placement: + clusterAffinity: + clusterNames: + - member1 + - member2 +--- +# propagate ServiceImport CRD +apiVersion: policy.karmada.io/v1alpha1 +kind: ClusterPropagationPolicy +metadata: + name: serviceimport-policy +spec: + resourceSelectors: + - apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + name: serviceimports.multicluster.x-k8s.io + placement: + clusterAffinity: + clusterNames: + - member1 + - member2 diff --git a/case/service/2-member1.yaml b/case/service/2-member1.yaml new file mode 100644 index 000000000000..752128ff3be1 --- /dev/null +++ b/case/service/2-member1.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: serve +spec: + replicas: 1 + selector: + matchLabels: + app: serve + template: + metadata: + labels: + app: serve + spec: + containers: + - name: serve + image: registry.cn-hangzhou.aliyuncs.com/acejilam/jeremyot_serve:0a40de8 + args: + - "--message='hello from cluster member1 (Node: {{env \"NODE_NAME\"}} Pod: {{env \"POD_NAME\"}} Address: {{addr}})'" + env: + - name: NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name +--- +apiVersion: v1 +kind: Service +metadata: + name: serve +spec: + ports: + - port: 80 + targetPort: 8080 + selector: + app: serve +--- +apiVersion: policy.karmada.io/v1alpha1 +kind: PropagationPolicy +metadata: + name: mcs-workload +spec: + resourceSelectors: + - apiVersion: apps/v1 + kind: Deployment + name: serve + - apiVersion: v1 + kind: Service + name: serve + placement: + clusterAffinity: + clusterNames: + - member1 \ No newline at end of file diff --git a/case/service/3-member1.yaml b/case/service/3-member1.yaml new file mode 100644 index 000000000000..0bc559e046a4 --- /dev/null +++ b/case/service/3-member1.yaml @@ -0,0 +1,18 @@ +apiVersion: multicluster.x-k8s.io/v1alpha1 +kind: ServiceExport +metadata: + name: serve +--- +apiVersion: policy.karmada.io/v1alpha1 +kind: PropagationPolicy +metadata: + name: serve-export-policy +spec: + resourceSelectors: + - apiVersion: multicluster.x-k8s.io/v1alpha1 + kind: ServiceExport + name: serve + placement: + clusterAffinity: + clusterNames: + - member1 \ No newline at end of file diff --git a/case/service/4-member2.yaml b/case/service/4-member2.yaml new file mode 100644 index 000000000000..c2187a98a6d7 --- /dev/null +++ b/case/service/4-member2.yaml @@ -0,0 +1,24 @@ +--- +apiVersion: multicluster.x-k8s.io/v1alpha1 +kind: ServiceImport +metadata: + name: serve +spec: + type: ClusterSetIP + ports: + - port: 80 + protocol: TCP +--- +apiVersion: policy.karmada.io/v1alpha1 +kind: PropagationPolicy +metadata: + name: serve-import-policy +spec: + resourceSelectors: + - apiVersion: multicluster.x-k8s.io/v1alpha1 + kind: ServiceImport + name: serve + placement: + clusterAffinity: + clusterNames: + - member2 \ No newline at end of file diff --git a/case/service/5-test.yaml b/case/service/5-test.yaml new file mode 100644 index 000000000000..718d95012ed8 --- /dev/null +++ b/case/service/5-test.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test +spec: + replicas: 1 + selector: + matchLabels: + app: test + template: + metadata: + labels: + app: test + spec: + containers: + - name: test + image: registry.cn-hangzhou.aliyuncs.com/acejilam/centos:7 + command: + - /bin/bash + - "-c" + - "sleep 1d" + env: + - name: NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name +--- +apiVersion: policy.karmada.io/v1alpha1 +kind: PropagationPolicy +metadata: + name: test-workload +spec: + resourceSelectors: + - apiVersion: apps/v1 + kind: Deployment + name: test + placement: + clusterAffinity: + clusterNames: + - member1 + - member2 \ No newline at end of file diff --git a/case/service/broker-info.subm b/case/service/broker-info.subm new file mode 100644 index 000000000000..174affc0ec4b --- /dev/null +++ b/case/service/broker-info.subm @@ -0,0 +1 @@ +eyJicm9rZXJVUkwiOiJodHRwczovLzEwLjIzMC4yMDUuNDk6NTk2MTIiLCJDbGllbnRUb2tlbiI6eyJtZXRhZGF0YSI6eyJuYW1lIjoic3VibWFyaW5lci1rOHMtYnJva2VyLWFkbWluLXRva2VuLXY1NjY5IiwiZ2VuZXJhdGVOYW1lIjoic3VibWFyaW5lci1rOHMtYnJva2VyLWFkbWluLXRva2VuLSIsIm5hbWVzcGFjZSI6InN1Ym1hcmluZXItazhzLWJyb2tlciIsInVpZCI6IjZjNGNkNTUxLTUzNjUtNGRiMC05MDRkLWVlZjE0Y2RlMGU4NyIsInJlc291cmNlVmVyc2lvbiI6IjEyNjYiLCJjcmVhdGlvblRpbWVzdGFtcCI6IjIwMjQtMTAtMjFUMDk6MTc6MjRaIiwiYW5ub3RhdGlvbnMiOnsia3ViZXJuZXRlcy5pby9jcmVhdGVkLWJ5Ijoic3ViY3RsIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlLWFjY291bnQubmFtZSI6InN1Ym1hcmluZXItazhzLWJyb2tlci1hZG1pbiIsImt1YmVybmV0ZXMuaW8vc2VydmljZS1hY2NvdW50LnVpZCI6IjgyZjA2YTlmLTk1ODItNGVkMi1hNzJhLTg0MjYwNjAyYzVjYyJ9LCJtYW5hZ2VkRmllbGRzIjpbeyJtYW5hZ2VyIjoia3ViZS1jb250cm9sbGVyLW1hbmFnZXIiLCJvcGVyYXRpb24iOiJVcGRhdGUiLCJhcGlWZXJzaW9uIjoidjEiLCJ0aW1lIjoiMjAyNC0xMC0yMVQwOToxNzoyNFoiLCJmaWVsZHNUeXB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HczJVMW95TW14R1NqWTRjRVI2YUVGSU5pMUxkbVJaU2twMlgyUTVSalpXVFVNd1lVSjZTblJRY1habWFsbHhOMFpWV0d0UGNXeHdWamM0UzFRM2VXWTFhMjVqZUY5Zk1qSmZia0o2UjA5VVMwNDFhRXh3UkVkS1gwMW5jbTVmTkZFMVRIcFRVVk5zYzBseFZGbEVOMVptWjI5Q1FWWlRja1JSIn0sInR5cGUiOiJrdWJlcm5ldGVzLmlvL3NlcnZpY2UtYWNjb3VudC10b2tlbiJ9LCJJUFNlY1BTSyI6eyJtZXRhZGF0YSI6eyJuYW1lIjoic3VibWFyaW5lci1pcHNlYy1wc2siLCJjcmVhdGlvblRpbWVzdGFtcCI6bnVsbH0sImRhdGEiOnsicHNrIjoiMlFZRUN6MVVqU3ozV1M5V3pkcVNoMFpSdGlCNEVuZ0tuNlBmL3o1c0F1YytreHR2RUxGVzhhQ0FVRC9ORTRuciJ9fSwiU2VydmljZURpc2NvdmVyeSI6dHJ1ZSwiQ29tcG9uZW50cyI6WyJjb25uZWN0aXZpdHkiLCJzZXJ2aWNlLWRpc2NvdmVyeSJdLCJDdXN0b21Eb21haW5zIjpudWxsfQ== \ No newline at end of file diff --git a/case/service/install.sh b/case/service/install.sh new file mode 100755 index 000000000000..9ed02fa48ab5 --- /dev/null +++ b/case/service/install.sh @@ -0,0 +1,64 @@ +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver delete -f 1-control-plane.yaml +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver delete -f 2-member1.yaml +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver delete -f 3-member1.yaml +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver delete -f 4-member2.yaml +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver delete -f 5-test.yaml + +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver apply -f 1-control-plane.yaml +sleep 1 +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver apply -f 2-member1.yaml +sleep 1 +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver apply -f 3-member1.yaml +sleep 1 +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver apply -f 4-member2.yaml +sleep 1 +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver apply -f 5-test.yaml + +subctl --kubeconfig ~/.kube/karmada.config --context karmada-host deploy-broker + +subctl --kubeconfig ~/.kube/members.config --context member1 join broker-info.subm --natt=false --clusterid member1 --check-broker-certificate=false +subctl --kubeconfig ~/.kube/members.config --context member2 join broker-info.subm --natt=false --clusterid member2 --check-broker-certificate=false +subctl --kubeconfig ~/.kube/members.config --context member3 join broker-info.subm --natt=false --clusterid member3 --check-broker-certificate=false + +#subctl --kubeconfig ~/.kube/karmada.config --context karmada-host uninstall +#subctl --kubeconfig ~/.kube/members.config --context member1 uninstall +#subctl --kubeconfig ~/.kube/members.config --context member2 uninstall + +#iptables -D INPUT -s 172.18.0.4 -j DROP +#iptables -D FORWARD -s 172.18.0.4 -j DROP +#iptables -D OUTPUT -d 172.18.0.4 -j DROP +#iptables -D INPUT -s 172.18.0.4 -j ACCEPT +#iptables -D FORWARD -s 172.18.0.4 -j ACCEPT +#iptables -D OUTPUT -d 172.18.0.4 -j ACCEPT + +#karmadactl init \ +# --karmada-apiserver-replicas 1 \ +# --etcd-replicas 1 \ +# --etcd-image registry.cn-hangzhou.aliyuncs.com/acejilam/etcd:3.5.13-0 \ +# --etcd-init-image registry.cn-hangzhou.aliyuncs.com/acejilam/centos:7 \ +# --karmada-aggregated-apiserver-image registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-aggregated-apiserver \ +# --karmada-controller-manager-image registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-controller-manager \ +# --karmada-scheduler-image registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler \ +# --karmada-webhook-image registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-webhook \ +# --etcd-storage-mode hostPath \ +# --kubeconfig ~/.kube/kind \ +# -d ./tmp \ +# --karmada-pki=./tmp/pki \ +# -p 31443 + + +#karmadactl init \ +# --karmada-apiserver-replicas 1 \ +# --etcd-replicas 1 \ +# --etcd-image registry.cn-hangzhou.aliyuncs.com/acejilam/etcd:3.5.13-0 \ +# --etcd-init-image registry.cn-hangzhou.aliyuncs.com/acejilam/centos:7 \ +# --karmada-aggregated-apiserver-image registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-aggregated-apiserver \ +# --karmada-controller-manager-image registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-controller-manager \ +# --karmada-scheduler-image registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler \ +# --karmada-webhook-image registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-webhook \ +# --etcd-storage-mode hostPath \ +# --kubeconfig ~/.kube/51.4.config \ +# -d ./tmp \ +# --karmada-pki=./tmp/pki \ +# -p 31443 +# diff --git a/charts/karmada/README.md b/charts/karmada/README.md index af244852841f..ec8e3e89c668 100644 --- a/charts/karmada/README.md +++ b/charts/karmada/README.md @@ -251,7 +251,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada | `agent.podLabels` | Labels of the agent pods | `{}` | | `agent.podAnnotations` | Annotations of the agent pods | `{}` | | `agent.image.pullSecrets` | Image pull secret of the agent | `[]` | -| `agent.image.repository` | Image of the agent | `"docker.io/karmada/karmada-agent"` | +| `agent.image.repository` | Image of the agent | `"registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-agent"` | | `agent.image.tag` | Image tag of the agent | `"latest"` | | `agent.image.pullPolicy` | Image pull policy of the agent | `"Always"` | | `agent.resources` | Resource quota of the agent | `{}` | @@ -264,7 +264,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada | `scheduler.podLabels` | Labels of the scheduler pods | `{}` | | `scheduler.podAnnotations` | Annotations of the scheduler pods | `{}` | | `scheduler.image.pullSecrets` | Image pull secret of the scheduler | `[]` | -| `scheduler.image.repository` | Image of the scheduler | `"docker.io/karmada/karmada-scheduler"` | +| `scheduler.image.repository` | Image of the scheduler | `"registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler"` | | `scheduler.image.tag` | Image tag of the scheduler | `"latest"` | | `scheduler.image.pullPolicy` | Image pull policy of the scheduler | `"Always"` | | `scheduler.resources` | Resource quota of the scheduler | `{}` | @@ -277,7 +277,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada | `webhook.podLabels` | Labels of the webhook pods | `{}` | | `webhook.podAnnotations` | Annotations of the webhook pods | `{}` | | `webhook.image.pullSecrets` | Image pull secret of the webhook | `[]` | -| `webhook.image.repository` | Image of the webhook | `"docker.io/karmada/karmada-webhook"` | +| `webhook.image.repository` | Image of the webhook | `"registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-webhook"` | | `webhook.image.tag` | Image tag of the webhook | `"latest"` | | `webhook.image.pullPolicy` | Image pull policy of the webhook | `"Always"` | | `webhook.resources` | Resource quota of the webhook | `{}` | @@ -290,7 +290,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada | `controllerManager.podLabels` | Labels of the karmada-controller-manager pods | `{}` | | `controllerManager.podAnnotations` | Annotations of the karmada-controller-manager pods | `{}` | | `controllerManager.image.pullSecrets` | Image pull secret of the karmada-controller-manager | `[]` | -| `controllerManager.image.repository` | Image of the karmada-controller-manager | `"docker.io/karmada/karmada-controller-manager"` | +| `controllerManager.image.repository` | Image of the karmada-controller-manager | `"registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-controller-manager"` | | `controllerManager.image.tag` | Image tag of the karmada-controller-manager | `"latest"` | | `controllerManager.image.pullPolicy` | Image pull policy of the karmada-controller-manager | `"Always"` | | `controllerManager.resources` | Resource quota of the karmada-controller-manager | `{}` | @@ -323,7 +323,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada | `aggregatedApiServer.podLabels` | Labels of the karmada-aggregated-apiserver pods | `{}` | | `aggregatedApiServer.podAnnotations` | Annotations of the karmada-aggregated-apiserver pods | `{}` | | `aggregatedApiServer.image.pullSecrets` | Image pull secret of the karmada-aggregated-apiserver | `[]` | -| `aggregatedApiServer.image.repository` | Image of the karmada-aggregated-apiserver | `"docker.io/karmada/karmada-aggregated-apiserver"` | +| `aggregatedApiServer.image.repository` | Image of the karmada-aggregated-apiserver | `"registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-aggregated-apiserver"` | | `aggregatedApiServer.image.tag` | Image tag of the karmada-aggregated-apiserver | `"latest"` | | `aggregatedApiServer.image.pullPolicy` | Image pull policy of the karmada-aggregated-apiserver | `"Always"` | | `aggregatedApiServer.resources` | Resource quota of the karmada-aggregated-apiserver | `{requests: {cpu: 100m}}` | @@ -354,7 +354,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada | `schedulerEstimator.podLabels` | Labels of the scheduler-estimator pods | `{}` | | `schedulerEstimator.podAnnotations` | Annotations of the scheduler-estimator pods | `{}` | | `schedulerEstimator.image.pullSecrets` | Image pull secret of the scheduler-estimator | `[]` | -| `schedulerEstimator.image.repository` | Image of the scheduler-estimator | `"docker.io/karmada/karmada-scheduler-estimator"` | +| `schedulerEstimator.image.repository` | Image of the scheduler-estimator | `"registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler-estimator"` | | `schedulerEstimator.image.tag` | Image tag of the scheduler-estimator | `"latest"` | | `schedulerEstimator.image.pullPolicy` | Image pull policy of the scheduler-estimator | `"Always"` | | `schedulerEstimator.resources` | Resource quota of the scheduler-estimator | `{}` | @@ -368,7 +368,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada | `descheduler.podAnnotations` | Annotations of the descheduler pods | `{}` | | `descheduler.podLabels` | Labels of the descheduler pods | `{}` | | `descheduler.image.pullSecrets` | Image pull secret of the descheduler | `[]` | -| `descheduler.image.repository` | Image of the descheduler | `docker.io/karmada/karmada-descheduler` | +| `descheduler.image.repository` | Image of the descheduler | `registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-descheduler` | | `descheduler.image.pullPolicy` | Image pull policy of the descheduler | `Always` | | `descheduler.image.tag` | Overrides the image tag whose default is the latest | `latest` | | `descheduler.resources` | Resource quota of the descheduler | `{}` | @@ -382,7 +382,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada | `search.podAnnotations` | Annotations of the search pods | `{}` | | `search.podLabels` | Labels of the search pods | `{}` | | `search.image.pullSecrets` | Image pull secret of the search | `[]` | -| `search.image.repository` | Image of the search | `docker.io/karmada/karmada-search` | +| `search.image.repository` | Image of the search | `registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-search` | | `search.image.pullPolicy` | Image pull policy of the search | `Always` | | `search.image.tag` | Overrides the image tag whose default is the latest | `latest` | | `search.resources` | Resource quota of the search | `{}` | diff --git a/dump.sh b/dump.sh new file mode 100755 index 000000000000..fe82353e7405 --- /dev/null +++ b/dump.sh @@ -0,0 +1,18 @@ +echo 'host' +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-host cluster-info dump|grep '\-\-cluster-cidr\=' +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-host cluster-info dump|grep '\-\-service-cluster-ip-range\=' +echo 'apiserver' +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver cluster-info dump|grep '\-\-cluster-cidr\=' +kubectl --kubeconfig ~/.kube/karmada.config --context karmada-apiserver cluster-info dump|grep '\-\-service-cluster-ip-range\=' +echo 'member1' +kubectl --kubeconfig ~/.kube/members.config --context member1 cluster-info dump|grep '\-\-cluster-cidr\=' +kubectl --kubeconfig ~/.kube/members.config --context member1 cluster-info dump|grep '\-\-service-cluster-ip-range\=' +echo 'member2' +kubectl --kubeconfig ~/.kube/members.config --context member2 cluster-info dump|grep '\-\-cluster-cidr\=' +kubectl --kubeconfig ~/.kube/members.config --context member2 cluster-info dump|grep '\-\-service-cluster-ip-range\=' +echo 'member3' +kubectl --kubeconfig ~/.kube/members.config --context member3 cluster-info dump|grep '\-\-cluster-cidr\=' +kubectl --kubeconfig ~/.kube/members.config --context member3 cluster-info dump|grep '\-\-service-cluster-ip-range\=' + + + diff --git a/examples/customresourceinterpreter/karmada-interpreter-webhook-example.yaml b/examples/customresourceinterpreter/karmada-interpreter-webhook-example.yaml index 317065268ae0..844e6967348d 100644 --- a/examples/customresourceinterpreter/karmada-interpreter-webhook-example.yaml +++ b/examples/customresourceinterpreter/karmada-interpreter-webhook-example.yaml @@ -21,7 +21,7 @@ spec: operator: Exists containers: - name: karmada-interpreter-webhook-example - image: docker.io/karmada/karmada-interpreter-webhook-example:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-interpreter-webhook-example:latest imagePullPolicy: IfNotPresent command: - /bin/karmada-interpreter-webhook-example diff --git a/examples/karmadactlinterpret/observed-deploy-nginx.yaml b/examples/karmadactlinterpret/observed-deploy-nginx.yaml index d81b878bea99..3e987aa0c11b 100644 --- a/examples/karmadactlinterpret/observed-deploy-nginx.yaml +++ b/examples/karmadactlinterpret/observed-deploy-nginx.yaml @@ -27,5 +27,5 @@ status: availableReplicas: 2 observedGeneration: 1 readyReplicas: 2 - replicas: 2 + replicas: 1 updatedReplicas: 2 diff --git a/hack/cli-testing-environment.sh b/hack/cli-testing-environment.sh index 698a1df7f496..f59d5961e1e8 100755 --- a/hack/cli-testing-environment.sh +++ b/hack/cli-testing-environment.sh @@ -65,7 +65,7 @@ cd - # make images export VERSION="latest" -export REGISTRY="docker.io/karmada" +export REGISTRY="registry.cn-hangzhou.aliyuncs.com/acejilam" make images GOOS="linux" --directory="${REPO_ROOT}" # make karmadactl binary diff --git a/hack/deploy-k8s-metrics-server.sh b/hack/deploy-k8s-metrics-server.sh index d305c0c3fb22..71dd3d3343d6 100755 --- a/hack/deploy-k8s-metrics-server.sh +++ b/hack/deploy-k8s-metrics-server.sh @@ -53,7 +53,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" +#wget https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.6.3/components.yaml -O "${_tmp}/components.yaml" +cp -rf ./hack/metrics-server.yaml ${_tmp}/components.yaml sed -i'' -e 's/args:/args:\n - --kubelet-insecure-tls=true/' "${_tmp}/components.yaml" # deploy metrics-server in member cluster diff --git a/hack/docker.sh b/hack/docker.sh index 8c529af4e533..0f35424be8cd 100755 --- a/hack/docker.sh +++ b/hack/docker.sh @@ -45,7 +45,7 @@ set -o pipefail REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. source "${REPO_ROOT}/hack/util.sh" -REGISTRY=${REGISTRY:-"docker.io/karmada"} +REGISTRY=${REGISTRY:-"registry.cn-hangzhou.aliyuncs.com/acejilam"} VERSION=${VERSION:="unknown"} DOCKER_BUILD_ARGS=${DOCKER_BUILD_ARGS:-} SIGN_IMAGE=${SIGN_IMAGE:-"0"} diff --git a/hack/local-down-karmada.sh b/hack/local-down-karmada.sh index 0d3e305f6dfd..1ea594577ddc 100755 --- a/hack/local-down-karmada.sh +++ b/hack/local-down-karmada.sh @@ -66,7 +66,7 @@ echo "Remove kubeconfig successfully." #step3. remove docker images echo -e "\nStart removing images" version="latest" -registry="docker.io/karmada" +registry="registry.cn-hangzhou.aliyuncs.com/acejilam" images=( "${registry}/karmada-controller-manager:${version}" "${registry}/karmada-scheduler:${version}" diff --git a/hack/local-up-karmada.sh b/hack/local-up-karmada.sh index cef9672cbad0..cbb52df4e27a 100755 --- a/hack/local-up-karmada.sh +++ b/hack/local-up-karmada.sh @@ -133,7 +133,7 @@ util::create_cluster "${PULL_MODE_CLUSTER_NAME}" "${PULL_MODE_CLUSTER_TMP_CONFIG #step2. make images and get karmadactl export VERSION="latest" -export REGISTRY="docker.io/karmada" +export REGISTRY="registry.cn-hangzhou.aliyuncs.com/acejilam" if [[ "${BUILD_FROM_SOURCE}" == "true" ]]; then export KARMADA_IMAGE_LABEL_VALUE="May_be_pruned_in_local-up-karmada.sh" export DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS:-} --label=image.karmada.io=${KARMADA_IMAGE_LABEL_VALUE}" diff --git a/hack/metrics-server.yaml b/hack/metrics-server.yaml new file mode 100644 index 000000000000..e4279a1b1d2a --- /dev/null +++ b/hack/metrics-server.yaml @@ -0,0 +1,196 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + k8s-app: metrics-server + name: metrics-server + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + k8s-app: metrics-server + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" + rbac.authorization.k8s.io/aggregate-to-view: "true" + name: system:aggregated-metrics-reader +rules: +- apiGroups: + - metrics.k8s.io + resources: + - pods + - nodes + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + k8s-app: metrics-server + name: system:metrics-server +rules: +- apiGroups: + - "" + resources: + - nodes/metrics + verbs: + - get +- apiGroups: + - "" + resources: + - pods + - nodes + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + k8s-app: metrics-server + name: metrics-server-auth-reader + namespace: kube-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: extension-apiserver-authentication-reader +subjects: +- kind: ServiceAccount + name: metrics-server + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + k8s-app: metrics-server + name: metrics-server:system:auth-delegator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:auth-delegator +subjects: +- kind: ServiceAccount + name: metrics-server + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + k8s-app: metrics-server + name: system:metrics-server +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:metrics-server +subjects: +- kind: ServiceAccount + name: metrics-server + namespace: kube-system +--- +apiVersion: v1 +kind: Service +metadata: + labels: + k8s-app: metrics-server + name: metrics-server + namespace: kube-system +spec: + ports: + - name: https + port: 443 + protocol: TCP + targetPort: https + selector: + k8s-app: metrics-server +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + k8s-app: metrics-server + name: metrics-server + namespace: kube-system +spec: + selector: + matchLabels: + k8s-app: metrics-server + strategy: + rollingUpdate: + maxUnavailable: 0 + template: + metadata: + labels: + k8s-app: metrics-server + spec: + containers: + - args: + - --cert-dir=/tmp + - --secure-port=4443 + - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname + - --kubelet-use-node-status-port + - --metric-resolution=15s + image: registry.cn-hangzhou.aliyuncs.com/acejilam/metrics-server:v0.6.3 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: /livez + port: https + scheme: HTTPS + periodSeconds: 10 + name: metrics-server + ports: + - containerPort: 4443 + name: https + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /readyz + port: https + scheme: HTTPS + initialDelaySeconds: 20 + periodSeconds: 10 + resources: + requests: + cpu: 100m + memory: 200Mi + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + volumeMounts: + - mountPath: /tmp + name: tmp-dir + nodeSelector: + kubernetes.io/os: linux + priorityClassName: system-cluster-critical + serviceAccountName: metrics-server + volumes: + - emptyDir: {} + name: tmp-dir +--- +apiVersion: apiregistration.k8s.io/v1 +kind: APIService +metadata: + labels: + k8s-app: metrics-server + name: v1beta1.metrics.k8s.io +spec: + group: metrics.k8s.io + groupPriorityMinimum: 100 + insecureSkipTLSVerify: true + service: + name: metrics-server + namespace: kube-system + version: v1beta1 + versionPriority: 100 diff --git a/hack/pre-run-e2e.sh b/hack/pre-run-e2e.sh index 3010339353f6..ac16e7581c31 100755 --- a/hack/pre-run-e2e.sh +++ b/hack/pre-run-e2e.sh @@ -31,7 +31,7 @@ MEMBER_CLUSTER_2_NAME=${MEMBER_CLUSTER_2_NAME:-"member2"} PULL_MODE_CLUSTER_NAME=${PULL_MODE_CLUSTER_NAME:-"member3"} export VERSION="latest" -export REGISTRY="docker.io/karmada" +export REGISTRY="registry.cn-hangzhou.aliyuncs.com/acejilam" CERT_DIR=${CERT_DIR:-"${HOME}/.karmada"} ROOT_CA_FILE=${CERT_DIR}/ca.crt diff --git a/hack/scan-image-vuln.sh b/hack/scan-image-vuln.sh index a8f23174a029..488c68816991 100755 --- a/hack/scan-image-vuln.sh +++ b/hack/scan-image-vuln.sh @@ -27,14 +27,14 @@ function usage() { echo " hack/scan-image-vuln.sh [-i imageRef] [-r registry] [-v version] [-s skip-image-generation] [-f format][-h]" echo "Examples:" echo " # starts a images scanning with specific image provided" - echo " hack/scan-image-vuln.sh -i docker.io/karmada/karmada-controller-manager:v1.8.0" - echo " # scan Karmada component images with trivy and images will be automatically generated, imageRef='docker.io/karmada/{imageName}:latest'" + echo " hack/scan-image-vuln.sh -i registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-controller-manager:v1.8.0" + echo " # scan Karmada component images with trivy and images will be automatically generated, imageRef='registry.cn-hangzhou.aliyuncs.com/acejilam/{imageName}:latest'" echo " hack/scan-image-vuln.sh" - echo " # scan Karmada component images with trivy and images generation will be skipped, imageRef='docker.io/karmada/{imageName}:latest'" + echo " # scan Karmada component images with trivy and images generation will be skipped, imageRef='registry.cn-hangzhou.aliyuncs.com/acejilam/{imageName}:latest'" echo " hack/scan-image-vuln.sh -s" echo " # scan Karmada component images with trivy and provide specific image's registry or version" echo " hack/scan-image-vuln.sh -r foo # imageRef='foo/{imageName}:latest'" - echo " hack/scan-image-vuln.sh -s -v v1.8.0 # imageRef='docker.io/karmada/{imageName}:v1.8.0'" + echo " hack/scan-image-vuln.sh -s -v v1.8.0 # imageRef='registry.cn-hangzhou.aliyuncs.com/acejilam/{imageName}:v1.8.0'" echo "Args:" echo " i imageRef: starts a images scanning with specific image provided, if not provided, local Karmada images will be scanned" echo " r registry: registry of images" @@ -90,7 +90,7 @@ fi REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. cd "${REPO_ROOT}" export VERSION=${VERSION:-"latest"} -export REGISTRY=${REGISTRY:-"docker.io/karmada"} +export REGISTRY=${REGISTRY:-"registry.cn-hangzhou.aliyuncs.com/acejilam"} IMAGE_ARRAR=( karmada-controller-manager karmada-scheduler diff --git a/hack/util.sh b/hack/util.sh index 303a212f25fe..30c6677b7210 100755 --- a/hack/util.sh +++ b/hack/util.sh @@ -650,18 +650,18 @@ function util::get_load_balancer_ip() { # - $2: the kubeconfig path of the cluster wanted to be connected # - $3: the context in kubeconfig of the cluster wanted to be connected function util::add_routes() { - unset IFS - routes=$(kubectl --kubeconfig ${2} --context ${3} get nodes -o jsonpath='{range .items[*]}ip route add {.spec.podCIDR} via {.status.addresses[?(.type=="InternalIP")].address}{"\n"}{end}') - echo "Connecting cluster ${1} to ${2}" - - IFS=$'\n' - for n in $(kind get nodes --name "${1}"); do - for r in $routes; do - echo "exec cmd in docker $n $r" - eval "docker exec $n $r" - done - done - unset IFS +# unset IFS +# routes=$(kubectl --kubeconfig ${2} --context ${3} get nodes -o jsonpath='{range .items[*]}ip route add {.spec.podCIDR} via {.status.addresses[?(.type=="InternalIP")].address}{"\n"}{end}') +# echo "Connecting cluster ${1} to ${2}" +# +# IFS=$'\n' +# for n in $(kind get nodes --name "${1}"); do +# for r in $routes; do +# echo "exec cmd in docker $n $r" +# eval "docker exec $n $r" +# done +# done +# unset IFS } # util::get_macos_ipaddress will get ip address on macos interactively, store to 'MAC_NIC_IPADDRESS' if available diff --git a/operator/config/deploy/karmada-operator.yaml b/operator/config/deploy/karmada-operator.yaml index 2f4a5c8f09f8..a69eef7c6aef 100644 --- a/operator/config/deploy/karmada-operator.yaml +++ b/operator/config/deploy/karmada-operator.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: karmada-operator - image: docker.io/karmada/karmada-operator:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-operator:latest imagePullPolicy: IfNotPresent command: - /bin/karmada-operator diff --git a/operator/config/samples/karmada.yaml b/operator/config/samples/karmada.yaml index 92a84d90f5c4..4b12ac3a2258 100644 --- a/operator/config/samples/karmada.yaml +++ b/operator/config/samples/karmada.yaml @@ -30,19 +30,19 @@ spec: serviceType: NodePort serviceSubnet: 10.96.0.0/12 karmadaAggregatedAPIServer: - imageRepository: docker.io/karmada/karmada-aggregated-apiserver + imageRepository: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-aggregated-apiserver imageTag: v1.8.0 replicas: 1 karmadaControllerManager: - imageRepository: docker.io/karmada/karmada-controller-manager + imageRepository: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-controller-manager imageTag: v1.8.0 replicas: 1 karmadaScheduler: - imageRepository: docker.io/karmada/karmada-scheduler + imageRepository: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler imageTag: v1.8.0 replicas: 1 karmadaWebhook: - imageRepository: docker.io/karmada/karmada-webhook + imageRepository: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-webhook imageTag: v1.8.0 replicas: 1 kubeControllerManager: @@ -50,15 +50,15 @@ spec: imageTag: v1.30.4 replicas: 1 karmadaMetricsAdapter: - imageRepository: docker.io/karmada/karmada-metrics-adapter + imageRepository: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-metrics-adapter imageTag: v1.8.0 - replicas: 2 + replicas: 1 # karmadaSearch: # the component `Karmadasearch` is not installed by default, if you need to install it, uncomment it and note the formatting - # imageRepository: docker.io/karmada/karmada-search + # imageRepository: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-search # imageTag: v1.8.0 # replicas: 1 # karmadaDescheduler: # the component `KarmadaDescheduler` is not installed by default, if you need to install it, uncomment it and note the formatting - # imageRepository: docker.io/karmada/karmada-descheduler + # imageRepository: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-descheduler # imageTag: v1.8.0 # replicas: 1 hostCluster: diff --git a/operator/pkg/constants/constants.go b/operator/pkg/constants/constants.go index ff7382ef52b8..4fd7a74c0f1e 100644 --- a/operator/pkg/constants/constants.go +++ b/operator/pkg/constants/constants.go @@ -27,7 +27,7 @@ const ( // KubeDefaultRepository defines the default of the k8s image repository KubeDefaultRepository = "registry.k8s.io" // KarmadaDefaultRepository defines the default of the karmada image repository - KarmadaDefaultRepository = "docker.io/karmada" + KarmadaDefaultRepository = "registry.cn-hangzhou.aliyuncs.com/acejilam" // EtcdDefaultVersion defines the default of the karmada etcd image tag EtcdDefaultVersion = "3.5.13-0" // KubeDefaultVersion defines the default of the karmada apiserver and kubeControllerManager image tag diff --git a/operator/pkg/controlplane/controlplane_test.go b/operator/pkg/controlplane/controlplane_test.go index 795e1efc5a91..20d5468cdce2 100644 --- a/operator/pkg/controlplane/controlplane_test.go +++ b/operator/pkg/controlplane/controlplane_test.go @@ -54,7 +54,7 @@ func TestEnsureAllControlPlaneComponents(t *testing.T) { KarmadaControllerManager: &operatorv1alpha1.KarmadaControllerManager{ CommonSettings: operatorv1alpha1.CommonSettings{ Image: operatorv1alpha1.Image{ - ImageRepository: "docker.io/karmada/karmada-controller-manager", + ImageRepository: "registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-controller-manager", ImageTag: "latest", }, Replicas: ptr.To[int32](replicas), @@ -67,7 +67,7 @@ func TestEnsureAllControlPlaneComponents(t *testing.T) { KarmadaScheduler: &operatorv1alpha1.KarmadaScheduler{ CommonSettings: operatorv1alpha1.CommonSettings{ Image: operatorv1alpha1.Image{ - ImageRepository: "docker.io/karmada/karmada-scheduler", + ImageRepository: "registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler", ImageTag: "latest", }, Replicas: ptr.To[int32](replicas), @@ -81,7 +81,7 @@ func TestEnsureAllControlPlaneComponents(t *testing.T) { KarmadaDescheduler: &operatorv1alpha1.KarmadaDescheduler{ CommonSettings: operatorv1alpha1.CommonSettings{ Image: operatorv1alpha1.Image{ - ImageRepository: "docker.io/karmada/karmada-descheduler", + ImageRepository: "registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-descheduler", ImageTag: "latest", }, Replicas: ptr.To[int32](replicas), @@ -177,7 +177,7 @@ func TestGetKubeControllerManagerManifest(t *testing.T) { func TestGetKarmadaControllerManagerManifest(t *testing.T) { var replicas int32 = 2 name, namespace := "karmada-demo", "test" - image, imageTag := "docker.io/karmada/karmada-controller-manager", "latest" + image, imageTag := "registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-controller-manager", "latest" imagePullPolicy := corev1.PullIfNotPresent annotations := map[string]string{"annotationKey": "annotationValue"} labels := map[string]string{"labelKey": "labelValue"} @@ -232,7 +232,7 @@ func TestGetKarmadaControllerManagerManifest(t *testing.T) { func TestGetKarmadaSchedulerManifest(t *testing.T) { var replicas int32 = 2 name, namespace := "karmada-demo", "test" - image, imageTag := "docker.io/karmada/karmada-scheduler", "latest" + image, imageTag := "registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler", "latest" imagePullPolicy := corev1.PullIfNotPresent annotations := map[string]string{"annotationKey": "annotationValue"} labels := map[string]string{"labelKey": "labelValue"} @@ -291,7 +291,7 @@ func TestGetKarmadaSchedulerManifest(t *testing.T) { func TestGetKarmadaDeschedulerManifest(t *testing.T) { var replicas int32 = 2 name, namespace := "karmada-demo", "test" - image, imageTag := "docker.io/karmada/karmada-descheduler", "latest" + image, imageTag := "registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-descheduler", "latest" imagePullPolicy := corev1.PullIfNotPresent annotations := map[string]string{"annotationKey": "annotationValue"} labels := map[string]string{"labelKey": "labelValue"} diff --git a/operator/pkg/controlplane/webhook/webhook_test.go b/operator/pkg/controlplane/webhook/webhook_test.go index 8d009e3780ef..967aac2ec27d 100644 --- a/operator/pkg/controlplane/webhook/webhook_test.go +++ b/operator/pkg/controlplane/webhook/webhook_test.go @@ -29,7 +29,7 @@ import ( func TestEnsureKarmadaWebhook(t *testing.T) { var replicas int32 = 2 - image, imageTag := "docker.io/karmada/karmada-webhook", "latest" + image, imageTag := "registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-webhook", "latest" name := "karmada-demo" namespace := "test" imagePullPolicy := corev1.PullIfNotPresent @@ -68,7 +68,7 @@ func TestEnsureKarmadaWebhook(t *testing.T) { func TestInstallKarmadaWebhook(t *testing.T) { var replicas int32 = 2 - image, imageTag := "docker.io/karmada/karmada-webhook", "latest" + image, imageTag := "registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-webhook", "latest" name := "karmada-demo" namespace := "test" imagePullPolicy := corev1.PullIfNotPresent diff --git a/pkg/karmadactl/addons/enable.go b/pkg/karmadactl/addons/enable.go index 9f51de1c2ff0..9c227e410836 100644 --- a/pkg/karmadactl/addons/enable.go +++ b/pkg/karmadactl/addons/enable.go @@ -48,7 +48,7 @@ var ( %[1]s enable karmada-search --karmada-kubeconfig /etc/karmada/karmada-apiserver.config # Specify the karmada-search image - %[1]s enable karmada-search --karmada-search-image docker.io/karmada/karmada-search:latest + %[1]s enable karmada-search --karmada-search-image registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-search:latest # Specify the namespace where Karmada components are installed %[1]s enable karmada-search --namespace karmada-system diff --git a/pkg/karmadactl/addons/init/enable_option.go b/pkg/karmadactl/addons/init/enable_option.go index 9453af086a79..eadcd98d75fb 100644 --- a/pkg/karmadactl/addons/init/enable_option.go +++ b/pkg/karmadactl/addons/init/enable_option.go @@ -87,10 +87,10 @@ func init() { } karmadaRelease = releaseVer.ReleaseVersion() - DefaultKarmadaDeschedulerImage = fmt.Sprintf("docker.io/karmada/karmada-descheduler:%s", releaseVer.ReleaseVersion()) - DefaultKarmadaSchedulerEstimatorImage = fmt.Sprintf("docker.io/karmada/karmada-scheduler-estimator:%s", releaseVer.ReleaseVersion()) - DefaultKarmadaSearchImage = fmt.Sprintf("docker.io/karmada/karmada-search:%s", releaseVer.ReleaseVersion()) - DefaultKarmadaMetricsAdapterImage = fmt.Sprintf("docker.io/karmada/karmada-metrics-adapter:%s", releaseVer.ReleaseVersion()) + DefaultKarmadaDeschedulerImage = fmt.Sprintf("registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-descheduler:%s", releaseVer.ReleaseVersion()) + DefaultKarmadaSchedulerEstimatorImage = fmt.Sprintf("registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler-estimator:%s", releaseVer.ReleaseVersion()) + DefaultKarmadaSearchImage = fmt.Sprintf("registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-search:%s", releaseVer.ReleaseVersion()) + DefaultKarmadaMetricsAdapterImage = fmt.Sprintf("registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-metrics-adapter:%s", releaseVer.ReleaseVersion()) } // KarmadaDeschedulerImage get karmada descheduler image diff --git a/pkg/karmadactl/cmdinit/kubernetes/deploy.go b/pkg/karmadactl/cmdinit/kubernetes/deploy.go index 46ad340b5760..58a08d4f96d6 100644 --- a/pkg/karmadactl/cmdinit/kubernetes/deploy.go +++ b/pkg/karmadactl/cmdinit/kubernetes/deploy.go @@ -115,10 +115,10 @@ func init() { DefaultCrdURL = fmt.Sprintf("https://github.com/karmada-io/karmada/releases/download/%s/crds.tar.gz", releaseVer.ReleaseVersion()) DefaultInitImage = "docker.io/alpine:3.19.1" - DefaultKarmadaSchedulerImage = fmt.Sprintf("docker.io/karmada/karmada-scheduler:%s", releaseVer.ReleaseVersion()) - DefaultKarmadaControllerManagerImage = fmt.Sprintf("docker.io/karmada/karmada-controller-manager:%s", releaseVer.ReleaseVersion()) - DefaultKarmadaWebhookImage = fmt.Sprintf("docker.io/karmada/karmada-webhook:%s", releaseVer.ReleaseVersion()) - DefaultKarmadaAggregatedAPIServerImage = fmt.Sprintf("docker.io/karmada/karmada-aggregated-apiserver:%s", releaseVer.ReleaseVersion()) + DefaultKarmadaSchedulerImage = fmt.Sprintf("registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler:%s", releaseVer.ReleaseVersion()) + DefaultKarmadaControllerManagerImage = fmt.Sprintf("registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-controller-manager:%s", releaseVer.ReleaseVersion()) + DefaultKarmadaWebhookImage = fmt.Sprintf("registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-webhook:%s", releaseVer.ReleaseVersion()) + DefaultKarmadaAggregatedAPIServerImage = fmt.Sprintf("registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-aggregated-apiserver:%s", releaseVer.ReleaseVersion()) } // CommandInitOption holds all flags options for init. diff --git a/pkg/karmadactl/cmdinit/utils/examples.go b/pkg/karmadactl/cmdinit/utils/examples.go index 486b92500b92..99e153f0f67b 100644 --- a/pkg/karmadactl/cmdinit/utils/examples.go +++ b/pkg/karmadactl/cmdinit/utils/examples.go @@ -85,7 +85,7 @@ spec: operator: Exists containers: - name: karmada-agent - image: docker.io/karmada/karmada-agent:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-agent:latest command: - /bin/karmada-agent - --karmada-kubeconfig=/etc/kubeconfig/karmada-kubeconfig @@ -134,7 +134,7 @@ spec: operator: Exists containers: - name: karmada-scheduler-estimator - image: docker.io/karmada/karmada-scheduler-estimator:latest + image: registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-scheduler-estimator:latest imagePullPolicy: IfNotPresent command: - /bin/karmada-scheduler-estimator diff --git a/pkg/karmadactl/register/register.go b/pkg/karmadactl/register/register.go index 852c2150d1b8..84629c7657b1 100644 --- a/pkg/karmadactl/register/register.go +++ b/pkg/karmadactl/register/register.go @@ -192,7 +192,7 @@ func NewCmdRegister(parentCommand string) *cobra.Command { flags.StringSliceVar(&opts.BootstrapToken.CACertHashes, "discovery-token-ca-cert-hash", []string{}, "For token-based discovery, validate that the root CA public key matches this hash (format: \":\").") flags.BoolVar(&opts.BootstrapToken.UnsafeSkipCAVerification, "discovery-token-unsafe-skip-ca-verification", false, "For token-based discovery, allow joining without --discovery-token-ca-cert-hash pinning.") flags.DurationVar(&opts.Timeout, "discovery-timeout", DefaultDiscoveryTimeout, "The timeout to discovery karmada apiserver client.") - flags.StringVar(&opts.KarmadaAgentImage, "karmada-agent-image", fmt.Sprintf("docker.io/karmada/karmada-agent:%s", releaseVer.ReleaseVersion()), "Karmada agent image.") + flags.StringVar(&opts.KarmadaAgentImage, "karmada-agent-image", fmt.Sprintf("registry.cn-hangzhou.aliyuncs.com/acejilam/karmada-agent:%s", releaseVer.ReleaseVersion()), "Karmada agent image.") flags.Int32Var(&opts.KarmadaAgentReplicas, "karmada-agent-replicas", 1, "Karmada agent replicas.") flags.Int32Var(&opts.CertExpirationSeconds, "cert-expiration-seconds", DefaultCertExpirationSeconds, "The expiration time of certificate.") flags.BoolVar(&opts.DryRun, "dry-run", false, "Run the command in dry-run mode, without making any server requests.") diff --git a/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/CloneSet/testdata/observed-cloneset-nginx.yaml b/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/CloneSet/testdata/observed-cloneset-nginx.yaml index 4b8ffeda67d1..7c829483bcca 100644 --- a/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/CloneSet/testdata/observed-cloneset-nginx.yaml +++ b/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/CloneSet/testdata/observed-cloneset-nginx.yaml @@ -9,7 +9,7 @@ metadata: namespace: test-cloneset generation: 1 spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: sample @@ -46,7 +46,7 @@ status: labelSelector: app=sample,test=cloneset observedGeneration: 1 readyReplicas: 2 - replicas: 2 + replicas: 1 updateRevision: sample-59df6bd888 updatedReadyReplicas: 2 updatedReplicas: 2 diff --git a/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/CloneSet/testdata/status-file.yaml b/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/CloneSet/testdata/status-file.yaml index 526e901fc12a..3f4bdb77977c 100644 --- a/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/CloneSet/testdata/status-file.yaml +++ b/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/CloneSet/testdata/status-file.yaml @@ -8,7 +8,7 @@ status: labelSelector: app=sample,test=cloneset observedGeneration: 1 readyReplicas: 2 - replicas: 2 + replicas: 1 updateRevision: sample-59df6bd888 updatedReadyReplicas: 2 updatedReplicas: 2 @@ -25,7 +25,7 @@ status: labelSelector: app=sample,test=cloneset observedGeneration: 1 readyReplicas: 2 - replicas: 2 + replicas: 1 updateRevision: sample-59df6bd888 updatedReadyReplicas: 2 updatedReplicas: 2 diff --git a/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/desired-statefulset-nginx.yaml b/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/desired-statefulset-nginx.yaml index 47d506b45ac8..df1617855149 100644 --- a/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/desired-statefulset-nginx.yaml +++ b/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/desired-statefulset-nginx.yaml @@ -5,7 +5,7 @@ metadata: namespace: test-statefulset generation: 1 spec: - replicas: 2 + replicas: 1 serviceName: sample-statefulset-headless-service selector: matchLabels: diff --git a/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/observed-statefulset-nginx.yaml b/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/observed-statefulset-nginx.yaml index ccd464bf9ef1..feab4eb6675d 100644 --- a/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/observed-statefulset-nginx.yaml +++ b/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/observed-statefulset-nginx.yaml @@ -7,7 +7,7 @@ metadata: namespace: test-statefulset generation: 1 spec: - replicas: 2 + replicas: 1 serviceName: sample-statefulset-headless-service selector: matchLabels: @@ -54,7 +54,7 @@ status: labelSelector: app=sample observedGeneration: 1 readyReplicas: 2 - replicas: 2 + replicas: 1 updateRevision: sample-5675547df7 updatedReadyReplicas: 2 updatedReplicas: 2 diff --git a/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/status-file.yaml b/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/status-file.yaml index 76874392e502..a815aa44a71d 100644 --- a/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/status-file.yaml +++ b/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1beta1/StatefulSet/testdata/status-file.yaml @@ -9,7 +9,7 @@ status: resourceTemplateGeneration: 1 observedGeneration: 1 readyReplicas: 2 - replicas: 2 + replicas: 1 updateRevision: sample-5675547df7 updatedReadyReplicas: 2 updatedReplicas: 2 @@ -25,7 +25,7 @@ status: observedGeneration: 1 resourceTemplateGeneration: 1 readyReplicas: 2 - replicas: 2 + replicas: 1 updateRevision: sample-5675547df7 updatedReadyReplicas: 2 updatedReplicas: 2 diff --git a/samples/nginx/deployment.yaml b/samples/nginx/deployment.yaml index 0281de952e67..a07f7030170f 100644 --- a/samples/nginx/deployment.yaml +++ b/samples/nginx/deployment.yaml @@ -5,7 +5,7 @@ metadata: labels: app: nginx spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: nginx diff --git a/update.py b/update.py new file mode 100644 index 000000000000..e6a2ebb96da9 --- /dev/null +++ b/update.py @@ -0,0 +1,22 @@ +import os +images = [ + 'quay.io/submariner/nettest:0.18.1', + 'quay.io/submariner/submariner-operator:0.18.1', + 'quay.io/submariner/lighthouse-coredns:0.18.1', + 'quay.io/submariner/lighthouse-agent:0.18.1', + 'quay.io/submariner/submariner-gateway:0.18.1', + 'quay.io/submariner/submariner-route-agent:0.18.1', +] + +clusters = [ + "member1", + "member2", + "member3", +] +for image in images: + os.system(f"docker pull {image}") + for cluster in clusters: + os.system(f"kind load docker-image --name {cluster} {image}") + + +os.system("kind load docker-image --name karmada-host quay.io/submariner/submariner-operator:0.18.1") \ No newline at end of file