---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: harvester-network-controller
  namespace: harvester-system
  labels:
    app.kubernetes.io/name: harvester-network-controller
    app.kubernetes.io/component: network
    app.kubernetes.io/version: 0.2.0
spec:
  selector:
    matchLabels:
      name: harvester-network-controller
  template:
    metadata:
      labels:
        name: harvester-network-controller
    spec:
      tolerations:
        # this toleration is to have the daemonset runnable on master nodes
        # remove it if your masters can't run pods
        - key: node-role.kubernetes.io/master
          effect: NoSchedule
      serviceAccountName: harvester-network-controller
      hostNetwork: true
      containers:
        - env:
          - name: NODENAME
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: spec.nodeName
          name: network
          image: rancher/harvester-network-controller:master-head
          imagePullPolicy: IfNotPresent
          command:
            - harvester-network-controller
          args:
            - agent
          securityContext:
            privileged: true
          volumeMounts:
          - mountPath: /dev
            name: dev
          - mountPath: /lib/modules
            name: modules
          resources:
            limits:
              memory: 100Mi
            requests:
              cpu: 10m
              memory: 50Mi
      volumes:
      - hostPath:
          path: /dev
          type: Directory
        name: dev
      - hostPath:
          path: /lib/modules
          type: Directory
        name: modules
