apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    app.kubernetes.io/component: database-write-hashring
    app.kubernetes.io/instance: benchmark-thanos-receive-default
    app.kubernetes.io/name: thanos-receive
    app.kubernetes.io/part-of: telemeter-benchmark
    app.kubernetes.io/version: master-2020-02-13-adfef4b5
    controller.receive.thanos.io: thanos-receive-controller
    controller.receive.thanos.io/hashring: default
  name: benchmark-thanos-receive-default
  namespace: telemeter-benchmark
spec:
  replicas: 3
  selector:
    matchLabels:
      app.kubernetes.io/component: database-write-hashring
      app.kubernetes.io/instance: benchmark-thanos-receive-default
      app.kubernetes.io/name: thanos-receive
      app.kubernetes.io/part-of: telemeter-benchmark
      controller.receive.thanos.io/hashring: default
  serviceName: benchmark-thanos-receive-default
  template:
    metadata:
      labels:
        app.kubernetes.io/component: database-write-hashring
        app.kubernetes.io/instance: benchmark-thanos-receive-default
        app.kubernetes.io/name: thanos-receive
        app.kubernetes.io/part-of: telemeter-benchmark
        app.kubernetes.io/version: master-2020-02-13-adfef4b5
        controller.receive.thanos.io/hashring: default
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: app.kubernetes.io/instance
                  operator: In
                  values:
                  - benchmark-thanos-receive-default
              namespaces:
              - telemeter-benchmark
              topologyKey: kubernetes.io/hostname
            weight: 100
      containers:
      - args:
        - receive
        - --grpc-address=0.0.0.0:10901
        - --http-address=0.0.0.0:10902
        - --remote-write.address=0.0.0.0:19291
        - --receive.replication-factor=3
        - --tsdb.path=/var/thanos/receive
        - --label=replica="$(NAME)"
        - --label=receive="true"
        - --receive.local-endpoint=$(NAME).benchmark-thanos-receive-default.$(NAMESPACE).svc.cluster.local:10901
        - --tsdb.retention=6h
        - --receive.hashrings-file=/var/lib/thanos-receive/hashrings.json
        env:
        - name: NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: quay.io/thanos/thanos:master-2020-02-13-adfef4b5
        livenessProbe:
          failureThreshold: 8
          httpGet:
            path: /-/healthy
            port: 10902
            scheme: HTTP
          periodSeconds: 30
        name: thanos-receive
        ports:
        - containerPort: 10901
          name: grpc
        - containerPort: 10902
          name: http
        - containerPort: 19291
          name: remote-write
        readinessProbe:
          failureThreshold: 20
          httpGet:
            path: /-/ready
            port: 10902
            scheme: HTTP
          periodSeconds: 5
        terminationMessagePolicy: FallbackToLogsOnError
        volumeMounts:
        - mountPath: /var/thanos/receive
          name: data
          readOnly: false
        - mountPath: /var/lib/thanos-receive
          name: hashring-config
      terminationGracePeriodSeconds: 120
      volumes:
      - emptyDir: {}
        name: data
      - configMap:
          name: benchmark-thanos-receive-controller-tenants-generated
        name: hashring-config
  volumeClaimTemplates: null
