Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithKubernetesPersistentVolumeMount

Method
📦 Aspire.Hosting.Kubernetes v13.6.5-preview.1.26559.7
func (IComputeResource) WithKubernetesPersistentVolumeMount(
volume KubernetesPersistentVolumeResource,
mountPath string,
options ...*WithKubernetesPersistentVolumeMountOptions,
) IComputeResource

Signature

methodWithKubernetesPersistentVolumeMountbuilder
Binds a workload to a Kubernetes persistent volume and mounts it at a path
WithKubernetesPersistentVolumeMount(
volume KubernetesPersistentVolumeResource,
mountPath string,
options ...*WithKubernetesPersistentVolumeMountOptions,
) IComputeResource
volumeKubernetesPersistentVolumeResourceThe persistent volume resource to bind to.
mountPathstringThe path inside the deployed container where the volume is mounted.
options...*WithKubernetesPersistentVolumeMountOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithKubernetesPersistentVolumeMountOptions argument.

IsReadOnly*boolWhen true, mounts the deployed volume read-only.
Env*stringAn optional environment variable that receives the effective storage path.
IComputeResource

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types:

typeCSharpAppResource
typeContainerResource
typeDotnetToolResource
typeExecutableResource
typeKubernetesAspireDashboardResource
typeProjectResource