kubernetes: Format scripts to be more readable.

These were originally generated by some box builder runes and then taken
wholesale here. Format them to be more readable.

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell 2017-07-17 11:43:39 +01:00
parent f18ed90d4f
commit 23d6649de0
2 changed files with 22 additions and 2 deletions

View File

@ -1,2 +1,4 @@
#!/bin/sh
kubeadm init --skip-preflight-checks --kubernetes-version v1.6.1 && kubectl create -n kube-system -f /etc/weave.yaml
set -e
kubeadm init --skip-preflight-checks --kubernetes-version v1.6.1
kubectl create -n kube-system -f /etc/weave.yaml

View File

@ -1,2 +1,20 @@
#!/bin/sh
mount --bind /opt/cni /rootfs/opt/cni && mount --bind /etc/cni /rootfs/etc/cni && until kubelet --kubeconfig=/var/lib/kubeadm/kubelet.conf --require-kubeconfig=true --pod-manifest-path=/var/lib/kubeadm/manifests --allow-privileged=true --cluster-dns=10.96.0.10 --cluster-domain=cluster.local --cgroups-per-qos=false --enforce-node-allocatable= --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin ; do [ ! -e /dev/sr0 ] && sleep 1 || (mount -o ro /dev/sr0 /mnt && kubeadm join --skip-preflight-checks $(cat /mnt/config)) ; done
mount --bind /opt/cni /rootfs/opt/cni
mount --bind /etc/cni /rootfs/etc/cni
until kubelet --kubeconfig=/var/lib/kubeadm/kubelet.conf \
--require-kubeconfig=true \
--pod-manifest-path=/var/lib/kubeadm/manifests \
--allow-privileged=true \
--cluster-dns=10.96.0.10 \
--cluster-domain=cluster.local \
--cgroups-per-qos=false \
--enforce-node-allocatable= \
--network-plugin=cni \
--cni-conf-dir=/etc/cni/net.d \
--cni-bin-dir=/opt/cni/bin ; do
if [ ! -e /dev/sr0 ] ; then
sleep 1
else
mount -o ro /dev/sr0 /mnt && kubeadm join --skip-preflight-checks $(cat /mnt/config)
fi
done