apiVersion: v1
kind: Pod
metadata:
  name: cloud-network-function 
  namespace: default
  labels:
    app.kubernetes.io/name: cloud-native-network-function
    telemetry-policy: hardware-traits
  annotations:
    k8s.v1.cni.cncf.io/networks: '[
      {
        "name": "sriov-dpdk-net2000",
        "mac": "ca:fe:c0:ff:ee:00"
      },
      {
        "name": "sriov-dpdk-net2000",
        "mac": "ca:fe:c0:ff:ee:01"
      }
    ]' 
spec:
  containers:
  - name: testpmd-dpdk
    image: localhost:5000/testpmd 
    imagePullPolicy: Never
    securityContext:
            #privileged: true
      capabilities:
        add:
        - IPC_LOCK
    command: ["tail","-f","/dev/null"]
    #command: ["/usr/src/dpdk-stable-19.11.1/install/bin/testpmd", "--", "--tx-first","--eth-peer=0,ca:fe:c0:ff:ee:01", "--eth-peer=1,ca:fe:c0:ff:ee:01", "--forward-mode=mac", "--stats-period=10"]
    resources:
      requests:
        hugepages-1Gi: 2Gi
        memory: 2Gi
        cpu: 4
        intel.com/intel_sriov_dpdk: 2
      limits:
        hugepages-1Gi: 2Gi
        memory: 2Gi
        cpu: 4
        intel.com/intel_sriov_dpdk: 2
        telemetry/scheduling: 1
    volumeMounts:
    - mountPath: /hugepages
      name: hugepages
    - mountPath: /etc/testpmdconfig
      name: config
  volumes:
  - name: config
    hostPath:
      path: /etc/testpmdconfig
  - name: hugepages
    emptyDir:
      medium: HugePages
  restartPolicy: Never
