{lib, ...}: { name, capacity, namespace, labels, hostPath, }: {...}: { resource."kubernetes_manifest"."${name}-persistent-volume" = { manifest = { apiVersion = "v1"; kind = "PersistentVolume"; metadata = { inherit name labels; }; spec = { capacity.storage = capacity; claimRef = { inherit name namespace; }; volumeMode = "Filesystem"; accessModes = [ "ReadWriteOnce" ]; persistentVolumeReclaimPolicy = "Retain"; storageClassName = "hostpath"; hostPath.path = hostPath; }; }; }; resource."kubernetes_manifest"."${name}-persistent-volume-clain" = { manifest = { kind = "PersistentVolumeClaim"; apiVersion = "v1"; metadata = { inherit name namespace; }; spec = { volumeName = name; storageClassName = "hostpath"; accessModes = [ "ReadWriteOnce" ]; resources.requests.storage = capacity; }; }; }; }