apiVersion: apps/v1
kind: DaemonSet
metadata:
  namespace: kube-system
  name: dhcp-daemon
  labels:
    environment: antrea-multus-demo
    app: dhcp-daemon
spec:
  selector:
    matchLabels:
      environment: antrea-multus-demo
      app: dhcp-daemon
  template:
    metadata:
      labels:
        environment: antrea-multus-demo
        app: dhcp-daemon
    spec:
      hostPID: true
      hostNetwork: true
      initContainers:
      - name: sock-cleanup
        image: ubuntu:20.04
        command: ["rm", "-f", "/run/cni/dhcp.sock"]
        volumeMounts:
        - name: run
          mountPath: /run
      containers:
      - name: dhcp-daemon
        securityContext:
          privileged: true
        image: antrea/cni-dhcp-daemon:latest
        imagePullPolicy: Always
        args: [""]
        volumeMounts:
        - name: run
          mountPath: /run
        - name: netns
          mountPath: /var/run/netns
      volumes:
      - hostPath:
          path: /run
        name: run
      - hostPath:
          path: /var/run/netns
        name: netns
      nodeSelector:
        kubernetes.io/os: linux
      priorityClassName: system-node-critical
      tolerations:
      - key: CriticalAddonsOnly
        operator: Exists
      - effect: NoSchedule
        operator: Exists
      - effect: NoExecute
        operator: Exists
