From 20bc3b11889d0294f71f9365b3061887f6be5d33 Mon Sep 17 00:00:00 2001 From: zhzhuang-zju Date: Thu, 31 Oct 2024 15:47:40 +0800 Subject: [PATCH] local up: use karmadactl register to register pull mode cluster Signed-off-by: zhzhuang-zju --- hack/local-up-karmada.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hack/local-up-karmada.sh b/hack/local-up-karmada.sh index 5b6521bd2709..430753580958 100755 --- a/hack/local-up-karmada.sh +++ b/hack/local-up-karmada.sh @@ -195,7 +195,9 @@ if [[ "${BUILD_FROM_SOURCE}" == "true" ]]; then fi #step7. deploy karmada agent in pull mode member clusters -"${REPO_ROOT}"/hack/deploy-agent-and-estimator.sh "${MAIN_KUBECONFIG}" "${HOST_CLUSTER_NAME}" "${MAIN_KUBECONFIG}" "${KARMADA_APISERVER_CLUSTER_NAME}" "${PULL_MODE_CLUSTER_TMP_CONFIG}" "${PULL_MODE_CLUSTER_NAME}" +KARMADA_REGISTER_COMMAND=$(${KARMADACTL_BIN} token create --print-register-command --kubeconfig ${MAIN_KUBECONFIG} --karmada-context ${KARMADA_APISERVER_CLUSTER_NAME}) +eval ${KARMADA_REGISTER_COMMAND} --kubeconfig "${PULL_MODE_CLUSTER_TMP_CONFIG}" --context "${PULL_MODE_CLUSTER_NAME}" --karmada-agent-image "${REGISTRY}/karmada-agent:${VERSION}" +"${REPO_ROOT}"/hack/deploy-scheduler-estimator.sh "${MAIN_KUBECONFIG}" "${HOST_CLUSTER_NAME}" "${PULL_MODE_CLUSTER_TMP_CONFIG}" "${PULL_MODE_CLUSTER_NAME}" #step8. deploy metrics-server in member clusters "${REPO_ROOT}"/hack/deploy-k8s-metrics-server.sh "${MEMBER_CLUSTER_1_TMP_CONFIG}" "${MEMBER_CLUSTER_1_NAME}"