Skip to content

Instantly share code, notes, and snippets.

@alosadagrande
Created October 28, 2021 11:37
Show Gist options
  • Save alosadagrande/5ca302915cabf66b63a1668b57c8eb37 to your computer and use it in GitHub Desktop.
Save alosadagrande/5ca302915cabf66b63a1668b57c8eb37 to your computer and use it in GitHub Desktop.
apiVersion: v1
items:
- apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
annotations:
k8s.v1.cni.cncf.io/resourceName: openshift.io/xxv710_1
name: sriov-network
namespace: vfio-scc
spec:
config: '{ "cniVersion":"0.3.1", "name":"test", "type":"sriov", "spoofChk":"off", "vlan":0,"vlanQoS":0,"ipam":{"type":"dhcp"}
}'
status: {}
kind: List
metadata:
resourceVersion: ""
selfLink: ""
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: testpmd
app.kubernetes.io/component: testpmd
app.kubernetes.io/instance: testpmd
name: testpmd
namespace: vfio-scc
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: testpmd
template:
metadata:
labels:
app: testpmd
annotations:
k8s.v1.cni.cncf.io/networks: |
[
{
"name": "sriov-network",
"ips": ["10.19.16.102/23"]
}
]
spec:
serviceAccountName: default
securityContext:
runAsUser: 0
containers:
- image: quay.io/alosadag/testpmd:tekton
command:
- /bin/bash
- -c
- sleep INF
securityContext:
runAsUser: 0
capabilities:
add: ["IPC_LOCK"]
imagePullPolicy: Always
env:
- name: RUN_TYPE
value: "testpmd"
name: testpmd
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
resources:
limits:
cpu: "4"
hugepages-1Gi: 4Gi
memory: 1000Mi
requests:
cpu: "4"
hugepages-1Gi: 4Gi
memory: 1000Mi
volumeMounts:
- mountPath: /mnt/huge
name: hugepage
dnsPolicy: ClusterFirst
volumes:
- name: hugepage
emptyDir:
medium: HugePages
restartPolicy: Always
test: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment