Skip to content

Commit 1f825d6

Browse files
Revert "Added custom Volumes and Volume Mounts support"
This reverts commit c68d425.
1 parent 8bfcfb1 commit 1f825d6

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

src/codeflare_sdk/cluster/cluster.py

-4
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ def create_app_wrapper(self):
152152
write_to_file = self.config.write_to_file
153153
local_queue = self.config.local_queue
154154
labels = self.config.labels
155-
volumes = self.config.volumes
156-
volume_mounts = self.config.volume_mounts
157155
return generate_appwrapper(
158156
name=name,
159157
namespace=namespace,
@@ -174,8 +172,6 @@ def create_app_wrapper(self):
174172
write_to_file=write_to_file,
175173
local_queue=local_queue,
176174
labels=labels,
177-
volumes=volumes,
178-
volume_mounts=volume_mounts,
179175
)
180176

181177
# creates a new cluster with the provided or default spec

src/codeflare_sdk/cluster/config.py

-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ class ClusterConfiguration:
5353
write_to_file: bool = False
5454
verify_tls: bool = True
5555
labels: dict = field(default_factory=dict)
56-
volumes: list = field(default_factory=list)
57-
volume_mounts: list = field(default_factory=list)
5856

5957
def __post_init__(self):
6058
if not self.verify_tls:

src/codeflare_sdk/utils/generate_yaml.py

-22
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,6 @@ def update_image_pull_secrets(spec, image_pull_secrets):
9696
]
9797

9898

99-
def update_volume_mounts(spec, volume_mounts: list):
100-
containers = spec.get("containers")
101-
for volume_mount in volume_mounts:
102-
for container in containers:
103-
volumeMount = client.ApiClient().sanitize_for_serialization(volume_mount)
104-
container["volumeMounts"].append(volumeMount)
105-
106-
107-
def update_volumes(spec, volumes: list):
108-
for volume in volumes:
109-
new_volume = client.ApiClient().sanitize_for_serialization(volume)
110-
spec["volumes"].append(new_volume)
111-
112-
11399
def update_env(spec, env):
114100
containers = spec.get("containers")
115101
for container in containers:
@@ -150,8 +136,6 @@ def update_nodes(
150136
head_cpus,
151137
head_memory,
152138
head_gpus,
153-
volumes,
154-
volume_mounts,
155139
):
156140
head = cluster_yaml.get("spec").get("headGroupSpec")
157141
head["rayStartParams"]["num-gpus"] = str(int(head_gpus))
@@ -166,8 +150,6 @@ def update_nodes(
166150

167151
for comp in [head, worker]:
168152
spec = comp.get("template").get("spec")
169-
update_volume_mounts(spec, volume_mounts)
170-
update_volumes(spec, volumes)
171153
update_image_pull_secrets(spec, image_pull_secrets)
172154
update_image(spec, image)
173155
update_env(spec, env)
@@ -298,8 +280,6 @@ def generate_appwrapper(
298280
write_to_file: bool,
299281
local_queue: Optional[str],
300282
labels,
301-
volumes: list[client.V1Volume],
302-
volume_mounts: list[client.V1VolumeMount],
303283
):
304284
cluster_yaml = read_template(template)
305285
appwrapper_name, cluster_name = gen_names(name)
@@ -319,8 +299,6 @@ def generate_appwrapper(
319299
head_cpus,
320300
head_memory,
321301
head_gpus,
322-
volumes,
323-
volume_mounts,
324302
)
325303
augment_labels(cluster_yaml, labels)
326304
notebook_annotations(cluster_yaml)

0 commit comments

Comments
 (0)