Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/xpk/commands/kind.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
AcceleratorType,
)
from ..utils.console import (xpk_exit, xpk_print)
from ..utils.validation import validate_dependencies, should_validate_dependencies
from ..utils.validation import validate_dependencies_list, SystemDependency, should_validate_dependencies


def cluster_create(args) -> None:
Expand All @@ -48,7 +48,11 @@ def cluster_create(args) -> None:
0 if successful and 1 otherwise.
"""
if should_validate_dependencies(args):
validate_dependencies()
validate_dependencies_list([
SystemDependency.KUBECTL,
SystemDependency.KJOB,
SystemDependency.GCLOUD,
])
xpk_print(f'Starting cluster create for cluster {args.cluster}:', flush=True)

create_cluster_command_code = create_cluster_if_necessary(args)
Expand Down Expand Up @@ -127,7 +131,7 @@ def cluster_delete(args) -> None:
0 if successful and 1 otherwise.
"""
if should_validate_dependencies(args):
validate_dependencies()
validate_dependencies_list([SystemDependency.GCLOUD])
xpk_print(f'Starting cluster delete for cluster: {args.cluster}', flush=True)

run_kind_cluster_delete_command_code = run_kind_cluster_delete_command(args)
Expand All @@ -144,7 +148,7 @@ def cluster_list(args) -> None:
0 if successful and 1 otherwise.
"""
if should_validate_dependencies(args):
validate_dependencies()
validate_dependencies_list([SystemDependency.GCLOUD])
if run_kind_clusters_list_command():
xpk_exit(1)
xpk_exit(0)
Expand Down
Loading