forked from dmoessne/reproducer-RHEL46814
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvlan104-sts-with-sriov-static-req-limit.yaml
45 lines (45 loc) · 1.2 KB
/
vlan104-sts-with-sriov-static-req-limit.yaml
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
# oc new-project sriov-test
# oc create sa priviledged-sa
# oc adm policy add-scc-to-user privileged -z priviledged-sa
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: po-vlan104
namespace: sriov-test
labels:
k8s-app: po-vlan104
spec:
replicas: 1
selector:
matchLabels:
app: po-vlan104
template:
metadata:
annotations:
k8s.v1.cni.cncf.io/networks: vlan104@vlan104
name: po-vlan104
labels:
app: po-vlan104
spec:
securityContext:
type: privileged
serviceAccount: priviledged-sa
containers:
- name: po-vlan104
image: quay.io/dmoessne/94-ncat-tools:0.2
command: ["/bin/sh", "-c"]
args:
- |
ip link add link vlan104 name mcplane type vlan egress-qos-map 1:1 2:2 3:3 4:4 5:5 6:6 7:7 id 104
ip link set mcplane mtu 1500
ip link set mcplane up
ip addr add 192.168.104.170/24 dev mcplane
/start_nc.sh
resources:
limits:
openshift.io/sriov_netdevice_1: 1
requests:
openshift.io/sriov_netdevice_1: 1
securityContext:
runAsUser: 0
privileged: true