apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: kube-network-monitor
  namespace: kube-system
  labels:
    app: kube-network-monitor
spec:
  selector:
    matchLabels:
      app: kube-network-monitor
  template:
    metadata:
      labels:
        app: kube-network-monitor
    spec:
      serviceAccountName: kube-network-monitor
      containers:
      - name: kube-network-monitor
        image: ghcr.io/airfocusio/kube-network-monitor:0.1.0-rc.2
        args:
          - --self-node-name=$(NODE_NAME)
        env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
        ports:
          - containerPort: 1024
            name: metrics
      tolerations:
        - effect: NoSchedule
          operator: Exists
        - effect: NoExecute
          operator: Exists
