Skip to content

Commit 850b850

Browse files
sutaakaropenshift-merge-robot
authored andcommitted
Add note to apply SecurityContextConstraints for OpenShift e2e tests
1 parent b325fab commit 850b850

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,26 @@ The e2e tests can be executed locally by running the following commands:
4848
$ make setup-e2e
4949
```
5050

51+
[!NOTE]
52+
In OpenShift the KubeRay operator pod gets random user assigned. This user is then used to run Ray cluster.
53+
However the random user assigned by OpenShift doesn't have rights to store dataset downloaded as part of test execution, causing tests to fail.
54+
To prevent this failure on OpenShift user should enforce user 1000 for KubeRay and Ray cluster by creating this SCC in KubeRay operator namespace (replace the namespace placeholder):
55+
56+
```yaml
57+
kind: SecurityContextConstraints
58+
apiVersion: security.openshift.io/v1
59+
metadata:
60+
name: run-as-ray-user
61+
seLinuxContext:
62+
type: MustRunAs
63+
runAsUser:
64+
type: MustRunAs
65+
uid: 1000
66+
users:
67+
- 'system:serviceaccount:$(namespace):kuberay-operator'
68+
```
69+
70+
5171
4. In a separate terminal, run the e2e suite:
5272
5373
```bash

0 commit comments

Comments
 (0)