From c3853e4120920f9d5af33548a56e5bc79c46bdac Mon Sep 17 00:00:00 2001 From: David Boreham Date: Tue, 7 Nov 2023 17:24:20 -0700 Subject: [PATCH] Implement manual persistent volumes --- stack_orchestrator/deploy/k8s/cluster_info.py | 2 +- stack_orchestrator/deploy/k8s/helpers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stack_orchestrator/deploy/k8s/cluster_info.py b/stack_orchestrator/deploy/k8s/cluster_info.py index 20bd72b8..deb0859d 100644 --- a/stack_orchestrator/deploy/k8s/cluster_info.py +++ b/stack_orchestrator/deploy/k8s/cluster_info.py @@ -50,8 +50,8 @@ class ClusterInfo: print(f"Volumes: {volumes}") for volume_name in volumes: spec = client.V1PersistentVolumeClaimSpec( - storage_class_name="standard", access_modes=["ReadWriteOnce"], + storage_class_name="manual", resources=client.V1ResourceRequirements( requests={"storage": "2Gi"} ), diff --git a/stack_orchestrator/deploy/k8s/helpers.py b/stack_orchestrator/deploy/k8s/helpers.py index 36c067df..ad48957b 100644 --- a/stack_orchestrator/deploy/k8s/helpers.py +++ b/stack_orchestrator/deploy/k8s/helpers.py @@ -162,7 +162,7 @@ def _generate_kind_mounts(parsed_pod_files, deployment_dir): (volume_name, mount_path) = mount_string.split(":") volume_definitions.append( f" - hostPath: {_make_absolute_host_path(volume_host_path_map[volume_name], deployment_dir)}\n" - " containerPath: /var/local-path-provisioner" + f" containerPath: {get_node_pv_mount_path(volume_name)}" ) return ( "" if len(volume_definitions) == 0 else (