-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Unit tests for custom volumes and volume mounts
- Loading branch information
1 parent
c68d425
commit 20476aa
Showing
2 changed files
with
248 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
apiVersion: ray.io/v1 | ||
kind: RayCluster | ||
metadata: | ||
labels: | ||
controller-tools.k8s.io: '1.0' | ||
kueue.x-k8s.io/queue-name: local-queue-default | ||
name: unit-test-volume-cluster | ||
namespace: opendatahub | ||
spec: | ||
autoscalerOptions: | ||
idleTimeoutSeconds: 60 | ||
imagePullPolicy: Always | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 512Mi | ||
requests: | ||
cpu: 500m | ||
memory: 512Mi | ||
upscalingMode: Default | ||
enableInTreeAutoscaling: false | ||
headGroupSpec: | ||
enableIngress: false | ||
rayStartParams: | ||
block: 'true' | ||
dashboard-host: 0.0.0.0 | ||
num-gpus: '0' | ||
serviceType: ClusterIP | ||
template: | ||
spec: | ||
containers: | ||
- image: quay.io/project-codeflare/ray:latest-py39-cu118 | ||
imagePullPolicy: Always | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -c | ||
- ray stop | ||
name: ray-head | ||
ports: | ||
- containerPort: 6379 | ||
name: gcs | ||
- containerPort: 8265 | ||
name: dashboard | ||
- containerPort: 10001 | ||
name: client | ||
resources: | ||
limits: | ||
cpu: 2 | ||
memory: 8G | ||
nvidia.com/gpu: 0 | ||
requests: | ||
cpu: 2 | ||
memory: 8G | ||
nvidia.com/gpu: 0 | ||
volumeMounts: | ||
- mountPath: /etc/pki/tls/certs/odh-trusted-ca-bundle.crt | ||
name: odh-trusted-ca-cert | ||
subPath: odh-trusted-ca-bundle.crt | ||
- mountPath: /etc/ssl/certs/odh-trusted-ca-bundle.crt | ||
name: odh-trusted-ca-cert | ||
subPath: odh-trusted-ca-bundle.crt | ||
- mountPath: /etc/pki/tls/certs/odh-ca-bundle.crt | ||
name: odh-ca-cert | ||
subPath: odh-ca-bundle.crt | ||
- mountPath: /etc/ssl/certs/odh-ca-bundle.crt | ||
name: odh-ca-cert | ||
subPath: odh-ca-bundle.crt | ||
- mountPath: /home/ray/test1 | ||
name: test | ||
- mountPath: /home/ray/test2 | ||
name: test2 | ||
- mountPath: /home/ray/test2 | ||
name: test3 | ||
imagePullSecrets: [] | ||
volumes: | ||
- configMap: | ||
items: | ||
- key: ca-bundle.crt | ||
path: odh-trusted-ca-bundle.crt | ||
name: odh-trusted-ca-bundle | ||
optional: true | ||
name: odh-trusted-ca-cert | ||
- configMap: | ||
items: | ||
- key: odh-ca-bundle.crt | ||
path: odh-ca-bundle.crt | ||
name: odh-trusted-ca-bundle | ||
optional: true | ||
name: odh-ca-cert | ||
- emptyDir: | ||
sizeLimit: 500Gi | ||
name: test | ||
- configMap: | ||
items: | ||
- key: test | ||
path: /home/ray/test2/data.txt | ||
name: config-map-test | ||
name: test2 | ||
- name: test3 | ||
secret: | ||
secretName: test-secret | ||
rayVersion: 2.7.0 | ||
workerGroupSpecs: | ||
- groupName: small-group-unit-test-volume-cluster | ||
maxReplicas: 1 | ||
minReplicas: 1 | ||
rayStartParams: | ||
block: 'true' | ||
num-gpus: '0' | ||
replicas: 1 | ||
template: | ||
metadata: | ||
annotations: | ||
key: value | ||
labels: | ||
key: value | ||
spec: | ||
containers: | ||
- image: quay.io/project-codeflare/ray:latest-py39-cu118 | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -c | ||
- ray stop | ||
name: machine-learning | ||
resources: | ||
limits: | ||
cpu: 1 | ||
memory: 2G | ||
nvidia.com/gpu: 0 | ||
requests: | ||
cpu: 1 | ||
memory: 2G | ||
nvidia.com/gpu: 0 | ||
volumeMounts: | ||
- mountPath: /etc/pki/tls/certs/odh-trusted-ca-bundle.crt | ||
name: odh-trusted-ca-cert | ||
subPath: odh-trusted-ca-bundle.crt | ||
- mountPath: /etc/ssl/certs/odh-trusted-ca-bundle.crt | ||
name: odh-trusted-ca-cert | ||
subPath: odh-trusted-ca-bundle.crt | ||
- mountPath: /etc/pki/tls/certs/odh-ca-bundle.crt | ||
name: odh-ca-cert | ||
subPath: odh-ca-bundle.crt | ||
- mountPath: /etc/ssl/certs/odh-ca-bundle.crt | ||
name: odh-ca-cert | ||
subPath: odh-ca-bundle.crt | ||
- mountPath: /home/ray/test1 | ||
name: test | ||
- mountPath: /home/ray/test2 | ||
name: test2 | ||
- mountPath: /home/ray/test2 | ||
name: test3 | ||
imagePullSecrets: [] | ||
volumes: | ||
- configMap: | ||
items: | ||
- key: ca-bundle.crt | ||
path: odh-trusted-ca-bundle.crt | ||
name: odh-trusted-ca-bundle | ||
optional: true | ||
name: odh-trusted-ca-cert | ||
- configMap: | ||
items: | ||
- key: odh-ca-bundle.crt | ||
path: odh-ca-bundle.crt | ||
name: odh-trusted-ca-bundle | ||
optional: true | ||
name: odh-ca-cert | ||
- emptyDir: | ||
sizeLimit: 500Gi | ||
name: test | ||
- configMap: | ||
items: | ||
- key: test | ||
path: /home/ray/test2/data.txt | ||
name: config-map-test | ||
name: test2 | ||
- name: test3 | ||
secret: | ||
secretName: test-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters