From f20af6ab4c419f14fd05ba03fcf1970d6d0da8a9 Mon Sep 17 00:00:00 2001 From: Ivan Pedrazas Date: Tue, 31 Oct 2017 12:26:47 +0000 Subject: [PATCH] feat(tiller): exposes port 44135 in tiller deployment Tiller exposes probes and metrics in 44135. Because tiller doesn't expose that port and does not contain any Prometheus annotations, making Prometheus scrape tiller is a bit more complex. Closes #2985 --- cmd/helm/installer/install.go | 1 + cmd/helm/installer/install_test.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go index c3d970726..9fa365a51 100644 --- a/cmd/helm/installer/install.go +++ b/cmd/helm/installer/install.go @@ -168,6 +168,7 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { ImagePullPolicy: opts.pullPolicy(), Ports: []v1.ContainerPort{ {ContainerPort: 44134, Name: "tiller"}, + {ContainerPort: 44135, Name: "http"}, }, Env: []v1.EnvVar{ {Name: "TILLER_NAMESPACE", Value: opts.Namespace}, diff --git a/cmd/helm/installer/install_test.go b/cmd/helm/installer/install_test.go index f0ee61853..ad30557e2 100644 --- a/cmd/helm/installer/install_test.go +++ b/cmd/helm/installer/install_test.go @@ -207,6 +207,10 @@ func TestInstall(t *testing.T) { if i != image { t.Errorf("expected image = '%s', got '%s'", image, i) } + ports := len(obj.Spec.Template.Spec.Containers[0].Ports) + if ports != 2 { + t.Errorf("expected ports = 2, got '%d'", ports) + } return true, obj, nil }) fc.AddReactor("create", "services", func(action testcore.Action) (bool, runtime.Object, error) {