k8s_openapi::api::core::v1

Struct PersistentVolumeSpec

Source
pub struct PersistentVolumeSpec {
Show 31 fields pub access_modes: Option<Vec<String>>, pub aws_elastic_block_store: Option<AWSElasticBlockStoreVolumeSource>, pub azure_disk: Option<AzureDiskVolumeSource>, pub azure_file: Option<AzureFilePersistentVolumeSource>, pub capacity: Option<BTreeMap<String, Quantity>>, pub cephfs: Option<CephFSPersistentVolumeSource>, pub cinder: Option<CinderPersistentVolumeSource>, pub claim_ref: Option<ObjectReference>, pub csi: Option<CSIPersistentVolumeSource>, pub fc: Option<FCVolumeSource>, pub flex_volume: Option<FlexPersistentVolumeSource>, pub flocker: Option<FlockerVolumeSource>, pub gce_persistent_disk: Option<GCEPersistentDiskVolumeSource>, pub glusterfs: Option<GlusterfsPersistentVolumeSource>, pub host_path: Option<HostPathVolumeSource>, pub iscsi: Option<ISCSIPersistentVolumeSource>, pub local: Option<LocalVolumeSource>, pub mount_options: Option<Vec<String>>, pub nfs: Option<NFSVolumeSource>, pub node_affinity: Option<VolumeNodeAffinity>, pub persistent_volume_reclaim_policy: Option<String>, pub photon_persistent_disk: Option<PhotonPersistentDiskVolumeSource>, pub portworx_volume: Option<PortworxVolumeSource>, pub quobyte: Option<QuobyteVolumeSource>, pub rbd: Option<RBDPersistentVolumeSource>, pub scale_io: Option<ScaleIOPersistentVolumeSource>, pub storage_class_name: Option<String>, pub storageos: Option<StorageOSPersistentVolumeSource>, pub volume_attributes_class_name: Option<String>, pub volume_mode: Option<String>, pub vsphere_volume: Option<VsphereVirtualDiskVolumeSource>,
}
Expand description

PersistentVolumeSpec is the specification of a persistent volume.

Fields§

§access_modes: Option<Vec<String>>

accessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes

§aws_elastic_block_store: Option<AWSElasticBlockStoreVolumeSource>

awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore

§azure_disk: Option<AzureDiskVolumeSource>

azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.

§azure_file: Option<AzureFilePersistentVolumeSource>

azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.

§capacity: Option<BTreeMap<String, Quantity>>

capacity is the description of the persistent volume’s resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity

§cephfs: Option<CephFSPersistentVolumeSource>

cephFS represents a Ceph FS mount on the host that shares a pod’s lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.

§cinder: Option<CinderPersistentVolumeSource>

cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md

§claim_ref: Option<ObjectReference>

claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding

§csi: Option<CSIPersistentVolumeSource>

csi represents storage that is handled by an external CSI driver.

§fc: Option<FCVolumeSource>

fc represents a Fibre Channel resource that is attached to a kubelet’s host machine and then exposed to the pod.

§flex_volume: Option<FlexPersistentVolumeSource>

flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.

§flocker: Option<FlockerVolumeSource>

flocker represents a Flocker volume attached to a kubelet’s host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.

§gce_persistent_disk: Option<GCEPersistentDiskVolumeSource>

gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. Provisioned by an admin. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk

§glusterfs: Option<GlusterfsPersistentVolumeSource>

glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md

§host_path: Option<HostPathVolumeSource>

hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath

§iscsi: Option<ISCSIPersistentVolumeSource>

iscsi represents an ISCSI Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. Provisioned by an admin.

§local: Option<LocalVolumeSource>

local represents directly-attached storage with node affinity

§mount_options: Option<Vec<String>>

mountOptions is the list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options

§nfs: Option<NFSVolumeSource>

nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs

§node_affinity: Option<VolumeNodeAffinity>

nodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.

§persistent_volume_reclaim_policy: Option<String>

persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming

§photon_persistent_disk: Option<PhotonPersistentDiskVolumeSource>

photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.

§portworx_volume: Option<PortworxVolumeSource>

portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.

§quobyte: Option<QuobyteVolumeSource>

quobyte represents a Quobyte mount on the host that shares a pod’s lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.

§rbd: Option<RBDPersistentVolumeSource>

rbd represents a Rados Block Device mount on the host that shares a pod’s lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md

§scale_io: Option<ScaleIOPersistentVolumeSource>

scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.

§storage_class_name: Option<String>

storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.

§storageos: Option<StorageOSPersistentVolumeSource>

storageOS represents a StorageOS volume that is attached to the kubelet’s host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md

§volume_attributes_class_name: Option<String>

Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. This is a beta field and requires enabling VolumeAttributesClass feature (off by default).

§volume_mode: Option<String>

volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec.

§vsphere_volume: Option<VsphereVirtualDiskVolumeSource>

vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.

Trait Implementations§

Source§

impl Clone for PersistentVolumeSpec

Source§

fn clone(&self) -> PersistentVolumeSpec

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PersistentVolumeSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DeepMerge for PersistentVolumeSpec

Source§

fn merge_from(&mut self, other: Self)

Merge other into self.
Source§

impl Default for PersistentVolumeSpec

Source§

fn default() -> PersistentVolumeSpec

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for PersistentVolumeSpec

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for PersistentVolumeSpec

Source§

fn eq(&self, other: &PersistentVolumeSpec) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for PersistentVolumeSpec

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PersistentVolumeSpec

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,