apiVersion: apps/v1
kind: Deployment
metadata:
  name: blackbox
  labels:
    app: blackbox
spec:
  replicas: 1
  revisionHistoryLimit: 1
  selector:
    matchLabels:
      app: blackbox
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1
  template:
    metadata:
      labels:
        app: blackbox
    spec:
      containers:
        - name: blackbox
          image: prom/blackbox-exporter:v0.21.0
          command: ["blackbox_exporter"]
          args: 
            - "--config.file=/class/blackbox.yml"
          resources:
            requests:
              memory: "128Mi"
              cpu: "100m"
          volumeMounts:
            - name: blackbox-config
              mountPath: /class
          livenessProbe:
            httpGet:
              path: /health
              port: blackbox-http
          ports:
            - name: blackbox-http
              containerPort: 9115
      volumes:
        - name: blackbox-config
          hostPath:
            path: /root
            type: Directory