Skip to content

Commit 7305c70

Browse files
Pcidevices vgpu support (#204)
* changes for vgpu support * updated rbac permissions * mount file command from host to pod for local executor * cleanup empty spaces
1 parent 9b6d99b commit 7305c70

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

charts/harvester-pcidevices-controller/templates/daemonset.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,16 @@ spec:
4141
name: sys
4242
- mountPath: /host/proc
4343
name: proc
44+
- mountPath: /host/usr/lib
45+
name: host-lib
46+
- mountPath: /host/usr/bin/file
47+
name: host-file
48+
readOnly: true
4449
env:
50+
{{- if .Values.debug }}
51+
- name: DEBUG_LOGGING
52+
value: "true"
53+
{{- end }}
4554
- name: GHW_DISABLE_WARNINGS
4655
value: "1"
4756
- name: NODE_NAME
@@ -80,3 +89,11 @@ spec:
8089
path: /proc
8190
type: Directory
8291
name: proc
92+
- hostPath:
93+
path: /usr/lib/
94+
type: Directory
95+
name: host-lib
96+
- hostPath:
97+
path: /usr/bin/file
98+
type: File
99+
name: host-file

charts/harvester-pcidevices-controller/templates/serviceaccount.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ rules:
2525
resources: [ "namespaces" ]
2626
verbs: [ "get", "watch", "list" ]
2727
- apiGroups: [ "devices.harvesterhci.io" ]
28-
resources: [ "pcidevices", "pcidevices/status", "pcideviceclaims", "pcideviceclaims/status", "sriovnetworkdevices", "sriovnetworkdevices/status", "nodes" ]
28+
resources: [ "*" ]
2929
verbs: [ "get", "watch", "list", "update", "create", "delete"]
3030
- apiGroups: ["admissionregistration.k8s.io"]
3131
resources: ["mutatingwebhookconfigurations", "validatingwebhookconfigurations"]
@@ -45,6 +45,12 @@ rules:
4545
- apiGroups: ["coordination.k8s.io"]
4646
resources: ["leases"]
4747
verbs: [ "get", "list", "watch", "create", "update" ]
48+
- apiGroups: [ "" ]
49+
resources: [ "pods" ]
50+
verbs: [ "get", "watch", "list" ]
51+
- apiGroups: [ "" ]
52+
resources: [ "pods/exec" ]
53+
verbs: [ "create" ]
4854
---
4955
apiVersion: rbac.authorization.k8s.io/v1
5056
kind: ClusterRoleBinding
@@ -59,4 +65,4 @@ roleRef:
5965
subjects:
6066
- kind: ServiceAccount
6167
name: {{ include "harvester-pcidevices-controller.serviceAccountName" . }}
62-
namespace: harvester-system
68+
namespace: harvester-system

charts/harvester-pcidevices-controller/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ serviceAccount:
2626
podAnnotations: {}
2727

2828
podSecurityContext: {}
29-
# fsGroup: 2000
3029

3130
securityContext:
3231
privileged: true
@@ -35,7 +34,6 @@ service:
3534
type: ClusterIP
3635
port: 80
3736

38-
3937
resources:
4038
limits:
4139
cpu: 50m
@@ -44,11 +42,13 @@ resources:
4442
cpu: 20m
4543
memory: 200Mi
4644

47-
4845
nodeSelector: {}
4946

5047
tolerations:
5148
- key: node-role.kubernetes.io/master
5249
effect: NoSchedule
5350

5451
affinity: {}
52+
53+
# enable debug logging for pcidevices controller
54+
debug: false

0 commit comments

Comments
 (0)