IoK8sApiCoreV1VolumeBuilder

Struct IoK8sApiCoreV1VolumeBuilder 

Source
pub struct IoK8sApiCoreV1VolumeBuilder { /* private fields */ }
Expand description

Builder for IoK8sApiCoreV1Volume.

Implementations§

Source§

impl IoK8sApiCoreV1VolumeBuilder

Source

pub fn aws_elastic_block_store( &mut self, value: Option<IoK8sApiCoreV1AwsElasticBlockStoreVolumeSource>, ) -> &mut Self

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

Source

pub fn azure_disk( &mut self, value: Option<IoK8sApiCoreV1AzureDiskVolumeSource>, ) -> &mut Self

AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.

Source

pub fn azure_file( &mut self, value: Option<IoK8sApiCoreV1AzureFileVolumeSource>, ) -> &mut Self

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

Source

pub fn cephfs( &mut self, value: Option<IoK8sApiCoreV1CephFsVolumeSource>, ) -> &mut Self

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

Source

pub fn cinder( &mut self, value: Option<IoK8sApiCoreV1CinderVolumeSource>, ) -> &mut Self

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

Source

pub fn config_map( &mut self, value: Option<IoK8sApiCoreV1ConfigMapVolumeSource>, ) -> &mut Self

ConfigMap represents a configMap that should populate this volume

Source

pub fn csi(&mut self, value: Option<IoK8sApiCoreV1CsiVolumeSource>) -> &mut Self

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

Source

pub fn downward_api( &mut self, value: Option<IoK8sApiCoreV1DownwardApiVolumeSource>, ) -> &mut Self

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

Source

pub fn empty_dir( &mut self, value: Option<IoK8sApiCoreV1EmptyDirVolumeSource>, ) -> &mut Self

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

Source

pub fn ephemeral( &mut self, value: Option<IoK8sApiCoreV1EphemeralVolumeSource>, ) -> &mut Self

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.

Source

pub fn fc(&mut self, value: Option<IoK8sApiCoreV1FcVolumeSource>) -> &mut Self

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

Source

pub fn flex_volume( &mut self, value: Option<IoK8sApiCoreV1FlexVolumeSource>, ) -> &mut Self

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

Source

pub fn flocker( &mut self, value: Option<IoK8sApiCoreV1FlockerVolumeSource>, ) -> &mut Self

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

Source

pub fn gce_persistent_disk( &mut self, value: Option<IoK8sApiCoreV1GcePersistentDiskVolumeSource>, ) -> &mut Self

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

Source

pub fn git_repo( &mut self, value: Option<IoK8sApiCoreV1GitRepoVolumeSource>, ) -> &mut Self

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.

Source

pub fn glusterfs( &mut self, value: Option<IoK8sApiCoreV1GlusterfsVolumeSource>, ) -> &mut Self

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

Source

pub fn host_path( &mut self, value: Option<IoK8sApiCoreV1HostPathVolumeSource>, ) -> &mut Self

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

Source

pub fn iscsi( &mut self, value: Option<IoK8sApiCoreV1IscsiVolumeSource>, ) -> &mut Self

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

Source

pub fn name(&mut self, value: String) -> &mut Self

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

Source

pub fn nfs(&mut self, value: Option<IoK8sApiCoreV1NfsVolumeSource>) -> &mut Self

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

Source

pub fn persistent_volume_claim( &mut self, value: Option<IoK8sApiCoreV1PersistentVolumeClaimVolumeSource>, ) -> &mut Self

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

Source

pub fn photon_persistent_disk( &mut self, value: Option<IoK8sApiCoreV1PhotonPersistentDiskVolumeSource>, ) -> &mut Self

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

Source

pub fn portworx_volume( &mut self, value: Option<IoK8sApiCoreV1PortworxVolumeSource>, ) -> &mut Self

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

Source

pub fn projected( &mut self, value: Option<IoK8sApiCoreV1ProjectedVolumeSource>, ) -> &mut Self

Items for all in one resources secrets, configmaps, and downward API

Source

pub fn quobyte( &mut self, value: Option<IoK8sApiCoreV1QuobyteVolumeSource>, ) -> &mut Self

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

Source

pub fn rbd(&mut self, value: Option<IoK8sApiCoreV1RbdVolumeSource>) -> &mut Self

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

Source

pub fn scale_io( &mut self, value: Option<IoK8sApiCoreV1ScaleIoVolumeSource>, ) -> &mut Self

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

Source

pub fn secret( &mut self, value: Option<IoK8sApiCoreV1SecretVolumeSource>, ) -> &mut Self

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

Source

pub fn storageos( &mut self, value: Option<IoK8sApiCoreV1StorageOsVolumeSource>, ) -> &mut Self

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

Source

pub fn vsphere_volume( &mut self, value: Option<IoK8sApiCoreV1VsphereVirtualDiskVolumeSource>, ) -> &mut Self

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

Source

pub fn build( &self, ) -> Result<IoK8sApiCoreV1Volume, IoK8sApiCoreV1VolumeBuilderError>

Builds a new IoK8sApiCoreV1Volume.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Clone for IoK8sApiCoreV1VolumeBuilder

Source§

fn clone(&self) -> IoK8sApiCoreV1VolumeBuilder

Returns a duplicate 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 Default for IoK8sApiCoreV1VolumeBuilder

Source§

fn default() -> Self

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

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.