For k8s, use provisioner-managed volumes when an absolute host path is not specified. #741

Merged
telackey merged 8 commits from telackey/autopv into main 2024-02-14 21:45:03 +00:00
Showing only changes of commit 063effeab9 - Show all commits

View File

@ -421,7 +421,7 @@ def _create_deployment_file(deployment_dir: Path):
output_file.write(f"{constants.cluster_id_key}: {cluster}\n")
def _check_volumes(spec):
def _check_volume_definitions(spec):
if spec.is_kubernetes_deployment():
for volume_name, volume_path in spec.get_volumes().items():
if volume_path:
@ -448,7 +448,7 @@ def create(ctx, spec_file, deployment_dir, network_dir, initial_peers):
# call it from other commands, bypassing the click decoration stuff
def create_operation(deployment_command_context, spec_file, deployment_dir, network_dir, initial_peers):
parsed_spec = Spec(os.path.abspath(spec_file), get_parsed_deployment_spec(spec_file))
_check_volumes(parsed_spec)
_check_volume_definitions(parsed_spec)
stack_name = parsed_spec["stack"]
deployment_type = parsed_spec[constants.deploy_to_key]
stack_file = get_stack_file_path(stack_name)