From 7b3534e012086c97af231b450b81473f22f5fdf1 Mon Sep 17 00:00:00 2001 From: Whit Morriss Date: Mon, 20 Apr 2015 17:07:19 -0500 Subject: [PATCH] move cadvisor port to 4193 to avoid collision with kubelet --- .../juju/charms/trusty/kubernetes/files/cadvisor.upstart.tmpl | 2 +- .../juju/charms/trusty/kubernetes/files/kubelet.upstart.tmpl | 1 + cluster/juju/charms/trusty/kubernetes/hooks/hooks.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cluster/juju/charms/trusty/kubernetes/files/cadvisor.upstart.tmpl b/cluster/juju/charms/trusty/kubernetes/files/cadvisor.upstart.tmpl index 78b7ae0b933c8..f142ca868f391 100644 --- a/cluster/juju/charms/trusty/kubernetes/files/cadvisor.upstart.tmpl +++ b/cluster/juju/charms/trusty/kubernetes/files/cadvisor.upstart.tmpl @@ -11,6 +11,6 @@ exec docker run \ --volume=/var/run:/var/run:rw \ --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro \ --volume=/var/lib/docker/:/var/lib/docker:ro \ - --publish=127.0.0.1:4194:8080 \ + --publish=127.0.0.1:4193:8080 \ --name=cadvisor \ google/cadvisor:latest diff --git a/cluster/juju/charms/trusty/kubernetes/files/kubelet.upstart.tmpl b/cluster/juju/charms/trusty/kubernetes/files/kubelet.upstart.tmpl index 183756ce814e6..de421eeb9da61 100644 --- a/cluster/juju/charms/trusty/kubernetes/files/kubelet.upstart.tmpl +++ b/cluster/juju/charms/trusty/kubernetes/files/kubelet.upstart.tmpl @@ -11,4 +11,5 @@ exec /usr/local/bin/kubelet \ --address=%(kubelet_bind_addr)s \ --api_servers=%(kubeapi_server)s \ --hostname_override=%(kubelet_bind_addr)s \ + --cadvisor_port=4193 --logtostderr=true diff --git a/cluster/juju/charms/trusty/kubernetes/hooks/hooks.py b/cluster/juju/charms/trusty/kubernetes/hooks/hooks.py index 000b58cff552b..f11f7b6f70d5a 100755 --- a/cluster/juju/charms/trusty/kubernetes/hooks/hooks.py +++ b/cluster/juju/charms/trusty/kubernetes/hooks/hooks.py @@ -78,7 +78,7 @@ def relation_changed(): # Setup kubernetes supplemental group setup_kubernetes_group() - # Register services + # Register upstart managed services for n in ("cadvisor", "kubelet", "proxy"): if render_upstart(n, template_data) or not host.service_running(n): print("Starting %s" % n)