---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: route-override
  namespace: kube-system
  labels:
    tier: node
    app: route-override
spec:
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        tier: node
        app: route-override
    spec:
      nodeSelector:
        beta.kubernetes.io/arch: amd64
      tolerations:
      - operator: Exists
        effect: NoSchedule
      containers:
      - name: route-override
        image: nfvpe/cni-route-override:latest
        command: ["/bin/sh"]
        args:
          - "-c"
          - "cp -f /route-override /host/opt/cni/bin/; sleep 1000000000000"
        resources:
          requests:
            cpu: "100m"
            memory: "50Mi"
          limits:
            cpu: "100m"
            memory: "50Mi"
        securityContext:
          privileged: true
        volumeMounts:
        - name: cnibin
          mountPath: /host/opt/cni/bin
      volumes:
        - name: cnibin
          hostPath:
            path: /opt/cni/bin