Merge "Set proper role for worker node"
This commit is contained in:
commit
795a15cb5d
@ -9,7 +9,7 @@ spec:
|
||||
nodeRegistration:
|
||||
name: '{{ ds.meta_data.name }}'
|
||||
kubeletExtraArgs:
|
||||
node-labels: 'metal3.io/uuid={{ ds.meta_data.uuid }},node-type=worker'
|
||||
node-labels: 'metal3.io/uuid={{ ds.meta_data.uuid }}'
|
||||
provider-id: 'metal3://{{ ds.meta_data.uuid }}'
|
||||
feature-gates: "IPv6DualStack=true"
|
||||
files:
|
||||
|
@ -18,6 +18,7 @@ set -xe
|
||||
export TIMEOUT=${TIMEOUT:-3600}
|
||||
export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
|
||||
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
|
||||
WORKER_NODE="node03"
|
||||
|
||||
echo "Stop ephemeral node"
|
||||
sudo virsh destroy air-ephemeral
|
||||
@ -25,7 +26,11 @@ sudo virsh destroy air-ephemeral
|
||||
node_timeout () {
|
||||
end=$(($(date +%s) + $TIMEOUT))
|
||||
while true; do
|
||||
if (kubectl --request-timeout 20s --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get $1 node03 | grep -qw $2) ; then
|
||||
if (kubectl --request-timeout 20s --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get $1 $WORKER_NODE | grep -qw $2) ; then
|
||||
if [ "$1" = "node" ]; then
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT label nodes $WORKER_NODE node-role.kubernetes.io/worker=""
|
||||
fi
|
||||
|
||||
echo -e "\nGet $1 status"
|
||||
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get $1
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user