withKubernetesPersistentVolumeMount

Method
📦 Aspire.Hosting.Kubernetes v17.0.0
interface ContainerResource {
// ... omitted for brevity
withKubernetesPersistentVolumeMount(
volume: KubernetesPersistentVolumeResource,
mountPath: string,
isReadOnly?: boolean,
env?: string): IComputeResource;
}

Signature

methodwithKubernetesPersistentVolumeMountbuilder
Binds a workload to a Kubernetes persistent volume and mounts it at a path
withKubernetesPersistentVolumeMount(
volume: KubernetesPersistentVolumeResource,
mountPath: string,
isReadOnly?: boolean,
env?: string): IComputeResource
volumeKubernetesPersistentVolumeResourceThe persistent volume resource to bind to.
mountPathstringThe path inside the deployed container where the volume is mounted.
isReadOnlybooleanoptional= FalseWhen true, mounts the deployed volume read-only.
envstringoptionalAn optional environment variable that receives the effective storage path.
IComputeResource

Applies to

This method applies to the following types: