---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: blackbox-exporter
spec:
  selector:
    matchLabels:
      app: blackbox-exporter
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  template:
    metadata:
      labels:
        app: blackbox-exporter
    spec:
      serviceAccountName: default
      terminationGracePeriodSeconds: 5
      securityContext:
        fsGroup: 1000
        runAsGroup: 1000
        runAsNonRoot: true
        runAsUser: 1000
      containers:
      - name: blackbox-exporter
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
              - all
          privileged: false
          readOnlyRootFilesystem: true
        image: quay.io/prometheus/blackbox-exporter:v0.22.0
        resources:
          requests:
            cpu: 250m
            memory: 512Mi
            ephemeral-storage: 1Gi
          limits:
            cpu: 250m
            memory: 512Mi
            ephemeral-storage: 1Gi
        ports:
        - name: metrics
          containerPort: 9115
          protocol: TCP
