apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: rmd-node-agent
  namespace: default
spec:
  selector:
    matchLabels:
      name: rmd-node-agent-pod
  template:
    metadata:
      labels:
        name: rmd-node-agent-pod
    spec:
      serviceAccountName: intel-rmd-node-agent
      containers:
        - image: 'intel-rmd-node-agent:latest'
          imagePullPolicy: IfNotPresent
          name: rmd-node-agent
          command: [ "/bin/bash", "-c", "--" ]
          args: [ "/usr/local/bin/intel-rmd-node-agent"]
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop: ["ALL"]
          volumeMounts:
            - mountPath: /var/lib/kubelet/pod-resources/
              name: kubesock
              readOnly: false
          env:
            - name: WATCH_NAMESPACE
              value: ''
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: intel-rmd-node-agent
      volumes:
        - name: kubesock
          hostPath:
            path: /var/lib/kubelet/pod-resources/
      nodeSelector:
        feature.node.kubernetes.io/cpu-rdt.RDTL3CA: 'true'
