core-deployments/thanos/5-compactor.yaml
Renovate Bot 1ad14c10b1
All checks were successful
ci/woodpecker/push/yamllint Pipeline was successful
chore(deps): update quay.io/thanos/thanos docker tag to v0.37.0
2024-11-25 13:03:07 +00:00

105 lines
2.6 KiB
YAML

---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
namespace: thanos
name: compactor
spec:
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 20Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: thanos
name: compactor
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: compactor
template:
metadata:
labels:
app.kubernetes.io/name: compactor
spec:
serviceAccount: thanos
securityContext:
fsGroup: 1001
initContainers:
- name: init-chmod-data
image: docker.io/bitnami/minideb:buster
command:
- sh
- -c
- |
mkdir -p /data
chown -R "1001:1001" /data
securityContext:
runAsUser: 0
volumeMounts:
- name: data
mountPath: /data
containers:
- name: compactor
image: quay.io/thanos/thanos:v0.37.0
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 1001
args:
- compact
- --log.level=info
- --http-address=0.0.0.0:10902
- --data-dir=/data
- --retention.resolution-raw=7d
- --retention.resolution-5m=30d
- --retention.resolution-1h=180d
- --consistency-delay=30m
- --objstore.config-file=/conf/objstore.yml
- --wait
ports:
- name: http
containerPort: 10902
protocol: TCP
livenessProbe:
failureThreshold: 6
httpGet:
path: /-/healthy
port: http
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 30
readinessProbe:
failureThreshold: 6
httpGet:
path: /-/ready
port: http
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 30
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 750m
memory: 500Mi
volumeMounts:
- name: objstore
mountPath: /conf/objstore.yml
subPath: objstore.yml
- name: data
mountPath: /data
volumes:
- name: objstore
secret:
secretName: objstore
- name: data
persistentVolumeClaim:
claimName: compactor