apiVersion: apps/v1
kind: Deployment
metadata:
  name: snmp-exporter
  namespace: monitor
spec:
  replicas: 1
  selector:
    matchLabels: &snmp-labels
      k8s-app: snmp-exporter
  template:
    metadata:
      labels: *snmp-labels
    spec:
      containers:
        - name: exporter
          image: prom/snmp-exporter:v0.15.0

          args:
            - "--config.file"
            - "/config/snmp.yml"

          ports:
            - name: http
              containerPort: 9116

          volumeMounts:
            - name: config
              mountPath: /config
              readOnly: true
      volumes:
        - name: config
          configMap:
            name: snmp-exporter