apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: thanos-bucket
  name: thanos-bucket
  namespace: monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: thanos-bucket
  template:
    metadata:
      labels:
        app.kubernetes.io/name: thanos-bucket
    spec:
      containers:
      - args:
        - bucket
        - web
        - --objstore.config=$(OBJSTORE_CONFIG)
        env:
        - name: OBJSTORE_CONFIG
          valueFrom:
            secretKeyRef:
              key: thanos.yaml
              name: thanos-objectstorage
        image: quay.io/thanos/thanos:v0.9.0
        livenessProbe:
          failureThreshold: 4
          httpGet:
            path: /-/healthy
            port: 8080
            scheme: HTTP
          periodSeconds: 30
        name: thanos-bucket
        ports:
        - containerPort: 8080
          name: http
        readinessProbe:
          httpGet:
            path: /-/ready
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 30
        resources:
          limits:
            cpu: 250m
            memory: 512Mi
          requests:
            cpu: 100m
            memory: 256Mi
      terminationGracePeriodSeconds: 120
