summaryrefslogtreecommitdiffstats
path: root/roles/openshift_prometheus/templates
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-10-23 23:19:31 -0400
committerGitHub <noreply@github.com>2017-10-23 23:19:31 -0400
commit641445638b67aecfa2462de2068bbcc985145580 (patch)
tree0ba670b5f9e126c8c34876b2015e557048af95de /roles/openshift_prometheus/templates
parentd3ae358d8eda7d74a158d9ff7de3a23fca4e8b51 (diff)
parent3792787d7e7cc3b8c44ccbbc83a3c2f9a9299f38 (diff)
downloadopenshift-641445638b67aecfa2462de2068bbcc985145580.tar.gz
openshift-641445638b67aecfa2462de2068bbcc985145580.tar.bz2
openshift-641445638b67aecfa2462de2068bbcc985145580.tar.xz
openshift-641445638b67aecfa2462de2068bbcc985145580.zip
Merge pull request #5808 from zgalor/stateful_set
Switch to stateful set in prometheus
Diffstat (limited to 'roles/openshift_prometheus/templates')
-rw-r--r--roles/openshift_prometheus/templates/prometheus.j2 (renamed from roles/openshift_prometheus/templates/prometheus_deployment.j2)13
1 files changed, 10 insertions, 3 deletions
diff --git a/roles/openshift_prometheus/templates/prometheus_deployment.j2 b/roles/openshift_prometheus/templates/prometheus.j2
index 66eab6df4..81f043491 100644
--- a/roles/openshift_prometheus/templates/prometheus_deployment.j2
+++ b/roles/openshift_prometheus/templates/prometheus.j2
@@ -1,12 +1,14 @@
-apiVersion: extensions/v1beta1
-kind: Deployment
+apiVersion: apps/v1beta1
+kind: StatefulSet
metadata:
name: prometheus
namespace: {{ namespace }}
labels:
app: prometheus
spec:
- replicas: {{ prom_replicas|default(1) }}
+ updateStrategy:
+ type: RollingUpdate
+ podManagementPolicy: Parallel
selector:
provider: openshift
matchLabels:
@@ -60,6 +62,8 @@ spec:
- -tls-key=/etc/tls/private/tls.key
- -client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token
- -cookie-secret-file=/etc/proxy/secrets/session_secret
+ - -openshift-ca=/etc/pki/tls/cert.pem
+ - -openshift-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
- -skip-auth-regex=^/metrics
volumeMounts:
- mountPath: /etc/tls/private
@@ -72,6 +76,7 @@ spec:
- name: prometheus
args:
- --storage.tsdb.retention=6h
+ - --storage.tsdb.min-block-duration=2m
- --config.file=/etc/prometheus/prometheus.yml
- --web.listen-address=localhost:9090
image: "{{ openshift_prometheus_image_prometheus }}"
@@ -133,6 +138,8 @@ spec:
- -tls-key=/etc/tls/private/tls.key
- -client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token
- -cookie-secret-file=/etc/proxy/secrets/session_secret
+ - -openshift-ca=/etc/pki/tls/cert.pem
+ - -openshift-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
volumeMounts:
- mountPath: /etc/tls/private
name: alerts-tls