---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: kube-rdma-cni-ds
  namespace: kube-system
  labels:
    tier: node
    app: rdma-cni
    name: rdma-cni
spec:
  selector:
    matchLabels:
      name: rdma-cni
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        tier: node
        app: rdma-cni
        name: rdma-cni
    spec:
      hostNetwork: true
      tolerations:
        - operator: Exists
          effect: NoSchedule
      containers:
        - name: rdma-cni
          image: mellanox/rdma-cni
          imagePullPolicy: IfNotPresent
          securityContext:
            privileged: true
          resources:
            requests:
              cpu: "100m"
              memory: "50Mi"
            limits:
              cpu: "100m"
              memory: "50Mi"
          volumeMounts:
            - name: cnibin
              mountPath: /host/opt/cni/bin
      volumes:
        - name: cnibin
          hostPath:
            path: /opt/cni/bin
