Skip to content

Commit

Permalink
Bump Kueue version to v0.8.1 (#196)
Browse files Browse the repository at this point in the history
* Bump Kueue version to v0.8.1

* Improve Kueue logging and naming

---------

Co-authored-by: Victor Barr <vbarr@google.com>
  • Loading branch information
PBundyra and Obliviour authored Oct 7, 2024
1 parent fba388f commit 59c555a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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
13 changes: 7 additions & 6 deletions src/xpk/core/kueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
SystemCharacteristics,
)

KUEUE_VERSION = 'v0.8.1'
CLUSTER_QUEUE_NAME = 'cluster-queue'
LOCAL_QUEUE_NAME = 'multislice-queue'

Expand Down Expand Up @@ -150,7 +151,7 @@ def install_kueue_on_cluster(args) -> int:
"""
command = (
'kubectl apply --server-side --force-conflicts -f'
' https://github.com/kubernetes-sigs/kueue/releases/download/v0.6.1/manifests.yaml'
f' https://github.com/kubernetes-sigs/kueue/releases/download/{KUEUE_VERSION}/manifests.yaml'
)
task = 'Set Kueue On Cluster'
return_code = run_command_with_updates_retry(command, task, args)
Expand All @@ -159,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 @@ -219,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 @@ -232,8 +233,8 @@ 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'
' time.'
' Kueue Custom Resources need Kueue system to be ready which can take'
' some time.'
)
return_code = run_command_with_updates_retry(
command=command,
Expand Down

0 comments on commit 59c555a

Please sign in to comment.