Skip to content

Commit 5ca6cef

Browse files
committed
Introduce per-vendor vsp yaml
Signed-off-by: Balazs Nemeth <[email protected]>
1 parent d0c3ec3 commit 5ca6cef

18 files changed

+264
-177
lines changed

config/rbac/role.yaml

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,18 @@ rules:
2222
- persistentvolumeclaims
2323
verbs:
2424
- '*'
25-
- create
26-
- delete
27-
- get
28-
- list
29-
- patch
30-
- update
31-
- watch
3225
- apiGroups:
3326
- ""
3427
resources:
3528
- persistentvolumes
3629
verbs:
3730
- '*'
38-
- create
39-
- delete
40-
- get
41-
- list
42-
- patch
43-
- update
44-
- watch
4531
- apiGroups:
4632
- ""
4733
resources:
4834
- pods
4935
verbs:
5036
- '*'
51-
- create
52-
- delete
53-
- get
54-
- list
55-
- patch
56-
- update
57-
- watch
5837
- apiGroups:
5938
- ""
6039
resources:
@@ -79,13 +58,6 @@ rules:
7958
- services
8059
verbs:
8160
- '*'
82-
- create
83-
- delete
84-
- get
85-
- list
86-
- patch
87-
- update
88-
- watch
8961
- apiGroups:
9062
- admissionregistration.k8s.io
9163
resources:
@@ -125,9 +97,9 @@ rules:
12597
- update
12698
- watch
12799
- apiGroups:
128-
- config.openshift.io
100+
- apps
129101
resources:
130-
- dataprocessingunits
102+
- replicasets
131103
verbs:
132104
- create
133105
- delete
@@ -136,20 +108,6 @@ rules:
136108
- patch
137109
- update
138110
- watch
139-
- apiGroups:
140-
- config.openshift.io
141-
resources:
142-
- dataprocessingunits/finalizers
143-
verbs:
144-
- update
145-
- apiGroups:
146-
- config.openshift.io
147-
resources:
148-
- dataprocessingunits/status
149-
verbs:
150-
- get
151-
- patch
152-
- update
153111
- apiGroups:
154112
- config.openshift.io
155113
resources:

internal/controller/bindata/vsp/02.vsp_role.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: {{.VspName}}
5+
namespace: {{.Namespace}}
6+
labels:
7+
app: vsp
8+
dpu-name: {{.DpuName}}
9+
spec:
10+
nodeName: {{.NodeName}}
11+
nodeSelector:
12+
kubernetes.io/hostname: {{.NodeName}}
13+
hostNetwork: true
14+
hostPID: true
15+
serviceAccountName: vsp-sa
16+
terminationGracePeriodSeconds: 180
17+
restartPolicy: Always
18+
containers:
19+
- name: vsp
20+
image: {{.IntelVspImage}}
21+
imagePullPolicy: {{.ImagePullPolicy}}
22+
securityContext:
23+
privileged: true
24+
runAsUser: 0
25+
command: ["/ipuplugin"]
26+
args: ["-v=debug", "--p4rtName=vsp-p4-service.{{.Namespace}}.svc.cluster.local", "--p4Image={{.IntelVspP4Image}}"]
27+
volumeMounts:
28+
- mountPath: /host
29+
mountPropagation: Bidirectional
30+
name: host-root
31+
- mountPath: /var/run/
32+
name: vendor-plugin-sock
33+
- mountPath: /opt/p4/p4-cp-nws/var
34+
mountPropagation: Bidirectional
35+
name: host-opt
36+
- mountPath: /proc
37+
mountPropagation: Bidirectional
38+
name: host-proc
39+
dnsPolicy: ClusterFirstWithHostNet
40+
volumes:
41+
- hostPath:
42+
path: /proc
43+
type: ""
44+
name: host-proc
45+
- hostPath:
46+
path: /opt/p4/p4-cp-nws/var
47+
type: ""
48+
name: host-opt
49+
- hostPath:
50+
path: /var/run/
51+
type: ""
52+
name: vendor-plugin-sock
53+
- hostPath:
54+
path: /
55+
type: ""
56+
name: host-root

