Merge "k8s_fedora: Label master nodes with kubectl" into stable/rocky

This commit is contained in:
Zuul 2019-11-28 15:58:15 +00:00 committed by Gerrit Code Review
commit 254a9c8c1e
2 changed files with 9 additions and 2 deletions

View File

@ -178,7 +178,6 @@ if [ "$NETWORK_DRIVER" = "calico" ]; then
KUBELET_ARGS="${KUBELET_ARGS} --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin" KUBELET_ARGS="${KUBELET_ARGS} --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
fi fi
KUBELET_ARGS="${KUBELET_ARGS} --register-with-taints=CriticalAddonsOnly=True:NoSchedule,dedicated=master:NoSchedule" KUBELET_ARGS="${KUBELET_ARGS} --register-with-taints=CriticalAddonsOnly=True:NoSchedule,dedicated=master:NoSchedule"
KUBELET_ARGS="${KUBELET_ARGS} --node-labels=node-role.kubernetes.io/master=\"\""
KUBELET_KUBECONFIG=/etc/kubernetes/kubelet-config.yaml KUBELET_KUBECONFIG=/etc/kubernetes/kubelet-config.yaml
cat << EOF >> ${KUBELET_KUBECONFIG} cat << EOF >> ${KUBELET_KUBECONFIG}

View File

@ -18,4 +18,12 @@ for service in etcd docker kube-apiserver kube-controller-manager kube-scheduler
echo "activating service $service" echo "activating service $service"
systemctl enable $service systemctl enable $service
systemctl --no-block start $service systemctl --no-block start $service
done done
until [ "ok" = "$(curl --silent http://127.0.0.1:8080/healthz)" ] && \
kubectl patch node ${INSTANCE_NAME} \
--patch '{"metadata": {"labels": {"node-role.kubernetes.io/master": ""}}}'
do
echo "Trying to label master node with node-role.kubernetes.io/master=\"\""
sleep 5s
done