Various vagrant fixes, etcd 2.0
This commit is contained in:
@@ -56,9 +56,9 @@
|
||||
- user: root
|
||||
- group: root
|
||||
|
||||
/usr/lib/systemd/scripts/kube-addons:
|
||||
/etc/kubernetes/kube-addons.sh:
|
||||
file.managed:
|
||||
- source: salt://kube-addons/initd
|
||||
- source: salt://kube-addons/kube-addons.sh
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 755
|
||||
|
||||
@@ -3,7 +3,7 @@ Description=Kubernetes Addon Object Manager
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/lib/systemd/scripts/kube-addons start
|
||||
ExecStart=/etc/kubernetes/kube-addons.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
26
cluster/saltbase/salt/kube-addons/kube-addons.sh
Normal file
26
cluster/saltbase/salt/kube-addons/kube-addons.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# The business logic for whether a given object should be created
|
||||
# was already enforced by salt, and /etc/kubernetes/addons is the
|
||||
# managed result is of that. Start everything below that directory.
|
||||
echo "== Kubernetes addon manager started at $(date -Is) =="
|
||||
KUBECTL=/usr/local/bin/kubectl
|
||||
for obj in $(find /etc/kubernetes/addons -name \*.yaml); do
|
||||
${KUBECTL} --server="127.0.0.1:8080" create -f ${obj} &
|
||||
echo "++ addon ${obj} started in pid $! ++"
|
||||
done
|
||||
noerrors="true"
|
||||
for pid in $(jobs -p); do
|
||||
wait ${pid} || noerrors="false"
|
||||
echo "++ pid ${pid} complete ++"
|
||||
done
|
||||
if [ ${noerrors} == "true" ]; then
|
||||
echo "== Kubernetes addon manager completed successfully at $(date -Is) =="
|
||||
else
|
||||
echo "== Kubernetes addon manager completed with errors at $(date -Is) =="
|
||||
fi
|
||||
|
||||
# We stay around so that status checks by salt make it look like
|
||||
# the service is good. (We could do this is other ways, but this
|
||||
# is simple.)
|
||||
sleep infinity
|
||||
Reference in New Issue
Block a user