---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: &app mikrotik-exporter
  namespace: monitoring
  labels:
    app.kubernetes.io/name: *app
    app.kubernetes.io/instance: *app
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: *app
      app.kubernetes.io/instance: *app
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: *app
        app.kubernetes.io/instance: *app
    spec:
      containers:
        - name: *app
          image: elraro/snmp_exporter_mikrotik:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 9116
          volumeMounts:
            - name: mikrotik-exporter-volume
              mountPath: /etc/mikrotik-exporter
          resources:
            requests:
              cpu: 100m
              memory: 50Mi
            limits:
              cpu: 200m
              memory: 200Mi
      restartPolicy: Always
      terminationGracePeriodSeconds: 60
      volumes:
        - name: mikrotik-exporter-volume
          emptyDir: {}
