From 8d34231381eae468232e3d0ecb64366c04032563 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Sat, 1 Nov 2014 20:38:45 -0700 Subject: [PATCH] Fix a bunch of places where the -machines flag was still attached to the apiserver. --- build/run-images/apiserver/run.sh | 6 +----- build/run-images/bootstrap/run.sh | 4 ++-- build/run-images/controller-manager/run.sh | 6 +++++- .../cloud-config/master-cloud-config.yaml | 4 ++-- contrib/init/systemd/environ/apiserver | 3 --- contrib/init/systemd/environ/controller-manager | 3 +++ contrib/init/systemd/kube-apiserver.service | 1 - .../init/systemd/kube-controller-manager.service | 1 + .../coreos/configs/master.yml | 2 +- .../coreos/configs/standalone.yml | 2 +- .../coreos/units/apiserver.service | 1 - .../coreos/units/controller-manager.service | 1 + .../fedora/fedora_manual_config.md | 15 ++++++++++++--- docs/man/kube-apiserver.1.md | 3 --- docs/man/kube-controller-manager.1.md | 3 +++ docs/man/man1/kube-apiserver.1 | 4 ---- docs/man/man1/kube-controller-manager.1 | 4 ++++ 17 files changed, 36 insertions(+), 27 deletions(-) diff --git a/build/run-images/apiserver/run.sh b/build/run-images/apiserver/run.sh index 71fa72ebf0824..8dbfcb2dee42d 100755 --- a/build/run-images/apiserver/run.sh +++ b/build/run-images/apiserver/run.sh @@ -14,8 +14,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -# If the user doesn't specify a minion, assume we are running in a single node -# configuration and that we have a local minion. -KUBE_MINIONS="${KUBE_MINIONS:-$(hostname -f)}" - -./apiserver -address=0.0.0.0 -etcd_servers="${ETCD_SERVERS}" --machines="${KUBE_MINIONS}" +./apiserver -address=0.0.0.0 -etcd_servers="${ETCD_SERVERS}" diff --git a/build/run-images/bootstrap/run.sh b/build/run-images/bootstrap/run.sh index 9e0fda38b1932..35ba9aaa1a5fd 100755 --- a/build/run-images/bootstrap/run.sh +++ b/build/run-images/bootstrap/run.sh @@ -39,11 +39,11 @@ containers: hostPort: 8080 containerPort: 8080 protocol: TCP - command: ["/kubernetes/apiserver", "-v=5", "-address=0.0.0.0", "-etcd_servers=http://127.0.0.1:4001", "-machines=${KUBELET_IP}"] + command: ["/kubernetes/apiserver", "-v=5", "-address=0.0.0.0", "-etcd_servers=http://127.0.0.1:4001"] - name: controller-manager image: kubernetes imagePullPolicy: never - command: ["/kubernetes/controller-manager", "-v=5", "-master=127.0.0.1:8080"] + command: ["/kubernetes/controller-manager", "-v=5", "-master=127.0.0.1:8080", "-machines=${KUBELET_IP}"] - name: proxy image: kubernetes imagePullPolicy: never diff --git a/build/run-images/controller-manager/run.sh b/build/run-images/controller-manager/run.sh index 2da469badcd89..03b3f0500e1bd 100755 --- a/build/run-images/controller-manager/run.sh +++ b/build/run-images/controller-manager/run.sh @@ -14,4 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -./controller-manager -master="${API_SERVER}" +# If the user doesn't specify a minion, assume we are running in a single node +# configuration and that we have a local minion. +KUBE_MINIONS="${KUBE_MINIONS:-$(hostname -f)}" + +./controller-manager -master="${API_SERVER}" --machines="${KUBE_MINIONS}" diff --git a/cluster/rackspace/cloud-config/master-cloud-config.yaml b/cluster/rackspace/cloud-config/master-cloud-config.yaml index 477db802f52e3..f1ba3bfbb61ca 100644 --- a/cluster/rackspace/cloud-config/master-cloud-config.yaml +++ b/cluster/rackspace/cloud-config/master-cloud-config.yaml @@ -77,7 +77,7 @@ coreos: [Service] EnvironmentFile=-/run/apiserver/minions.env ExecStartPre=/usr/bin/ln -sf /opt/kubernetes/server/bin/apiserver /opt/bin/apiserver - ExecStart=/opt/bin/apiserver --address=127.0.0.1 --port=8080 --machines=${MINIONS} --etcd_servers=http://127.0.0.1:4001 --portal_net=PORTAL_NET --logtostderr=true + ExecStart=/opt/bin/apiserver --address=127.0.0.1 --port=8080 --etcd_servers=http://127.0.0.1:4001 --portal_net=PORTAL_NET --logtostderr=true Restart=always RestartSec=2 - name: master-apiserver-sighup.path @@ -116,7 +116,7 @@ coreos: Requires=master-apiserver.service [Service] ExecStartPre=/usr/bin/ln -sf /opt/kubernetes/server/bin/controller-manager /opt/bin/controller-manager - ExecStart=/opt/bin/controller-manager --master=127.0.0.1:8080 --logtostderr=true + ExecStart=/opt/bin/controller-manager --master=127.0.0.1:8080 --machines=${MINIONS} --logtostderr=true Restart=always RestartSec=2 - name: master-scheduler.service diff --git a/contrib/init/systemd/environ/apiserver b/contrib/init/systemd/environ/apiserver index ca351ed36530a..586ecca6c9413 100644 --- a/contrib/init/systemd/environ/apiserver +++ b/contrib/init/systemd/environ/apiserver @@ -13,9 +13,6 @@ KUBE_API_PORT="--port=8080" # How the replication controller and scheduler find the apiserver KUBE_MASTER="--master=127.0.0.1:8080" -# Comma seperated list of minions -KUBELET_ADDRESSES="--machines=127.0.0.1" - # Port minions listen on KUBELET_PORT="--kubelet_port=10250" diff --git a/contrib/init/systemd/environ/controller-manager b/contrib/init/systemd/environ/controller-manager index 8d8f4915684c3..e5f8ba760bbfd 100644 --- a/contrib/init/systemd/environ/controller-manager +++ b/contrib/init/systemd/environ/controller-manager @@ -3,5 +3,8 @@ # defaults from config and apiserver should be adequate +# Comma seperated list of minions +KUBELET_ADDRESSES="--machines=127.0.0.1" + # Add you own! KUBE_CONTROLLER_MANAGER_ARGS="" diff --git a/contrib/init/systemd/kube-apiserver.service b/contrib/init/systemd/kube-apiserver.service index 44d2ff46657c6..eef9fbf96fab4 100644 --- a/contrib/init/systemd/kube-apiserver.service +++ b/contrib/init/systemd/kube-apiserver.service @@ -12,7 +12,6 @@ ExecStart=/usr/bin/kube-apiserver \ ${KUBE_ETCD_SERVERS} \ ${KUBE_API_ADDRESS} \ ${KUBE_API_PORT} \ - ${KUBELET_ADDRESSES} \ ${KUBELET_PORT} \ ${KUBE_ALLOW_PRIV} \ ${KUBE_SERVICE_ADDRESSES} \ diff --git a/contrib/init/systemd/kube-controller-manager.service b/contrib/init/systemd/kube-controller-manager.service index 6c2bfb256b3a8..14d5ee5825d53 100644 --- a/contrib/init/systemd/kube-controller-manager.service +++ b/contrib/init/systemd/kube-controller-manager.service @@ -10,6 +10,7 @@ User=kube ExecStart=/usr/bin/kube-controller-manager \ ${KUBE_LOGTOSTDERR} \ ${KUBE_LOG_LEVEL} \ + ${KUBELET_ADDRESSES} \ ${KUBE_MASTER} \ ${KUBE_CONTROLLER_MANAGER_ARGS} Restart=on-failure diff --git a/docs/getting-started-guides/coreos/configs/master.yml b/docs/getting-started-guides/coreos/configs/master.yml index 5ed8c6dd5cf5a..a61a80c491c4f 100644 --- a/docs/getting-started-guides/coreos/configs/master.yml +++ b/docs/getting-started-guides/coreos/configs/master.yml @@ -119,7 +119,6 @@ coreos: --address=127.0.0.1 \ --port=8080 \ --etcd_servers=http://127.0.0.1:4001 \ - --machines=192.168.12.10,192.168.12.11,192.168.12.12 \ --logtostderr=true Restart=always RestartSec=10 @@ -161,6 +160,7 @@ coreos: [Service] ExecStart=/opt/bin/controller-manager \ --master=127.0.0.1:8080 \ + --machines=192.168.12.10,192.168.12.11,192.168.12.12 \ --logtostderr=true Restart=always RestartSec=10 diff --git a/docs/getting-started-guides/coreos/configs/standalone.yml b/docs/getting-started-guides/coreos/configs/standalone.yml index ac7fe2ccea53b..b0c8cead476d0 100644 --- a/docs/getting-started-guides/coreos/configs/standalone.yml +++ b/docs/getting-started-guides/coreos/configs/standalone.yml @@ -48,7 +48,6 @@ coreos: --address=127.0.0.1 \ --port=8080 \ --etcd_servers=http://127.0.0.1:4001 \ - --machines=127.0.0.1 \ --logtostderr=true Restart=on-failure RestartSec=1 @@ -86,6 +85,7 @@ coreos: [Service] ExecStart=/opt/bin/controller-manager \ --master=127.0.0.1:8080 \ + --machines=127.0.0.1 \ --logtostderr=true Restart=on-failure RestartSec=1 diff --git a/docs/getting-started-guides/coreos/units/apiserver.service b/docs/getting-started-guides/coreos/units/apiserver.service index ce073ba884f38..b8fb9a3fd2f3b 100644 --- a/docs/getting-started-guides/coreos/units/apiserver.service +++ b/docs/getting-started-guides/coreos/units/apiserver.service @@ -8,7 +8,6 @@ ExecStart=/opt/bin/apiserver \ --address=127.0.0.1 \ --port=8080 \ --etcd_servers=http://127.0.0.1:4001 \ ---machines=127.0.0.1 \ --portal_net=10.0.0.0/24 \ --logtostderr=true Restart=on-failure diff --git a/docs/getting-started-guides/coreos/units/controller-manager.service b/docs/getting-started-guides/coreos/units/controller-manager.service index 25f0fb82b5695..58de27b242bee 100644 --- a/docs/getting-started-guides/coreos/units/controller-manager.service +++ b/docs/getting-started-guides/coreos/units/controller-manager.service @@ -6,6 +6,7 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes [Service] ExecStart=/opt/bin/controller-manager \ --master=127.0.0.1:8080 \ +--machines=127.0.0.1 \ --etcd_servers=http://127.0.0.1:4001 \ --logtostderr=true Restart=on-failure diff --git a/docs/getting-started-guides/fedora/fedora_manual_config.md b/docs/getting-started-guides/fedora/fedora_manual_config.md index 84752888a5e95..83d366d61731a 100644 --- a/docs/getting-started-guides/fedora/fedora_manual_config.md +++ b/docs/getting-started-guides/fedora/fedora_manual_config.md @@ -102,9 +102,6 @@ KUBE_API_PORT="--port=8080" # How the replication controller and scheduler find the apiserver KUBE_MASTER="--master=fed-master:8080" -# Comma seperated list of minions -KUBELET_ADDRESSES="--machines=fed-minion" - # Port minions listen on KUBELET_PORT="--kubelet_port=10250" @@ -115,6 +112,18 @@ KUBE_SERVICE_ADDRESSES="--portal_net=10.254.0.0/16" KUBE_API_ARGS="" ``` +* Edit /etc/kubernetes/controller-manager to appear as such: +``` +### +# kubernetes system config +# +# The following values are used to configure the kubernetes-controller-manager +# + +# Comma seperated list of minions +KUBELET_ADDRESSES="--machines=fed-minion" +``` + * Start the appropriate services on master: ``` diff --git a/docs/man/kube-apiserver.1.md b/docs/man/kube-apiserver.1.md index 43f7d3a34c7c5..897092c9cf4a7 100644 --- a/docs/man/kube-apiserver.1.md +++ b/docs/man/kube-apiserver.1.md @@ -53,9 +53,6 @@ The the kube-apiserver several options. **-logtostderr**= log to standard error instead of files. Default is false. -**-machines**=[] - List of machines to schedule onto, comma separated. - **-minion_cache_ttl**=30s Duration of time to cache minion information. Default 30 seconds. diff --git a/docs/man/kube-controller-manager.1.md b/docs/man/kube-controller-manager.1.md index de7cb4591f36c..a35a4b5cb0606 100644 --- a/docs/man/kube-controller-manager.1.md +++ b/docs/man/kube-controller-manager.1.md @@ -44,6 +44,9 @@ The kube-controller-manager has several options. **-logtostderr**=false log to standard error instead of files. +**-machines**=[] + List of machines to schedule onto, comma separated. + **-master**="" The address of the Kubernetes API server. diff --git a/docs/man/man1/kube-apiserver.1 b/docs/man/man1/kube-apiserver.1 index 18cb6f4b40879..0e9e4d09edec0 100644 --- a/docs/man/man1/kube-apiserver.1 +++ b/docs/man/man1/kube-apiserver.1 @@ -69,10 +69,6 @@ The the kube\-apiserver several options. \fB\-logtostderr\fP= log to standard error instead of files. Default is false. -.PP -\fB\-machines\fP=[] - List of machines to schedule onto, comma separated. - .PP \fB\-minion\_cache\_ttl\fP=30s Duration of time to cache minion information. Default 30 seconds. diff --git a/docs/man/man1/kube-controller-manager.1 b/docs/man/man1/kube-controller-manager.1 index e1ec28d894c72..55d060a56ae07 100644 --- a/docs/man/man1/kube-controller-manager.1 +++ b/docs/man/man1/kube-controller-manager.1 @@ -56,6 +56,10 @@ The kube\-controller\-manager has several options. \fB\-logtostderr\fP=false log to standard error instead of files. +.PP +\fB\-machines\fP=[] + List of machines to schedule onto, comma separated. + .PP \fB\-master\fP="" The address of the Kubernetes API server.