Skip to content
This repository has been archived by the owner on Jul 14, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' into lowercase2
Browse files Browse the repository at this point in the history
  • Loading branch information
oneilcin committed Dec 7, 2018
2 parents 138d9eb + 172deee commit e609a48
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .versionfile
@@ -1 +1 @@
0.1.43
0.1.44
Expand Up @@ -328,7 +328,7 @@
{
yum --disablerepo='*' --enablerepo=kubernetes-new -y install kubeadm

kubeadm upgrade apply $CONTROL_PLANE_VERSION -y
kubeadm upgrade apply $CONTROL_PLANE_VERSION --feature-gates=CoreDNS=false -y

yum --disablerepo='*' --enablerepo=kubernetes-new -y install kubelet
yum --disablerepo='*' --enablerepo=kubernetes-new -y install kubectl
Expand All @@ -339,10 +339,35 @@

yum_upgrade_node()
{
local max_tries i

max_tries=60
i=0

yum --disablerepo='*' --enablerepo=kubernetes-new -y install kubeadm kubelet

kubeadm upgrade node config --kubelet-version $(kubelet --version | cut -d ' ' -f 2)

# sometimes the worker node intermittently fails to pull its config from
# the master. This next expression is a band-aid which tells the worker
# to attempt to pull the config again if it doesn't exist on the file system

while [[ ! -f /var/lib/kubelet/config.yaml ]]; do
if ! kubeadm alpha phase kubelet config download; then
echo >&2 "Unable to pull config on try $((i + 1))/$max_tries; trying again in 2 seconds..."
sleep 2
else
break
fi

if [[ $i -ge $max_tries ]]; then
echo >&2 "Maximal attempts reached at $max_tries attempts. Quitting with failure."
return 1
fi

((i++))
done

# TODO: kubernetes-new is hardcoded with 1.11.2
yum --disablerepo='*' --enablerepo=kubernetes-new -y install kubectl

Expand Down Expand Up @@ -425,11 +450,11 @@
fi
fi

all_dockers=($(rpm -qa 'docker*'))
yum remove -y kubeadm kubectl kubelet kubernetes-cni "${all_dockers[@]}"
yum remove -y kubeadm kubectl kubelet kubernetes-cni 'docker*' 'nginx*' conntrack

RM_RF_DIRS="/etc/cni \
/etc/docker \
/etc/nginx \
/etc/sysconfig/docker \
/etc/ethertypes \
/etc/kubernetes \
Expand All @@ -442,7 +467,6 @@
/var/lib/kubelet"

for d in ${RM_RF_DIRS}; do
rm -rf $d/**
rm -rf $d
done
}

0 comments on commit e609a48

Please sign in to comment.