Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

external etcd support #68

Merged
merged 10 commits into from Mar 16, 2018
3 changes: 2 additions & 1 deletion lib/kupo/phases/configure_host.rb
Expand Up @@ -51,7 +51,8 @@ def call

logger.info { "Configuring Kubernetes packages ..." }
exec_script('configure-kube.sh', {
kube_version: KUBE_VERSION
kube_version: KUBE_VERSION,
kubeadm_version: ENV['KUBEADM_VERSION'] || KUBE_VERSION
})
rescue Kupo::Error => exc
logger.error { exc.message }
Expand Down
17 changes: 11 additions & 6 deletions lib/kupo/scripts/configure-kube.sh
Expand Up @@ -8,12 +8,17 @@ if [ "$(kubelet --version)" = "Kubernetes v<%= kube_version %>" ]; then
fi

apt-mark unhold kubelet kubeadm kubectl
apt-get install -y kubelet=<%= kube_version %>-00 kubeadm=<%= kube_version %>-00 kubectl=<%= kube_version %>-00
apt-get install -y kubelet=<%= kube_version %>-00 kubectl=<%= kube_version %>-00
apt-mark hold kubelet kubelet kubeadm kubectl

# Hack to get 1.10.beta.3 kubeadm in place
# Needed to be able to configure cri socket in the config file
# See: https://github.com/kubernetes/kubernetes/pull/59057
# FIXME Remove when we're using official 1.10 kubeadm
curl -o /usr/bin/kubeadm https://storage.googleapis.com/kubernetes-release/release/v1.10.0-beta.3/bin/linux/amd64/kubeadm
# Get kubeadm binary directly
arch=`uname -m`
case "$arch" in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant that arch should come as a variable from phase. We already collect host.cpu_arch information.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

x86_64) arch="amd64" ;;
aarch64) arch="arm64" ;;
*) echo "$arch not supported architecture, exiting..."
exit 11
;;
esac
curl -o /usr/bin/kubeadm https://storage.googleapis.com/kubernetes-release/release/<%= kubeadm_version %>/bin/linux/$arch/kubeadm
chmod +x /usr/bin/kubeadm