---
apiVersion: apps/v1
kind: Deployment

metadata:
  name: blackbox-exporter
  labels:
    app.kubernetes.io/name: blackbox-exporter
    app.kubernetes.io/component: server

spec:
  replicas: 1
  revisionHistoryLimit: 3

  strategy:
    type: Recreate

  selector:
    matchLabels:
      app.kubernetes.io/name: blackbox-exporter
      app.kubernetes.io/component: server

  template:
    metadata:
      labels:
        app.kubernetes.io/name: blackbox-exporter
        app.kubernetes.io/component: server

    spec:
      enableServiceLinks: false

      containers:
        - name: server
          image: blackbox-exporter
          imagePullPolicy: Always

          securityContext:
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            runAsUser: 1000

          ports:
            - name: http
              containerPort: 9115
              protocol: TCP

          resources:
            requests:
              cpu: "0.1"
              memory: "64Mi"
            limits:
              cpu: "1.0"
              memory: "256Mi"

          livenessProbe:
            httpGet:
              path: /health
              port: http

          readinessProbe:
            httpGet:
              path: /health
              port: http

          volumeMounts:
            - mountPath: /etc/blackbox_exporter
              name: config

      volumes:
        - name: config
          configMap:
            name: blackbox-exporter

...
