Fix tiller metrics port exposure issue for minikube

Along with fixing the bug, with this we'll decrease build time for
all jobs using minikube and collecting tiller metrics for more than
2 minutes.

Change-Id: Ia166584eae48c643248f977b959aa6336e3a327e
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
This commit is contained in:
Andrii Ostapenko 2020-07-23 23:39:35 -05:00
parent 68940203db
commit d103da6c06
No known key found for this signature in database
GPG Key ID: F3E83668DBB223B3

View File

@ -182,25 +182,21 @@ helm init --service-account helm-tiller --output yaml \
| kubectl apply -f -
# 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)"
kubectl --namespace=kube-system wait \
--timeout=240s \
--for=condition=Ready \
pod -l app=helm,name=tiller
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)"
kubectl --namespace=kube-system wait --timeout=240s --for=condition=Ready pod -l app=helm,name=tiller
helm init --client-only
# Set up local helm server