KubernetesPersistentVolumeResource

Handle
📦 Aspire.Hosting.Kubernetes v17.0.0
interface KubernetesPersistentVolumeResource
extends IResource,
IResourceWithParent,
KubernetesEnvironmentResource]] {
withAccessMode(accessMode: PersistentVolumeAccessMode): KubernetesPersistentVolumeResource;
withCapacity(capacity: string): KubernetesPersistentVolumeResource;
withCapacityParam(capacity: ParameterResource): KubernetesPersistentVolumeResource;
withConfiguration(configure: (obj: PersistentVolumeClaim) => Promise<void>): KubernetesPersistentVolumeResource;
withoutStorageClass(): KubernetesPersistentVolumeResource;
withPersistentVolumeName(persistentVolumeName: string): 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
methodwithConfigurationbuilder
Configures the generated persistent volume claim
withConfiguration(configure: (obj: PersistentVolumeClaim) => Promise<void>): KubernetesPersistentVolumeResource
configure(obj: PersistentVolumeClaim) => Promise<void>The action used to configure the generated persistent volume claim.
KubernetesPersistentVolumeResource
methodwithoutStorageClassbuilder
Omits `spec.storageClassName` from the generated PVC so Kubernetes can assign the cluster's default StorageClass. To request a classless volume, call `WithStorageClass` with an empty string.
withoutStorageClass(): KubernetesPersistentVolumeResource
KubernetesPersistentVolumeResource
Sets the name of the existing PersistentVolume to bind to in the generated PVC's `spec.volumeName`.
withPersistentVolumeName(persistentVolumeName: string): KubernetesPersistentVolumeResource
persistentVolumeNamestringThe name of the existing PersistentVolume.
KubernetesPersistentVolumeResource
methodwithStorageClassbuilder
Sets the Kubernetes storage class name on the PVC's `spec.storageClassName`. When unset, the cluster's default storage class is used. An empty string explicitly disables storage class assignment.
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