fix(k8s): allow relative paths for kind deployment PVs

Kind deployments can use relative paths because the extraMounts config
resolves them to absolute paths on the host. The PV creation should not
skip relative paths for kind deployments since the PV will use the
/mnt/<volume> path inside the kind node.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
A. F. Dudley 2026-01-25 17:40:08 -05:00
parent 1eed7987e2
commit b04ce627f1
1 changed files with 7 additions and 5 deletions

View File

@ -352,11 +352,13 @@ class ClusterInfo:
continue continue
if not os.path.isabs(volume_path): if not os.path.isabs(volume_path):
print( # Kind deployments allow relative paths (resolved via extraMounts)
f"WARNING: {volume_name}:{volume_path} is not absolute, " if not self.spec.is_kind_deployment():
"cannot bind volume." print(
) f"WARNING: {volume_name}:{volume_path} is not absolute, "
continue "cannot bind volume."
)
continue
if self.spec.is_kind_deployment(): if self.spec.is_kind_deployment():
host_path = client.V1HostPathVolumeSource( host_path = client.V1HostPathVolumeSource(