@@ -309,11 +309,7 @@ def get_default_kueue_name(namespace: str):
309
309
310
310
311
311
def write_components (
312
- user_yaml : dict ,
313
- output_file_name : str ,
314
- namespace : str ,
315
- local_queue : Optional [str ],
316
- user_labels : dict ,
312
+ user_yaml : dict , output_file_name : str , namespace : str , local_queue : Optional [str ]
317
313
):
318
314
# Create the directory if it doesn't exist
319
315
directory_path = os .path .dirname (output_file_name )
@@ -335,8 +331,6 @@ def write_components(
335
331
]
336
332
labels = component ["generictemplate" ]["metadata" ]["labels" ]
337
333
labels .update ({"kueue.x-k8s.io/queue-name" : lq_name })
338
- for key in user_labels :
339
- labels .update ({key : user_labels [key ]})
340
334
outfile .write ("---\n " )
341
335
yaml .dump (
342
336
component ["generictemplate" ], outfile , default_flow_style = False
@@ -345,11 +339,7 @@ def write_components(
345
339
346
340
347
341
def load_components (
348
- user_yaml : dict ,
349
- name : str ,
350
- namespace : str ,
351
- local_queue : Optional [str ],
352
- user_labels : dict ,
342
+ user_yaml : dict , name : str , namespace : str , local_queue : Optional [str ]
353
343
):
354
344
component_list = []
355
345
components = user_yaml .get ("spec" , "resources" )["resources" ].get ("GenericItems" )
@@ -365,8 +355,6 @@ def load_components(
365
355
]
366
356
labels = component ["generictemplate" ]["metadata" ]["labels" ]
367
357
labels .update ({"kueue.x-k8s.io/queue-name" : lq_name })
368
- for key in user_labels :
369
- labels .update ({key : user_labels [key ]})
370
358
component_list .append (component ["generictemplate" ])
371
359
372
360
resources = "---\n " + "---\n " .join (
@@ -407,7 +395,6 @@ def generate_appwrapper(
407
395
write_to_file : bool ,
408
396
verify_tls : bool ,
409
397
local_queue : Optional [str ],
410
- user_labels ,
411
398
):
412
399
user_yaml = read_template (template )
413
400
appwrapper_name , cluster_name = gen_names (name )
@@ -459,13 +446,11 @@ def generate_appwrapper(
459
446
if mcad :
460
447
write_user_appwrapper (user_yaml , outfile )
461
448
else :
462
- write_components (user_yaml , outfile , namespace , local_queue , user_labels )
449
+ write_components (user_yaml , outfile , namespace , local_queue )
463
450
return outfile
464
451
else :
465
452
if mcad :
466
453
user_yaml = load_appwrapper (user_yaml , name )
467
454
else :
468
- user_yaml = load_components (
469
- user_yaml , name , namespace , local_queue , user_labels
470
- )
455
+ user_yaml = load_components (user_yaml , name , namespace , local_queue )
471
456
return user_yaml
0 commit comments