Struct k8s_openapi::api::core::v1::Volume

source ·
pub struct Volume {
Show 30 fields pub aws_elastic_block_store: Option<AWSElasticBlockStoreVolumeSource>, pub azure_disk: Option<AzureDiskVolumeSource>, pub azure_file: Option<AzureFileVolumeSource>, pub cephfs: Option<CephFSVolumeSource>, pub cinder: Option<CinderVolumeSource>, pub config_map: Option<ConfigMapVolumeSource>, pub csi: Option<CSIVolumeSource>, pub downward_api: Option<DownwardAPIVolumeSource>, pub empty_dir: Option<EmptyDirVolumeSource>, pub ephemeral: Option<EphemeralVolumeSource>, pub fc: Option<FCVolumeSource>, pub flex_volume: Option<FlexVolumeSource>, pub flocker: Option<FlockerVolumeSource>, pub gce_persistent_disk: Option<GCEPersistentDiskVolumeSource>, pub git_repo: Option<GitRepoVolumeSource>, pub glusterfs: Option<GlusterfsVolumeSource>, pub host_path: Option<HostPathVolumeSource>, pub iscsi: Option<ISCSIVolumeSource>, pub name: String, pub nfs: Option<NFSVolumeSource>, pub persistent_volume_claim: Option<PersistentVolumeClaimVolumeSource>, pub photon_persistent_disk: Option<PhotonPersistentDiskVolumeSource>, pub portworx_volume: Option<PortworxVolumeSource>, pub projected: Option<ProjectedVolumeSource>, pub quobyte: Option<QuobyteVolumeSource>, pub rbd: Option<RBDVolumeSource>, pub scale_io: Option<ScaleIOVolumeSource>, pub secret: Option<SecretVolumeSource>, pub storageos: Option<StorageOSVolumeSource>, pub vsphere_volume: Option<VsphereVirtualDiskVolumeSource>,
}
Expand description

Volume represents a named volume in a pod that may be accessed by any container in the pod.

Fields§

§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. 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.

§azure_file: Option<AzureFileVolumeSource>

azureFile represents an Azure File Service mount on the host and bind mount to the pod.

§cephfs: Option<CephFSVolumeSource>

cephFS represents a Ceph FS mount on the host that shares a pod’s lifetime

§cinder: Option<CinderVolumeSource>

cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md

§config_map: Option<ConfigMapVolumeSource>

configMap represents a configMap that should populate this volume

§csi: Option<CSIVolumeSource>

csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).

§downward_api: Option<DownwardAPIVolumeSource>

downwardAPI represents downward API about the pod that should populate this volume

§empty_dir: Option<EmptyDirVolumeSource>

emptyDir represents a temporary directory that shares a pod’s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir

§ephemeral: Option<EphemeralVolumeSource>

ephemeral represents a volume that is handled by a cluster storage driver. The volume’s lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.

Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim).

Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.

Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.

A pod can use both types of ephemeral volumes and persistent volumes at the same time.

§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<FlexVolumeSource>

flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.

§flocker: Option<FlockerVolumeSource>

flocker represents a Flocker volume attached to a kubelet’s host machine. This depends on the Flocker control service being running

§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. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk

§git_repo: Option<GitRepoVolumeSource>

gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod’s container.

§glusterfs: Option<GlusterfsVolumeSource>

glusterfs represents a Glusterfs mount on the host that shares a pod’s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md

§host_path: Option<HostPathVolumeSource>

hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath

§iscsi: Option<ISCSIVolumeSource>

iscsi represents an ISCSI Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md

§name: String

name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

§nfs: Option<NFSVolumeSource>

nfs represents an NFS mount on the host that shares a pod’s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs

§persistent_volume_claim: Option<PersistentVolumeClaimVolumeSource>

persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims

§photon_persistent_disk: Option<PhotonPersistentDiskVolumeSource>

photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine

§portworx_volume: Option<PortworxVolumeSource>

portworxVolume represents a portworx volume attached and mounted on kubelets host machine

§projected: Option<ProjectedVolumeSource>

projected items for all in one resources secrets, configmaps, and downward API

§quobyte: Option<QuobyteVolumeSource>

quobyte represents a Quobyte mount on the host that shares a pod’s lifetime

§rbd: Option<RBDVolumeSource>

rbd represents a Rados Block Device mount on the host that shares a pod’s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md

§scale_io: Option<ScaleIOVolumeSource>

scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.

§secret: Option<SecretVolumeSource>

secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret

§storageos: Option<StorageOSVolumeSource>

storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.

§vsphere_volume: Option<VsphereVirtualDiskVolumeSource>

vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine

Trait Implementations§

source§

impl Clone for Volume

source§

fn clone(&self) -> Volume

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 Volume

source§

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

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

impl DeepMerge for Volume

source§

fn merge_from(&mut self, other: Self)

Merge other into self.
source§

impl Default for Volume

source§

fn default() -> Volume

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

impl<'de> Deserialize<'de> for Volume

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<Volume> for Volume

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Volume

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 Volume

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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 Twhere T: for<'de> Deserialize<'de>,