From 761b1b049f21644bb06639cf7089e12a78e390d3 Mon Sep 17 00:00:00 2001 From: Sreejith Punnapuzha Date: Sat, 15 May 2021 22:39:06 -0500 Subject: [PATCH] Remove labeling from scripts This commit removes assigning labels from deployment scripts. Labeling will be managed via KubeadmControlPlane templates. Signed-off-by: Sreejith Punnapuzha Change-Id: I17ebd6663663b6e456e9e968a9f1468295c6232c --- .../31_deploy_initinfra_target_node.sh | 14 ---------- tools/deployment/35_deploy_worker_node.sh | 26 ------------------- 2 files changed, 40 deletions(-) diff --git a/tools/deployment/31_deploy_initinfra_target_node.sh b/tools/deployment/31_deploy_initinfra_target_node.sh index dc66200ac..1e482a697 100755 --- a/tools/deployment/31_deploy_initinfra_target_node.sh +++ b/tools/deployment/31_deploy_initinfra_target_node.sh @@ -26,12 +26,6 @@ TARGET_NODE=${TARGET_NODE:-"$(airshipctl phase render controlplane-ephemeral \ cd ${AIRSHIPCTL_PROJECT} -kubectl \ - --kubeconfig $KUBECONFIG \ - --context $KUBECONFIG_TARGET_CONTEXT \ - --request-timeout 10s \ - label --overwrite nodes $TARGET_NODE node-type=controlplane - ./tools/deployment/31_deploy_initinfra_target_node.sh hosts=$(kubectl \ @@ -46,12 +40,4 @@ do --kubeconfig $KUBECONFIG \ --context $KUBECONFIG_TARGET_CONTEXT \ --request-timeout 10s annotate --overwrite ${hosts[i]} secret=hco-ssh-auth - kubectl \ - --kubeconfig $KUBECONFIG \ - --context $KUBECONFIG_TARGET_CONTEXT \ - --request-timeout 10s label --overwrite ${hosts[i]} node-type=controlplane - kubectl \ - --kubeconfig $KUBECONFIG \ - --context $KUBECONFIG_TARGET_CONTEXT \ - --request-timeout 10s label --overwrite ${hosts[i]} kubernetes.io/role=master done diff --git a/tools/deployment/35_deploy_worker_node.sh b/tools/deployment/35_deploy_worker_node.sh index 5e713cac3..fa3a56d6d 100755 --- a/tools/deployment/35_deploy_worker_node.sh +++ b/tools/deployment/35_deploy_worker_node.sh @@ -23,28 +23,6 @@ export WORKER_NODE=${WORKER_NODE:-"$(airshipctl phase render workers-target \ yq .metadata.name | \ sed 's/"//g')"} -# Annotate node for hostconfig-operator -hosts=$(kubectl \ - --kubeconfig $KUBECONFIG \ - --context $KUBECONFIG_TARGET_CONTEXT \ - --request-timeout 10s get nodes -o name) - -for i in "${!hosts[@]}" -do - kubectl \ - --kubeconfig $KUBECONFIG \ - --context $KUBECONFIG_TARGET_CONTEXT \ - --request-timeout 10s annotate --overwrite ${hosts[i]} secret=hco-ssh-auth - kubectl \ - --kubeconfig $KUBECONFIG \ - --context $KUBECONFIG_TARGET_CONTEXT \ - --request-timeout 10s label --overwrite ${hosts[i]} node-type=controlplane - kubectl \ - --kubeconfig $KUBECONFIG \ - --context $KUBECONFIG_TARGET_CONTEXT \ - --request-timeout 10s label --overwrite ${hosts[i]} kubernetes.io/role=master -done - cd ${AIRSHIPCTL_PROJECT} ./tools/deployment/35_deploy_worker_node.sh @@ -60,8 +38,4 @@ do --kubeconfig $KUBECONFIG \ --context $KUBECONFIG_TARGET_CONTEXT \ --request-timeout 10s annotate --overwrite ${hosts[i]} secret=hco-ssh-auth - kubectl \ - --kubeconfig $KUBECONFIG \ - --context $KUBECONFIG_TARGET_CONTEXT \ - --request-timeout 10s label --overwrite ${hosts[i]} kubernetes.io/role=master done