Set flannel options explicitly

Setting environment options in a systemd overlay is not getting
honoured; presumably because those options aren't passed through docker
to flanneld. To work around this, pass arguments explicitly, using an
environment file.
This commit is contained in:
Thom May 2014-12-11 16:12:01 +00:00 committed by Thom May
parent 256f852816
commit cd48dfa322

View File

@ -16,8 +16,13 @@ Environment="FLANNEL_VER={{flannel_ver}}"
LimitNOFILE=1048576 LimitNOFILE=1048576
LimitNPROC=1048576 LimitNPROC=1048576
ExecStartPre=/usr/bin/mkdir -p /run/flannel ExecStartPre=/usr/bin/mkdir -p /run/flannel
ExecStartPre=/usr/bin/touch /run/flannel/options.env
ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock /usr/bin/docker run --net=host --privileged=true --rm -v /run/flannel:/run/flannel -e NOTIFY_SOCKET=/run/flannel/sd.sock quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \
/usr/bin/docker run --net=host --privileged=true --rm \
-v /run/flannel:/run/flannel -e NOTIFY_SOCKET=/run/flannel/sd.sock \
--env-file=/run/flannel/options.env \
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true
# Update docker options # Update docker options
ExecStartPost=/bin/bash -c ' \ ExecStartPost=/bin/bash -c ' \