
This will allow more successful kube-up.sh executions. Since kube-apiserver doesn't start on the first try after etcd first starts up possibly due to the lack of resources on my server.
30 lines
568 B
Plaintext
30 lines
568 B
Plaintext
description "Flannel service"
|
|
author "@chenxingyu"
|
|
|
|
respawn
|
|
|
|
# start in conjunction with etcd
|
|
start on started etcd
|
|
stop on stopping etcd
|
|
|
|
pre-start script
|
|
FLANNEL=/opt/bin/$UPSTART_JOB
|
|
if [ -f /etc/default/$UPSTART_JOB ]; then
|
|
. /etc/default/$UPSTART_JOB
|
|
fi
|
|
if [ -f $FLANNEL ]; then
|
|
exit 0
|
|
fi
|
|
exit 22
|
|
end script
|
|
|
|
script
|
|
# modify these in /etc/default/$UPSTART_JOB (/etc/default/docker)
|
|
FLANNEL=/opt/bin/$UPSTART_JOB
|
|
FLANNEL_OPTS=""
|
|
if [ -f /etc/default/$UPSTART_JOB ]; then
|
|
. /etc/default/$UPSTART_JOB
|
|
fi
|
|
exec "$FLANNEL" $FLANNEL_OPTS
|
|
end script
|