aboutsummaryrefslogtreecommitdiffstats
path: root/tools/k8s/reference-definitions/pod-defs/sriov/sriov-pod.yaml
blob: 2b5aff7a354486db0cb2d7bd30dd18fe05a1f706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
apiVersion: v1
kind: Pod
metadata:
  name: sriov-pod
  annotations:
    k8s.v1.cni.cncf.io/networks: sriov-net-a, sriov-net-b
spec:
  containers:
  - name: sriov
    image: dpdk-app-centos-numa1
    imagePullPolicy: Never
    securityContext:
      privileged: true
      capabilities:
        add: ["CAP_SYS_ADMIN"]
    volumeMounts:
    - mountPath: /etc/podnetinfo
      name: podnetinfo
      readOnly: false
    - mountPath: /dev/hugepages
      name: hugepage
    resources:
      requests:
        cpu: "6000m"
        intel.com/intel_sriov_dpdk_a: '1'
        intel.com/intel_sriov_dpdk_b: '1'
      limits:
        cpu: "6000m"
        hugepages-1Gi: 2Gi
        intel.com/intel_sriov_dpdk_a: '1'
        intel.com/intel_sriov_dpdk_b: '1'
    command: ["sleep", "infinity"]
#  nodeSelector:
#    vswitch: ovs
  volumes:
  - name: podnetinfo
    downwardAPI:
      items:
        - path: "labels"
          fieldRef:
            fieldPath: metadata.labels
        - path: "annotations"
          fieldRef:
            fieldPath: metadata.annotations
  - name: hugepage
    emptyDir:
      medium: HugePages