Skip to content

Commit 886d630

Browse files
authored
add scc that forces ray pods to run as user 1000 (#56)
Signed-off-by: Kevin <[email protected]>
1 parent e6948e9 commit 886d630

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

ray/operator/base/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ resources:
2222
- ../rbac
2323
- ../manager
2424
- ../prometheus
25+
- ../scc
2526

2627
images:
2728
- name: kuberay/operator

ray/operator/base/params.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
varReference:
22
- path: subjects[]/namespace
33
kind: ClusterRoleBinding
4+
- path: users[]
5+
kind: SecurityContextConstraints
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resources:
2+
- ray_operator_scc.yaml
3+
4+
commonLabels:
5+
app.kubernetes.io/name: kuberay
6+
app.kubernetes.io/component: kuberay-operator
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
kind: SecurityContextConstraints
2+
apiVersion: security.openshift.io/v1
3+
metadata:
4+
name: run-as-ray-user
5+
seLinuxContext:
6+
type: MustRunAs
7+
runAsUser:
8+
type: MustRunAs
9+
uid: 1000
10+
users:
11+
- 'system:serviceaccount:$(namespace):kuberay-operator'

0 commit comments

Comments
 (0)