From 8573957fcee939bab27e08bed3a05746e8f846f1 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Wed, 7 Aug 2019 13:25:23 -0500 Subject: [PATCH] Minikube: Expose Tiller http port for metrics This updates the Minikube deployment to patch the tiller-deploy service to add a port definition for the http (44135) port for tiller, which is used to expose metrics for Prometheus to scrape Change-Id: I2eb5d4001c37935674ce64012b2744030addc127 Signed-off-by: Steve Wilkerson --- tools/deployment/common/005-deploy-k8s.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/deployment/common/005-deploy-k8s.sh b/tools/deployment/common/005-deploy-k8s.sh index 36f99f2a6..e78d949c0 100755 --- a/tools/deployment/common/005-deploy-k8s.sh +++ b/tools/deployment/common/005-deploy-k8s.sh @@ -182,6 +182,20 @@ kubectl --namespace=kube-system wait \ --for=condition=Ready \ pod -l app=helm,name=tiller +# Patch tiller-deploy service to expose metrics port +tee /tmp/tiller-deploy.yaml << EOF +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "44135" +spec: + ports: + - name: http + port: 44135 + targetPort: http +EOF +kubectl patch service tiller-deploy -n kube-system --patch "$(cat /tmp/tiller-deploy.yaml)" + # Set up local helm server sudo -E tee /etc/systemd/system/helm-serve.service << EOF [Unit]