pub struct IoK8sApiCoreV1VolumeBuilder { /* private fields */ }Expand description
Builder for IoK8sApiCoreV1Volume.
Implementations§
Source§impl IoK8sApiCoreV1VolumeBuilder
impl IoK8sApiCoreV1VolumeBuilder
Sourcepub fn aws_elastic_block_store(
&mut self,
value: Option<IoK8sApiCoreV1AwsElasticBlockStoreVolumeSource>,
) -> &mut Self
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
Sourcepub fn azure_disk(
&mut self,
value: Option<IoK8sApiCoreV1AzureDiskVolumeSource>,
) -> &mut Self
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.
Sourcepub fn azure_file(
&mut self,
value: Option<IoK8sApiCoreV1AzureFileVolumeSource>,
) -> &mut Self
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.
Sourcepub fn cephfs(
&mut self,
value: Option<IoK8sApiCoreV1CephFsVolumeSource>,
) -> &mut Self
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
Sourcepub fn cinder(
&mut self,
value: Option<IoK8sApiCoreV1CinderVolumeSource>,
) -> &mut Self
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
Sourcepub fn config_map(
&mut self,
value: Option<IoK8sApiCoreV1ConfigMapVolumeSource>,
) -> &mut Self
pub fn config_map( &mut self, value: Option<IoK8sApiCoreV1ConfigMapVolumeSource>, ) -> &mut Self
ConfigMap represents a configMap that should populate this volume
Sourcepub fn csi(&mut self, value: Option<IoK8sApiCoreV1CsiVolumeSource>) -> &mut Self
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).
Sourcepub fn downward_api(
&mut self,
value: Option<IoK8sApiCoreV1DownwardApiVolumeSource>,
) -> &mut Self
pub fn downward_api( &mut self, value: Option<IoK8sApiCoreV1DownwardApiVolumeSource>, ) -> &mut Self
DownwardAPI represents downward API about the pod that should populate this volume
Sourcepub fn empty_dir(
&mut self,
value: Option<IoK8sApiCoreV1EmptyDirVolumeSource>,
) -> &mut Self
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
Sourcepub fn ephemeral(
&mut self,
value: Option<IoK8sApiCoreV1EphemeralVolumeSource>,
) -> &mut Self
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.
Sourcepub fn fc(&mut self, value: Option<IoK8sApiCoreV1FcVolumeSource>) -> &mut Self
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.
Sourcepub fn flex_volume(
&mut self,
value: Option<IoK8sApiCoreV1FlexVolumeSource>,
) -> &mut Self
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.
Sourcepub fn flocker(
&mut self,
value: Option<IoK8sApiCoreV1FlockerVolumeSource>,
) -> &mut Self
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
Sourcepub fn gce_persistent_disk(
&mut self,
value: Option<IoK8sApiCoreV1GcePersistentDiskVolumeSource>,
) -> &mut Self
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
Sourcepub fn git_repo(
&mut self,
value: Option<IoK8sApiCoreV1GitRepoVolumeSource>,
) -> &mut Self
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.
Sourcepub fn glusterfs(
&mut self,
value: Option<IoK8sApiCoreV1GlusterfsVolumeSource>,
) -> &mut Self
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
Sourcepub fn host_path(
&mut self,
value: Option<IoK8sApiCoreV1HostPathVolumeSource>,
) -> &mut Self
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
Sourcepub fn iscsi(
&mut self,
value: Option<IoK8sApiCoreV1IscsiVolumeSource>,
) -> &mut Self
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
Sourcepub fn name(&mut self, value: String) -> &mut Self
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
Sourcepub fn nfs(&mut self, value: Option<IoK8sApiCoreV1NfsVolumeSource>) -> &mut Self
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
Sourcepub fn persistent_volume_claim(
&mut self,
value: Option<IoK8sApiCoreV1PersistentVolumeClaimVolumeSource>,
) -> &mut Self
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
Sourcepub fn photon_persistent_disk(
&mut self,
value: Option<IoK8sApiCoreV1PhotonPersistentDiskVolumeSource>,
) -> &mut Self
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
Sourcepub fn portworx_volume(
&mut self,
value: Option<IoK8sApiCoreV1PortworxVolumeSource>,
) -> &mut Self
pub fn portworx_volume( &mut self, value: Option<IoK8sApiCoreV1PortworxVolumeSource>, ) -> &mut Self
PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
Sourcepub fn projected(
&mut self,
value: Option<IoK8sApiCoreV1ProjectedVolumeSource>,
) -> &mut Self
pub fn projected( &mut self, value: Option<IoK8sApiCoreV1ProjectedVolumeSource>, ) -> &mut Self
Items for all in one resources secrets, configmaps, and downward API
Sourcepub fn quobyte(
&mut self,
value: Option<IoK8sApiCoreV1QuobyteVolumeSource>,
) -> &mut Self
pub fn quobyte( &mut self, value: Option<IoK8sApiCoreV1QuobyteVolumeSource>, ) -> &mut Self
Quobyte represents a Quobyte mount on the host that shares a pod’s lifetime
Sourcepub fn rbd(&mut self, value: Option<IoK8sApiCoreV1RbdVolumeSource>) -> &mut Self
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
Sourcepub fn scale_io(
&mut self,
value: Option<IoK8sApiCoreV1ScaleIoVolumeSource>,
) -> &mut Self
pub fn scale_io( &mut self, value: Option<IoK8sApiCoreV1ScaleIoVolumeSource>, ) -> &mut Self
ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
Sourcepub fn secret(
&mut self,
value: Option<IoK8sApiCoreV1SecretVolumeSource>,
) -> &mut Self
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
Sourcepub fn storageos(
&mut self,
value: Option<IoK8sApiCoreV1StorageOsVolumeSource>,
) -> &mut Self
pub fn storageos( &mut self, value: Option<IoK8sApiCoreV1StorageOsVolumeSource>, ) -> &mut Self
StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
Sourcepub fn vsphere_volume(
&mut self,
value: Option<IoK8sApiCoreV1VsphereVirtualDiskVolumeSource>,
) -> &mut Self
pub fn vsphere_volume( &mut self, value: Option<IoK8sApiCoreV1VsphereVirtualDiskVolumeSource>, ) -> &mut Self
VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
Sourcepub fn build(
&self,
) -> Result<IoK8sApiCoreV1Volume, IoK8sApiCoreV1VolumeBuilderError>
pub fn build( &self, ) -> Result<IoK8sApiCoreV1Volume, IoK8sApiCoreV1VolumeBuilderError>
Trait Implementations§
Source§impl Clone for IoK8sApiCoreV1VolumeBuilder
impl Clone for IoK8sApiCoreV1VolumeBuilder
Source§fn clone(&self) -> IoK8sApiCoreV1VolumeBuilder
fn clone(&self) -> IoK8sApiCoreV1VolumeBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more