apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    app.kubernetes.io/component: database-compactor
    app.kubernetes.io/instance: observatorium-xyz
    app.kubernetes.io/name: thanos-compact
    app.kubernetes.io/part-of: observatorium
    app.kubernetes.io/version: master-2020-08-12-70f89d83
  name: observatorium-xyz-thanos-compact
  namespace: observatorium
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: database-compactor
      app.kubernetes.io/instance: observatorium-xyz
      app.kubernetes.io/name: thanos-compact
      app.kubernetes.io/part-of: observatorium
  serviceName: observatorium-xyz-thanos-compact
  template:
    metadata:
      labels:
        app.kubernetes.io/component: database-compactor
        app.kubernetes.io/instance: observatorium-xyz
        app.kubernetes.io/name: thanos-compact
        app.kubernetes.io/part-of: observatorium
        app.kubernetes.io/version: master-2020-08-12-70f89d83
    spec:
      containers:
      - args:
        - compact
        - --wait
        - --log.level=info
        - --objstore.config=$(OBJSTORE_CONFIG)
        - --data-dir=/var/thanos/compact
        - --debug.accept-malformed-index
        - --retention.resolution-raw=14d
        - --retention.resolution-5m=1s
        - --retention.resolution-1h=1s
        - --delete-delay=48h
        - --deduplication.replica-label=replica
        - --downsampling.disable
        env:
        - name: OBJSTORE_CONFIG
          valueFrom:
            secretKeyRef:
              key: thanos.yaml
              name: thanos-objectstorage
        image: quay.io/thanos/thanos:master-2020-08-12-70f89d83
        livenessProbe:
          failureThreshold: 4
          httpGet:
            path: /-/healthy
            port: 10902
            scheme: HTTP
          periodSeconds: 30
        name: thanos-compact
        ports:
        - containerPort: 10902
          name: http
        readinessProbe:
          failureThreshold: 20
          httpGet:
            path: /-/ready
            port: 10902
            scheme: HTTP
          periodSeconds: 5
        terminationMessagePolicy: FallbackToLogsOnError
        volumeMounts:
        - mountPath: /var/thanos/compact
          name: data
          readOnly: false
      terminationGracePeriodSeconds: 120
      volumes:
      - emptyDir: {}
        name: data
  volumeClaimTemplates: null
