apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: networkdaemon
  namespace: virtualrouter
  labels:
    app: daemon
spec:
  selector:
    matchLabels:
      name: networkdaemon
  template:
    metadata:
      labels:
        name: networkdaemon
    spec:
      serviceAccount: virtualrouter-controller-sa
      hostNetwork: true
      hostPID: true
      containers:
      - name: networkdaemon
        # image: tmaxcloudck/virtualrouter-daemon:v0.1.0
        image: 10.0.0.4:5000/virtualrouter-daemon:v0.1.1
        imagePullPolicy: Always
        env:
        - name: nodeName
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        # - name: internalCIDR
        #   value: "10.0.0.0/24"
        # - name: externalCIDR
        #   value: "192.168.8.0/24"
        securityContext:
          capabilities:
            add:
            - '*'
            - NET_RAW
            - NET_ADMIN
          privileged: true
        volumeMounts:
        - name: criosock
          mountPath: /var/run/crio/crio.sock
      volumes:
      - name: criosock
        hostPath:
          path: /var/run/crio/crio.sock 