apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: exporter
    app.kubernetes.io/name: snmp-exporter
    app.kubernetes.io/version: 0.20.0
  name: snmp-exporter
  namespace: snmp
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: exporter
      app.kubernetes.io/name: snmp-exporter
  template:
    metadata:
      annotations:
        checksum.config/md5: d41d8cd98f00b204e9800998ecf8427e
      labels:
        app.kubernetes.io/component: exporter
        app.kubernetes.io/name: snmp-exporter
        app.kubernetes.io/version: 0.20.0
    spec:
      containers:
      - args:
        - --config.file=/config/snmp.yaml
        image: quay.io/prometheus/snmp-exporter:v0.20.0
        imagePullPolicy: IfNotPresent
        livenessProbe:
          httpGet:
            path: /health
            port: http
        name: snmp-exporter
        ports:
        - containerPort: 9116
          name: http
        readinessProbe:
          httpGet:
            path: /health
            port: http
        resources:
          limits:
            cpu: 20m
            memory: 50Mi
          requests:
            cpu: 3m
            memory: 20Mi
        securityContext:
          readOnlyRootFilesystem: true
          runAsNonRoot: true
          runAsUser: 1000
        volumeMounts:
        - mountPath: /config/snmp.yaml
          name: config
          subPath: snmp.yaml
      restartPolicy: Always
      serviceAccountName: snmp-exporter
      volumes:
      - configMap:
          name: snmp-exporter
        name: config
