A monitoring/prometheus/deployment-compact.yaml => monitoring/prometheus/deployment-compact.yaml +44 -0
@@ 0,0 1,44 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: thanos-compact
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ component: compact
+ template:
+ metadata:
+ annotations:
+ prometheus.xdavidwu.link/instance: main
+ labels:
+ metrics: metrics
+ component: compact
+ spec:
+ containers:
+ - name: compact
+ image: quay.io/thanos/thanos:THANOS_VERSION
+ args:
+ - compact
+ - --data-dir=/tmp
+ - --objstore.config-file=/etc/thanos/objstore.yml
+ - --wait
+ - --wait-interval=1h
+ - --compact.cleanup-interval=6h
+ - --block-viewer.global.sync-block-interval=1h
+ - --retention.resolution-5m=120d
+ - --retention.resolution-raw=30d
+ ports:
+ - name: metrics
+ containerPort: 10902
+ readinessProbe:
+ httpGet:
+ port: metrics
+ path: /-/ready
+ volumeMounts:
+ - name: thanos
+ mountPath: /etc/thanos
+ volumes:
+ - name: thanos
+ secret:
+ secretName: thanos
M monitoring/prometheus/kustomization.yaml => monitoring/prometheus/kustomization.yaml +1 -0
@@ 19,6 19,7 @@ resources:
- service-query.yaml
- deployment-query-frontend.yaml
- service-query-frontend.yaml
+ - deployment-compact.yaml
- configmap.yaml
- serviceaccount.yaml
- clusterrole.yaml