Skip to content

Commit

Permalink
RUN-4724 Support openshift (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
gshaibi authored Jul 13, 2022
1 parent f176b37 commit 635f12e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
29 changes: 29 additions & 0 deletions deploy/fake-gpu-operator/templates/device-plugin/ocp/rbac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{ if .Values.environment.openshift }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: nvidia-device-plugin
rules:
- apiGroups:
- security.openshift.io
resourceNames:
- privileged
resources:
- securitycontextconstraints
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: nvidia-device-plugin
subjects:
- kind: ServiceAccount
name: nvidia-device-plugin
namespace: "{{ .Release.Namespace }}"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: nvidia-device-plugin
---
{{ end }}
3 changes: 3 additions & 0 deletions deploy/fake-gpu-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
environment:
openshift: false

devicePlugin:
image:
pullPolicy: Always
Expand Down

0 comments on commit 635f12e

Please sign in to comment.