Skip to content

Commit

Permalink
Add missing kubeadm-flags.env on upgrade (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakolehm authored Aug 30, 2018
1 parent aac12e6 commit b43314d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/pharos/phases/migrate_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,18 @@ def migrate_1_3?
end

def migrate_1_3
logger.info { 'Upgrade kubelet config for 1.10' }
logger.info { 'Upgrade kubelet config' }

# use the new version of kubeadm to write out /var/lib/kubelet/config.yaml for new kubelet version to be installed
# the kube master must be running, which is the case for upgrades
host_configurer.upgrade_kubeadm(Pharos::KUBEADM_VERSION)

@ssh.exec!("sudo /usr/local/bin/pharos-kubeadm-#{Pharos::KUBEADM_VERSION} upgrade node config --kubelet-version=v#{Pharos::KUBE_VERSION}")

kubeadm_flags = @ssh.file("/var/lib/kubelet/kubeadm-flags.env")
return if kubeadm_flags.exist?

kubeadm_flags.write('KUBELET_KUBEADM_ARGS=--cni-bin-dir=/opt/cni/bin --cni-conf-dir=/etc/cni/net.d --network-plugin=cni')
end
end
end
Expand Down

0 comments on commit b43314d

Please sign in to comment.