internal/controller/bindata/vsp/99.vsp-pod.yaml renamed to internal/controller/bindata/vsp/marvell/99.vsp-pod.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ spec:
1717
restartPolicy: Always
1818
containers:
1919
- name: vsp
20-
image: {{.VendorSpecificPluginImage}}
20+
image: {{.MarvellVspImage}}
2121
imagePullPolicy: {{.ImagePullPolicy}}
2222
securityContext:
2323
privileged: true
2424
runAsUser: 0
25-
command: {{.Command}}
26-
args: {{.Args}}
25+
command: ["/vsp-mrvl"]
26+
args: []
2727
volumeMounts:
2828
- mountPath: /host
2929
mountPropagation: Bidirectional
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: {{.VspName}}
5+
namespace: {{.Namespace}}
6+
labels:
7+
app: vsp
8+
dpu-name: {{.DpuName}}
9+
spec:
10+
nodeName: {{.NodeName}}
11+
nodeSelector:
12+
kubernetes.io/hostname: {{.NodeName}}
13+
hostNetwork: true
14+
hostPID: true
15+
serviceAccountName: vsp-sa
16+
terminationGracePeriodSeconds: 180
17+
restartPolicy: Always
18+
containers:
19+
- name: vsp
20+
image: {{.IntelNetSecVspImage}}
21+
imagePullPolicy: {{.ImagePullPolicy}}
22+
securityContext:
23+
privileged: true
24+
runAsUser: 0
25+
command: ["/vsp-intel-netsec"]
26+
args: []
27+
volumeMounts:
28+
- mountPath: /host
29+
mountPropagation: Bidirectional
30+
name: host-root
31+
- mountPath: /var/run/
32+
name: vendor-plugin-sock
33+
- mountPath: /opt/p4/p4-cp-nws/var
34+
mountPropagation: Bidirectional
35+
name: host-opt
36+
- mountPath: /proc
37+
mountPropagation: Bidirectional
38+
name: host-proc
39+
dnsPolicy: ClusterFirstWithHostNet
40+
volumes:
41+
- hostPath:
42+
path: /proc
43+
type: ""
44+
name: host-proc
45+
- hostPath:
46+
path: /opt/p4/p4-cp-nws/var
47+
type: ""
48+
name: host-opt
49+
- hostPath:
50+
path: /var/run/
51+
type: ""
52+
name: vendor-plugin-sock
53+
- hostPath:
54+
path: /
55+
type: ""
56+
name: host-root
File renamed without changes.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: Role
3+
metadata:
4+
name: vsp-role
5+
namespace: {{.Namespace}}
6+
rules:
7+
- apiGroups:
8+
- security.openshift.io
9+
resourceNames:
10+
- privileged
11+
resources:
12+
- securitycontextconstraints
13+
verbs:
14+
- use
15+
- apiGroups:
16+
- ""
17+
resources:
18+
- pods
19+
- pods/status
20+
- serviceaccounts
21+
- services
22+
- configmaps
23+
- secrets
24+
verbs:
25+
- get
26+
- list
27+
- watch
28+
- create
29+
- update
30+
- delete
31+
- apiGroups:
32+
- apps
33+
resources:
34+
- daemonsets
35+
- deployments
36+
- replicasets
37+
verbs:
38+
- get
39+
- list
40+
- watch
41+
- create
42+
- update
43+
- delete
44+
- apiGroups:
45+
- rbac.authorization.k8s.io
46+
resources:
47+
- roles
48+
- rolebindings
49+
verbs:
50+
- get
51+
- list
52+
- watch
53+
- create
54+
- update
55+
- delete
File renamed without changes.

internal/controller/bindata/vsp/04.vsp_cluster_role.yaml renamed to internal/controller/bindata/vsp/shared/04.vsp_cluster_role.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ rules:
1212
- get
1313
- list
1414
- watch
15+
- create
16+
- update
17+
- delete
File renamed without changes.

0 commit comments

Comments
 (0)