From e4fd72b6fa03615e131d4d541735e784907d6629 Mon Sep 17 00:00:00 2001 From: qinng <854222409@qq.com> Date: Thu, 8 Apr 2021 14:41:02 +0800 Subject: [PATCH] fix example config (#49) --- examples/config.yaml | 2 +- examples/prometheus-rep-0.yaml | 15 +-------------- examples/thanos-query.yaml | 12 +++++++++--- examples/thanos-rule.yaml | 10 ++++++++-- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/examples/config.yaml b/examples/config.yaml index 63fc82b..b874ee5 100644 --- a/examples/config.yaml +++ b/examples/config.yaml @@ -48,7 +48,7 @@ data: - name: count rules: - expr: | - count(metrics0) + count(a00000000000metrics0) record: metrics_count diff --git a/examples/prometheus-rep-0.yaml b/examples/prometheus-rep-0.yaml index 38165a4..daaf28a 100644 --- a/examples/prometheus-rep-0.yaml +++ b/examples/prometheus-rep-0.yaml @@ -42,7 +42,7 @@ spec: spec: containers: - name: thanos - image: thanosio/thanos:v0.16.0-rc.1 + image: thanosio/thanos:v0.18.0 args: - sidecar - --tsdb.path=/prometheus @@ -123,19 +123,6 @@ spec: name: config-out - emptyDir: {} name: tls-assets - volumeClaimTemplates: - - metadata: - labels: - k8s-app: prometheus - name: data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - storageClassName: cbs - volumeMode: Filesystem updateStrategy: rollingUpdate: partition: 0 diff --git a/examples/thanos-query.yaml b/examples/thanos-query.yaml index 7293ee1..46488e0 100644 --- a/examples/thanos-query.yaml +++ b/examples/thanos-query.yaml @@ -40,9 +40,15 @@ spec: - --grpc-address=0.0.0.0:10901 - --http-address=0.0.0.0:9090 - --query.partial-response - - --store=dnssrv+_grpc._tcp.prometheus.default.svc.cluster.local - - --store=dnssrv+_grpc._tcp.thanos-rule.default.svc.cluster.local - image: thanosio/thanos:v0.16.0-rc.1 + - --store=dnssrv+_grpc._tcp.prometheus.$(NAMESPACE).svc.cluster.local + - --store=dnssrv+_grpc._tcp.thanos-rule.$(NAMESPACE).svc.cluster.local + image: thanosio/thanos:v0.18.0 + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace livenessProbe: failureThreshold: 4 httpGet: diff --git a/examples/thanos-rule.yaml b/examples/thanos-rule.yaml index b00901f..1d7ff62 100644 --- a/examples/thanos-rule.yaml +++ b/examples/thanos-rule.yaml @@ -45,10 +45,16 @@ spec: - --grpc-address=:10901 - --http-address=:10902 - --data-dir=/var/thanos/rule - - --query=dnssrv+_http._tcp.thanos-query.default.svc.cluster.local + - --query=dnssrv+_http._tcp.thanos-query.$(NAMESPACE).svc.cluster.local - --eval-interval=10s - --tsdb.retention=3h - image: thanosio/thanos:v0.16.0-rc.1 + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: thanosio/thanos:v0.18.0 volumeMounts: - mountPath: /etc/thanos/rules name: rules