Skip to content

Commit 2af7f5b

Browse files
committed
Added optional kueue parameter
1 parent cc9286f commit 2af7f5b

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/codeflare_sdk/cluster/cluster.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ 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+
kueue = self.config.kueue
155156
return generate_appwrapper(
156157
name=name,
157158
namespace=namespace,
@@ -172,6 +173,7 @@ def create_app_wrapper(self):
172173
write_to_file=write_to_file,
173174
local_queue=local_queue,
174175
labels=labels,
176+
kueue=kueue,
175177
)
176178

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

src/codeflare_sdk/cluster/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class ClusterConfiguration:
6060
write_to_file: bool = False
6161
verify_tls: bool = True
6262
labels: dict = field(default_factory=dict)
63+
kueue: bool = True
6364

6465
def __post_init__(self):
6566
if not self.verify_tls:

src/codeflare_sdk/utils/generate_yaml.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ def generate_appwrapper(
294294
write_to_file: bool,
295295
local_queue: Optional[str],
296296
labels,
297+
kueue: bool,
297298
):
298299
cluster_yaml = read_template(template)
299300
appwrapper_name, cluster_name = gen_names(name)
@@ -323,7 +324,8 @@ def generate_appwrapper(
323324
else cluster_yaml
324325
)
325326

326-
add_queue_label(user_yaml, namespace, local_queue)
327+
if kueue:
328+
add_queue_label(user_yaml, namespace, local_queue)
327329

328330
if write_to_file:
329331
directory_path = os.path.expanduser("~/.codeflare/resources/")

0 commit comments

Comments
 (0)