From 32a9a83190624990397e75a3d6fc4f2b50714a75 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Wed, 30 May 2018 22:33:16 -0700 Subject: [PATCH] Add Prometheus liveness and readiness probes --- CHANGES.md | 4 ++ addons/prometheus/deployment.yaml | 61 ++++++++++++++++++------------- 2 files changed, 40 insertions(+), 25 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e8936125..73a68006 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,10 @@ Notable changes between versions. * Update Calico from v3.1.2 to v3.1.3 +#### Addons + +* Add Prometheus liveness and readiness probes + ## v1.10.3 * Kubernetes [v1.10.3](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.10.md#v1103) diff --git a/addons/prometheus/deployment.yaml b/addons/prometheus/deployment.yaml index dae1a8fb..eb54d307 100644 --- a/addons/prometheus/deployment.yaml +++ b/addons/prometheus/deployment.yaml @@ -17,30 +17,41 @@ spec: spec: serviceAccountName: prometheus containers: - - name: prometheus - image: quay.io/prometheus/prometheus:v2.2.1 - args: - - --config.file=/etc/prometheus/prometheus.yaml - - --storage.tsdb.path=/var/lib/prometheus - ports: - - name: web - containerPort: 9090 - volumeMounts: - - name: config - mountPath: /etc/prometheus - - name: rules - mountPath: /etc/prometheus/rules - - name: data - mountPath: /var/lib/prometheus - dnsPolicy: ClusterFirst - restartPolicy: Always + - name: prometheus + image: quay.io/prometheus/prometheus:v2.2.1 + args: + - --web.listen-address=0.0.0.0:9090 + - --config.file=/etc/prometheus/prometheus.yaml + - --storage.tsdb.path=/var/lib/prometheus + ports: + - name: web + containerPort: 9090 + volumeMounts: + - name: config + mountPath: /etc/prometheus + - name: rules + mountPath: /etc/prometheus/rules + - name: data + mountPath: /var/lib/prometheus + readinessProbe: + httpGet: + path: /-/ready + port: 9090 + initialDelaySeconds: 10 + timeoutSeconds: 10 + livenessProbe: + httpGet: + path: /-/healthy + port: 9090 + initialDelaySeconds: 10 + timeoutSeconds: 10 terminationGracePeriodSeconds: 30 volumes: - - name: config - configMap: - name: prometheus-config - - name: rules - configMap: - name: prometheus-rules - - name: data - emptyDir: {} + - name: config + configMap: + name: prometheus-config + - name: rules + configMap: + name: prometheus-rules + - name: data + emptyDir: {}