apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: blackbox-exporter
  namespace: prometheus
  labels:
    k8s-app: blackbox-exporter
    kubernetes.io/cluster-service: "true"
    addonmanager.kubernetes.io/mode: Reconcile
    version: master
spec:
  serviceName: "blackbox-exporter"
  replicas: 1
  selector:
    matchLabels:
      k8s-app: blackbox-exporter
      version: master
  template:
    metadata:
      labels:
        k8s-app: blackbox-exporter
        version: master
    spec:
      priorityClassName: system-cluster-critical
      containers:
        - name: blackbox-exporter
          image: "harbor.freedom.org/prom/blackbox-exporter:master"
          imagePullPolicy: "Always"
          env:
            - name: TZ
              value: Asia/Shanghai
          args:
            - --config.file=/config/blackbox-exporter.yml
          ports:
            - containerPort: 9115
          readinessProbe:
            httpGet:
              path: /#/status
              port: 9115
            initialDelaySeconds: 30
            timeoutSeconds: 30
          volumeMounts:
            - name: blackbox-exporter-config
              mountPath: /config
          resources:
            limits:
              cpu: 1000m
              memory: 2048Mi
            requests:
              cpu: 10m
              memory: 50Mi
      volumes:
        - name: blackbox-exporter-config
          configMap:
            name: blackbox-exporter-config