From 4f16e73a1377c055d09deecd0230e276a89e48bd Mon Sep 17 00:00:00 2001 From: Pinghao Wu Date: Mon, 3 Feb 2025 14:58:14 +0800 Subject: [PATCH] prometheus: add thanos store --- monitoring/prometheus/deployment-store.yaml | 38 +++++++++++++++++++++ monitoring/prometheus/kustomization.yaml | 2 ++ monitoring/prometheus/service-store.yaml | 11 ++++++ 3 files changed, 51 insertions(+) create mode 100644 monitoring/prometheus/deployment-store.yaml create mode 100644 monitoring/prometheus/service-store.yaml diff --git a/monitoring/prometheus/deployment-store.yaml b/monitoring/prometheus/deployment-store.yaml new file mode 100644 index 0000000..19203ad --- /dev/null +++ b/monitoring/prometheus/deployment-store.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: thanos-store +spec: + replicas: 1 + selector: + matchLabels: + component: store + template: + metadata: + annotations: + prometheus.xdavidwu.link/instance: main + labels: + metrics: metrics + component: store + spec: + containers: + - name: store + image: quay.io/thanos/thanos:THANOS_VERSION + args: + - store + - --data-dir=/tmp + - --objstore.config-file=/etc/thanos/objstore.yml + ports: + - name: metrics + containerPort: 10902 + readinessProbe: + httpGet: + port: metrics + path: /-/ready + volumeMounts: + - name: thanos + mountPath: /etc/thanos + volumes: + - name: thanos + secret: + secretName: thanos diff --git a/monitoring/prometheus/kustomization.yaml b/monitoring/prometheus/kustomization.yaml index bf8c62d..e448e1a 100644 --- a/monitoring/prometheus/kustomization.yaml +++ b/monitoring/prometheus/kustomization.yaml @@ -13,6 +13,8 @@ resources: - namespace.yaml - deployment.yaml - service.yaml + - deployment-store.yaml + - service-store.yaml - configmap.yaml - serviceaccount.yaml - clusterrole.yaml diff --git a/monitoring/prometheus/service-store.yaml b/monitoring/prometheus/service-store.yaml new file mode 100644 index 0000000..28133bf --- /dev/null +++ b/monitoring/prometheus/service-store.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: thanos-store +spec: + selector: + component: store + ports: + - name: store-grpc + protocol: TCP + port: 10901 -- 2.45.2