Add prometheus annotations to tiller-deploy service

This adds the prometheus annotations to the tiller chart, allowing
for the scraping of metrics from tiller.  currently, tiller exports
metrics specific to the grpc calls being made against it

Change-Id: Ibe10098689cc37a9de6306af86f4d63d8aab318b
This commit is contained in:
Steve Wilkerson 2018-02-19 16:15:02 -06:00
parent 457ff9552b
commit 4f1f180e8e
4 changed files with 26 additions and 0 deletions

View File

@ -74,6 +74,9 @@ spec:
- containerPort: 44134 - containerPort: 44134
name: tiller name: tiller
protocol: TCP protocol: TCP
- containerPort: 44135
name: metrics
protocol: TCP
readinessProbe: readinessProbe:
failureThreshold: 3 failureThreshold: 3
httpGet: httpGet:

View File

@ -16,6 +16,7 @@ limitations under the License.
{{- if .Values.manifests.service_tiller_deploy }} {{- if .Values.manifests.service_tiller_deploy }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $prometheus_annotations := $envAll.Values.monitoring.prometheus.tiller }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -24,12 +25,20 @@ metadata:
app: helm app: helm
name: tiller name: tiller
name: tiller-deploy name: tiller-deploy
annotations:
{{- if .Values.monitoring.prometheus.enabled }}
{{ tuple $prometheus_annotations | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }}
{{- end }}
spec: spec:
ports: ports:
- name: tiller - name: tiller
port: 44134 port: 44134
protocol: TCP protocol: TCP
targetPort: tiller targetPort: tiller
- name: metrics
port: 44135
protocol: TCP
targetPort: metrics
selector: selector:
app: helm app: helm
name: tiller name: tiller

View File

@ -78,6 +78,13 @@ endpoints:
registry: registry:
node: 5000 node: 5000
monitoring:
prometheus:
enabled: true
tiller:
scrape: true
port: 44135
manifests: manifests:
clusterrolebinding_tiller: true clusterrolebinding_tiller: true
configmap_bin: true configmap_bin: true

View File

@ -29,6 +29,13 @@
args: args:
executable: /bin/bash executable: /bin/bash
- name: "Get prometheus metrics from tiller-deploy"
shell: |-
set -e
curl tiller-deploy.kube-system:44135/metrics >> "{{ logs_dir }}"/prometheus/kube-system-tiller-deploy.txt
args:
executable: /bin/bash
- name: "Downloads logs to executor" - name: "Downloads logs to executor"
synchronize: synchronize:
src: "{{ logs_dir }}/prometheus" src: "{{ logs_dir }}/prometheus"