Watch Aspire live streamsDocsTry Aspire

KubernetesPersistentVolumeResource

Handle
📦 Aspire.Hosting.Kubernetes v13.6.4-preview.1.26523.11
interface KubernetesPersistentVolumeResource
extends IResource,
IResourceWithParent,
KubernetesEnvironmentResource]] {
withAccessMode(accessMode: PersistentVolumeAccessMode): KubernetesPersistentVolumeResource;
withCapacity(capacity: string): KubernetesPersistentVolumeResource;
withCapacityParam(capacity: ParameterResource): KubernetesPersistentVolumeResource;
withStorageClass(storageClassName: string): KubernetesPersistentVolumeResource;
withStorageClassParam(storageClassName: ParameterResource): KubernetesPersistentVolumeResource;
withVolumeAnnotation(
key: string,
value: string): KubernetesPersistentVolumeResource;
withVolumeAnnotationParam(
key: string,
value: ParameterResource): KubernetesPersistentVolumeResource;
}

Methods

methodwithAccessModebuilder
Adds an access mode to a persistent volume
withAccessMode(accessMode: PersistentVolumeAccessMode): KubernetesPersistentVolumeResource
accessModePersistentVolumeAccessModeThe access mode to add.
KubernetesPersistentVolumeResource
methodwithCapacitybuilder
Sets the requested storage capacity for a persistent volume
withCapacity(capacity: string): KubernetesPersistentVolumeResource
capacitystringA Kubernetes quantity string (e.g. `"10Gi"`, `"500Mi"`).
KubernetesPersistentVolumeResource
methodwithCapacityParambuilder
Sets a parameterized storage capacity for a persistent volume
withCapacityParam(capacity: ParameterResource): KubernetesPersistentVolumeResource
capacityParameterResourceA parameter resource builder for the capacity quantity string.
KubernetesPersistentVolumeResource
methodwithStorageClassbuilder
Sets the storage class for a persistent volume
withStorageClass(storageClassName: string): KubernetesPersistentVolumeResource
storageClassNamestringThe storage class name (e.g. `"managed-csi"`, `"gp3"`).
KubernetesPersistentVolumeResource
Sets a parameterized storage class for a persistent volume
withStorageClassParam(storageClassName: ParameterResource): KubernetesPersistentVolumeResource
storageClassNameParameterResourceA parameter resource builder for the storage class name.
KubernetesPersistentVolumeResource
Adds a Kubernetes metadata annotation to a persistent volume
withVolumeAnnotation(
key: string,
value: string): KubernetesPersistentVolumeResource
keystringThe annotation key (e.g. `"volume.beta.kubernetes.io/storage-provisioner"`).
valuestringThe annotation value.
KubernetesPersistentVolumeResource
Adds a parameterized Kubernetes metadata annotation to a persistent volume
withVolumeAnnotationParam(
key: string,
value: ParameterResource): KubernetesPersistentVolumeResource
keystringThe annotation key.
valueParameterResourceA parameter resource builder for the annotation value.
KubernetesPersistentVolumeResource