Skip to content

Commit

Permalink
Improve Kueue logging and naming
Browse files Browse the repository at this point in the history
  • Loading branch information
PBundyra committed Oct 3, 2024
1 parent 5e0187b commit 5e6e12d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/xpk/commands/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
)
from ..core.kueue import (
cluster_preheat_yml,
enable_kueue_credentials,
install_kueue_crs,
install_kueue_on_cluster,
)
from ..core.nap import enable_autoprovisioning_on_cluster
Expand Down Expand Up @@ -157,8 +157,8 @@ def cluster_create(args) -> None:
if return_code != 0:
xpk_exit(return_code)

xpk_print('Enable Kueue Credentials')
enable_kueue_credentials_code = enable_kueue_credentials(
xpk_print('Install Kueue Custom Resources')
enable_kueue_credentials_code = install_kueue_crs(
args, system, autoprovisioning_config
)
if enable_kueue_credentials_code != 0:
Expand Down
8 changes: 4 additions & 4 deletions src/xpk/core/kueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ def install_kueue_on_cluster(args) -> int:
return return_code


def enable_kueue_credentials(
def install_kueue_crs(
args,
system: SystemCharacteristics,
autoprovisioning_config: AutoprovisioningConfig | None,
) -> int:
"""Enable Kueue credentials.
"""Install Kueue Custom Resources.
Args:
args: user provided arguments for running the command.
Expand Down Expand Up @@ -220,7 +220,7 @@ def enable_kueue_credentials(
command = f'kubectl apply -f {str(tmp.file.name)}'
# For kueue setup, we see a timeout error due to the webhook not
# being ready. Let's retry and wait a few seconds.
task = 'Applying Kueue Credentials'
task = 'Applying Kueue Custom Resources'
retry_attempts = 3
return_code = run_command_with_updates_retry(
command, task, args, num_retry_attempts=retry_attempts
Expand All @@ -233,7 +233,7 @@ def enable_kueue_credentials(
xpk_print(
f'{task} still not successful. Retrying {retry_attempts} more timeswith'
f' increased wait time of {retry_wait_seconds} seconds between tries.'
' Kueue Credentials need Kueue system to be ready which can take some'
' Kueue Custom Resources need Kueue system to be ready which can take some'
' time.'
)
return_code = run_command_with_updates_retry(
Expand Down

0 comments on commit 5e6e12d

Please sign in to comment.