Skip to content

Commit

Permalink
Add warning if Kueue CRDs not installed on cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
oksanabaza committed May 10, 2024
1 parent 9b49b59 commit 8c0d5de
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/codeflare_sdk/utils/generate_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ def write_components(
os.makedirs(directory_path)

components = user_yaml.get("spec", "resources")["resources"].get("GenericItems")
if local_queue is None:
print(
"Kueue is not installed or won't be used because the absence of CRDs may lack the necessary functionality."
)
return
open(output_file_name, "w").close()
lq_name = local_queue or get_default_kueue_name(namespace)
cluster_labels = labels
Expand Down Expand Up @@ -355,6 +360,11 @@ def load_components(
components = user_yaml.get("spec", "resources")["resources"].get("GenericItems")
lq_name = local_queue or get_default_kueue_name(namespace)
cluster_labels = labels
if local_queue is None:
print(
"Kueue is not installed or won't be used because the absence of CRDs may lack the necessary functionality."
)
return
for component in components:
if "generictemplate" in component:
if (
Expand Down

0 comments on commit 8c0d5de

Please sign in to comment.