apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
  name: thanos-compactor
  labels:
    app: thanos-compactor
spec:
  replicas: 1
  selector:
    matchLabels:
      app: thanos-compactor
  serviceName: thanos-compactor
  template:
    metadata:
      labels:
        app: thanos-compactor
    spec:
      containers:
        - name: thanos
          image: improbable/thanos:v0.3.1
          args:
            - compact
            - --log.level=debug
            - --data-dir=/data
            - |
              --objstore.config=type: S3
              config:
                bucket: demo-bucket
                access_key: smth
                secret_key: Need8Chars
                endpoint: %%S3_ENDPOINT%%
                insecure: true
            - --sync-delay=30m
            - --wait
          ports:
            - name: http
              containerPort: 10902
          livenessProbe:
            httpGet:
              port: 10902
              path: /-/healthy
          readinessProbe:
            httpGet:
              port: 10902
              path: /-/ready
          resources:
            limits:
              cpu: "1"
              memory: 1Gi
            requests:
              cpu: "1"
              memory: 1Gi
