Skip to content

Commit

Permalink
Upgrade to 0.9.0 (Thakurvaibhav#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thakurvaibhav authored Dec 11, 2019
1 parent b880e05 commit 1235339
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 20 deletions.
2 changes: 1 addition & 1 deletion monitoring/prometheus-ha/01-prometheus-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ data:
external_labels:
cluster: prometheus-ha
# Each Prometheus has to have unique labels.
replica: $(POD_NAME)
prometheus_replica: $(POD_NAME)
rule_files:
- /etc/prometheus/rules/*rules.yaml
Expand Down
13 changes: 11 additions & 2 deletions monitoring/prometheus-ha/05-thanos-querier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ spec:
spec:
containers:
- name: thanos
image: quay.io/thanos/thanos:v0.8.0
image: quay.io/thanos/thanos:v0.9.0
args:
- query
- --log.level=debug
- --query.replica-label=replica
- --grpc-address=0.0.0.0:10901
- --http-address=0.0.0.0:9090
- --store=dnssrv+thanos-store-gateway:10901
ports:
- name: http
containerPort: 10902
containerPort: 9090
- name: grpc
containerPort: 10901
livenessProbe:
Expand All @@ -36,6 +38,13 @@ spec:
httpGet:
port: http
path: /-/ready
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: 100m
memory: 256Mi
---
apiVersion: v1
kind: Service
Expand Down
24 changes: 20 additions & 4 deletions monitoring/prometheus-ha/06-thanos-ruler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,21 @@ spec:
spec:
containers:
- name: thanos
image: quay.io/thanos/thanos:v0.8.0
image: quay.io/thanos/thanos:v0.9.0
args:
- rule
- --grpc-address=0.0.0.0:10901
- --http-address=0.0.0.0:10902
- --log.level=debug
- --data-dir=/data
- --eval-interval=15s
- --eval-interval=10s
- --rule-file=/etc/thanos-ruler/*.rules.yaml
- --alertmanagers.url=http://alertmanager:9093
- --query=thanos-querier:9090
- "--objstore.config={type: GCS, config: {bucket: thanos-ruler}}"
- --label=ruler_cluster="prometheus-ha"
- --label=replica="$(POD_NAME)"
- --alert.label-drop="replica"
env:
- name : GOOGLE_APPLICATION_CREDENTIALS
value: /etc/secret/thanos-gcs-credentials.json
Expand All @@ -63,13 +66,26 @@ spec:
- name: grpc
containerPort: 10901
livenessProbe:
failureThreshold: 4
httpGet:
port: http
path: /-/healthy
port: 10902
scheme: HTTP
periodSeconds: 30
readinessProbe:
httpGet:
port: http
path: /-/ready
port: 10902
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 30
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: 50m
memory: 100Mi
volumeMounts:
- mountPath: /etc/thanos-ruler
name: config
Expand Down
17 changes: 9 additions & 8 deletions monitoring/prometheus-ha/07-thanos-store-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ spec:
spec:
containers:
- name: thanos
image: quay.io/thanos/thanos:v0.8.0
image: quay.io/thanos/thanos:v0.9.0
args:
- "store"
- --grpc-address=0.0.0.0:10901
- --http-address=0.0.0.0:10902
- "--log.level=debug"
- "--data-dir=/data"
- "--objstore.config={type: GCS, config: {bucket: prometheus-long-term}}"
- "--index-cache-size=500MB"
- "--chunk-pool-size=500MB"
env:
- name : GOOGLE_APPLICATION_CREDENTIALS
value: /etc/secret/thanos-gcs-credentials.json
Expand All @@ -38,18 +38,19 @@ spec:
resources:
limits:
cpu: 1
memory: 5Gi
memory: 8Gi
requests:
cpu: 0.5
memory: 1Gi
livenessProbe:
httpGet:
port: 10902
path: /-/healthy
readinessProbe:
failureThreshold: 6
httpGet:
port: 10902
path: /-/ready
periodSeconds: 20
successThreshold: 1
timeoutSeconds: 5
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- name: thanos-gcs-credentials
mountPath: /etc/secret
Expand Down
9 changes: 4 additions & 5 deletions monitoring/prometheus-ha/08-thanos-compacter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ spec:
spec:
containers:
- name: thanos
image: quay.io/thanos/thanos:v0.8.0
image: quay.io/thanos/thanos:v0.9.0
args:
- "compact"
- "--log.level=debug"
- "--data-dir=/data"
- --retention.resolution-raw=15d
- --retention.resolution-5m=10d
- --retention.resolution-1h=10d
- "--objstore.config={type: GCS, config: {bucket: prometheus-long-term}}"
- "--wait"
env:
Expand All @@ -31,10 +34,6 @@ spec:
ports:
- name: http
containerPort: 10902
livenessProbe:
httpGet:
port: 10902
path: /-/healthy
readinessProbe:
httpGet:
port: 10902
Expand Down

0 comments on commit 1235339

Please sign in to comment.