Added overwrite flag in script 31 and 35
This is a needed workaround for host config generator from some recent changes. Only add the workaround to 2.0 branch for the GA release. The actual fix should go to v2 branch. Signed-off-by: James Gu <james.gu@att.com> Change-Id: Ied0d8712fd154e8e7c979a551417a6429c148456
This commit is contained in:
parent
ad5fabe0d6
commit
404b32ef87
|
@ -23,6 +23,28 @@ export WORKER_NODE=${WORKER_NODE:-"$(airshipctl phase render workers-target \
|
||||||
yq .metadata.name | \
|
yq .metadata.name | \
|
||||||
sed 's/"//g')"}
|
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 ${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}
|
cd ${AIRSHIPCTL_PROJECT}
|
||||||
./tools/deployment/35_deploy_worker_node.sh
|
./tools/deployment/35_deploy_worker_node.sh
|
||||||
|
|
||||||
|
@ -41,5 +63,5 @@ do
|
||||||
kubectl \
|
kubectl \
|
||||||
--kubeconfig $KUBECONFIG \
|
--kubeconfig $KUBECONFIG \
|
||||||
--context $KUBECONFIG_TARGET_CONTEXT \
|
--context $KUBECONFIG_TARGET_CONTEXT \
|
||||||
--request-timeout 10s label ${hosts[i]} kubernetes.io/role=master
|
--request-timeout 10s label --overwrite ${hosts[i]} kubernetes.io/role=master
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue