From 4e70e7ec05a3573fb607c4346123bd0433a62ad8 Mon Sep 17 00:00:00 2001 From: Viktor Farcic Date: Wed, 22 Aug 2018 23:03:25 +0200 Subject: [PATCH] Prometheus --- helm/go-demo-5/templates/deployment.yaml | 4 ++-- helm/go-demo-5/templates/svc.yaml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/helm/go-demo-5/templates/deployment.yaml b/helm/go-demo-5/templates/deployment.yaml index b1162da..7ca7b64 100644 --- a/helm/go-demo-5/templates/deployment.yaml +++ b/helm/go-demo-5/templates/deployment.yaml @@ -27,12 +27,12 @@ spec: value: {{ template "helm.fullname" . }}-db readinessProbe: httpGet: - path: /demo/hello + path: /demo/hello?health=true port: 8080 periodSeconds: 1 livenessProbe: httpGet: - path: /demo/hello + path: /demo/hello?health=true port: 8080 resources: {{ toYaml .Values.resources | indent 10 }} diff --git a/helm/go-demo-5/templates/svc.yaml b/helm/go-demo-5/templates/svc.yaml index 4e86174..4b7518e 100644 --- a/helm/go-demo-5/templates/svc.yaml +++ b/helm/go-demo-5/templates/svc.yaml @@ -26,6 +26,9 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} + annotations: + prometheus.io/scrape: "true" + prometheus.io.port: "8080" spec: ports: - port: 8080