PersistentVolumeSpecV1
Class sealed net10.0
Represents the specification for a Kubernetes Persistent Volume. Defines the details of storage and access configurations for a PersistentVolume resource.
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed class PersistentVolumeSpecV1{ // ...} 12 members
Constructors1
Section titled ConstructorsProperties11
Section titled PropertiesAccessModesgetList<string> Represents the access modes for a Persistent Volume in a Kubernetes cluster. AccessModes define the ways in which the volume can be mounted and utilized: - ReadWriteOnce: The volume can be mounted as read-write by a single node. - ReadOnlyMany: The volume can be mounted read-only by many nodes. - ReadWriteMany: The volume can be mounted as read-write by many nodes.
Capacityget; setDictionary<string, string> Represents the storage capacity of the persistent volume. The keys in the dictionary represent capacity types (e.g., "storage"), and the values define the corresponding quantity for the capacity type.
ClaimRefget; set Gets or sets the reference to a claim within the Kubernetes cluster that is bound to the PersistentVolume. This property links the PersistentVolume to a specific PersistentVolumeClaim (PVC) via an object reference, allowing resources to be dynamically or statically provisioned as required.
HostPathget; set Gets or sets the configuration for a HostPath volume in a Kubernetes PersistentVolume. This property specifies the details of a HostPath volume source, allowing a directory from the host node file system to be mounted into a pod's container.
Localget; set Gets or sets the configuration for a local volume source.
MountOptionsgetList<string> Specifies a list of mount options for a persistent volume. Mount options are passed to the mount binary (e.g., NFS, Ceph) for configuring the volume at mount time. These options allow customization of mount behavior based on the filesystem or volume type.
NodeAffinityget; set Specifies constraints that limit which nodes a persistent volume can be accessed from.
PersistentVolumeReclaimPolicyget; setstring Describes the reclaim policy of a PersistentVolume in Kubernetes. The reclaim policy determines how a PersistentVolume should be treated when it is released from its associated PersistentVolumeClaim. Typical values include: - "Retain": Retains the volume for manual recovery. - "Recycle": Cleans the volume by removing its contents for reuse. - "Delete": Deletes the volume from storage.
StorageClassNameget; setstring Specifies the name of the StorageClass associated with this persistent volume. The StorageClass provides dynamic provisioning parameters and policies for the storage resource. If no StorageClass is defined, the default StorageClass for the cluster will be applied if available.
VolumeAttributesClassNameget; setstring Specifies the class name associated with volume attributes in a Kubernetes PersistentVolume specification. This property is typically used to indicate a custom class of attributes assigned to the persistent volume, enabling more granular configurations or specific behaviors for the volume.
VolumeModeget; setstring Specifies the volume mode of the persistent volume.