Do not use {} in systemd environment variables

From the systemd man page:
 Use "${FOO}" as part of a word, or as a word of its own, on the command
 line, in which case it will be
 replaced by the value of the environment variable including
 all whitespace it contains, resulting in a single argument.
 Use "$FOO" as a separate word on the
 command line, in which case it will be replaced
 by the value of the environment variable split at
 whitespace, resulting in zero or more arguments.

Since we want people to be able to use these for multiple arguments we
need to make sure we don't use {} around the env vars...
This commit is contained in:
Eric Paris 2015-02-05 11:36:55 -05:00
parent 5de2e916e5
commit 4b309aa864
5 changed files with 30 additions and 30 deletions

View File

@ -7,15 +7,15 @@ EnvironmentFile=-/etc/kubernetes/config
EnvironmentFile=-/etc/kubernetes/apiserver EnvironmentFile=-/etc/kubernetes/apiserver
User=kube User=kube
ExecStart=/usr/bin/kube-apiserver \ ExecStart=/usr/bin/kube-apiserver \
${KUBE_LOGTOSTDERR} \ $KUBE_LOGTOSTDERR \
${KUBE_LOG_LEVEL} \ $KUBE_LOG_LEVEL \
${KUBE_ETCD_SERVERS} \ $KUBE_ETCD_SERVERS \
${KUBE_API_ADDRESS} \ $KUBE_API_ADDRESS \
${KUBE_API_PORT} \ $KUBE_API_PORT \
${KUBELET_PORT} \ $KUBELET_PORT \
${KUBE_ALLOW_PRIV} \ $KUBE_ALLOW_PRIV \
${KUBE_SERVICE_ADDRESSES} \ $KUBE_SERVICE_ADDRESSES \
${KUBE_API_ARGS} $KUBE_API_ARGS
Restart=on-failure Restart=on-failure
[Install] [Install]

View File

@ -8,11 +8,11 @@ EnvironmentFile=-/etc/kubernetes/apiserver
EnvironmentFile=-/etc/kubernetes/controller-manager EnvironmentFile=-/etc/kubernetes/controller-manager
User=kube User=kube
ExecStart=/usr/bin/kube-controller-manager \ ExecStart=/usr/bin/kube-controller-manager \
${KUBE_LOGTOSTDERR} \ $KUBE_LOGTOSTDERR \
${KUBE_LOG_LEVEL} \ $KUBE_LOG_LEVEL \
${KUBELET_ADDRESSES} \ $KUBELET_ADDRESSES \
${KUBE_MASTER} \ $KUBE_MASTER \
${KUBE_CONTROLLER_MANAGER_ARGS} $KUBE_CONTROLLER_MANAGER_ARGS
Restart=on-failure Restart=on-failure
[Install] [Install]

View File

@ -6,10 +6,10 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes
EnvironmentFile=-/etc/kubernetes/config EnvironmentFile=-/etc/kubernetes/config
EnvironmentFile=-/etc/kubernetes/proxy EnvironmentFile=-/etc/kubernetes/proxy
ExecStart=/usr/bin/kube-proxy \ ExecStart=/usr/bin/kube-proxy \
${KUBE_LOGTOSTDERR} \ $KUBE_LOGTOSTDERR \
${KUBE_LOG_LEVEL} \ $KUBE_LOG_LEVEL \
${KUBE_ETCD_SERVERS} \ $KUBE_ETCD_SERVERS \
${KUBE_PROXY_ARGS} $KUBE_PROXY_ARGS
Restart=on-failure Restart=on-failure
[Install] [Install]

View File

@ -8,10 +8,10 @@ EnvironmentFile=-/etc/kubernetes/apiserver
EnvironmentFile=-/etc/kubernetes/scheduler EnvironmentFile=-/etc/kubernetes/scheduler
User=kube User=kube
ExecStart=/usr/bin/kube-scheduler \ ExecStart=/usr/bin/kube-scheduler \
${KUBE_LOGTOSTDERR} \ $KUBE_LOGTOSTDERR \
${KUBE_LOG_LEVEL} \ $KUBE_LOG_LEVEL \
${KUBE_MASTER} \ $KUBE_MASTER \
${KUBE_SCHEDULER_ARGS} $KUBE_SCHEDULER_ARGS
Restart=on-failure Restart=on-failure
[Install] [Install]

View File

@ -9,14 +9,14 @@ WorkingDirectory=/var/lib/kubelet
EnvironmentFile=-/etc/kubernetes/config EnvironmentFile=-/etc/kubernetes/config
EnvironmentFile=-/etc/kubernetes/kubelet EnvironmentFile=-/etc/kubernetes/kubelet
ExecStart=/usr/bin/kubelet \ ExecStart=/usr/bin/kubelet \
${KUBE_LOGTOSTDERR} \ $KUBE_LOGTOSTDERR \
${KUBE_LOG_LEVEL} \ $KUBE_LOG_LEVEL \
${KUBE_ETCD_SERVERS} \ $KUBE_ETCD_SERVERS \
${KUBELET_ADDRESS} \ $KUBELET_ADDRESS \
${KUBELET_PORT} \ $KUBELET_PORT \
${KUBELET_HOSTNAME} \ $KUBELET_HOSTNAME \
${KUBE_ALLOW_PRIV} \ $KUBE_ALLOW_PRIV \
${KUBELET_ARGS} $KUBELET_ARGS
Restart=on-failure Restart=on-failure
[Install] [Install]