apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: apcupsd-exporter
  namespace: monitor
spec:
  selector:
    matchLabels:
      name: apcupsd-exporter
  template:
    metadata:
      labels:
        name: apcupsd-exporter
    spec:
      containers:
      - name: apcupsd-exporter
        image: harbor.default.svc.cluster.local/linnil1/apcupsd_exporter
        imagePullPolicy: Always
        ports:
        - containerPort: 9162
          protocol: TCP
        env:
        - name: APCUPSDADDR
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
