apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: object-store-bucket-debugging
    app.kubernetes.io/instance: thanos-bucket
    app.kubernetes.io/name: thanos-bucket
    app.kubernetes.io/version: v0.17.0
  name: thanos-bucket
  namespace: monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: object-store-bucket-debugging
      app.kubernetes.io/instance: thanos-bucket
      app.kubernetes.io/name: thanos-bucket
  template:
    metadata:
      labels:
        app.kubernetes.io/component: object-store-bucket-debugging
        app.kubernetes.io/instance: thanos-bucket
        app.kubernetes.io/name: thanos-bucket
        app.kubernetes.io/version: v0.17.0
    spec:
      serviceAccountName: "thanos"
      containers:
      - args:
        - tools
        - bucket
        - web
        - --objstore.config=$(OBJSTORE_CONFIG)
        env:
        - name: OBJSTORE_CONFIG
          valueFrom:
            secretKeyRef:
              key: thanos.yaml
              name: thanos-objectstorage
        image: gcr.io/pingcap-public/thanos/thanos:v0.17.0
        livenessProbe:
          failureThreshold: 4
          httpGet:
            path: /-/healthy
            port: 10902
            scheme: HTTP
          periodSeconds: 30
        name: thanos-bucket
        ports:
        - containerPort: 10902
          name: http
        readinessProbe:
          failureThreshold: 20
          httpGet:
            path: /-/ready
            port: 10902
            scheme: HTTP
          periodSeconds: 5
        terminationMessagePolicy: FallbackToLogsOnError
      terminationGracePeriodSeconds: 120
