pub struct GcePersistentDiskVolumeSource {
pub pd_name: Option<String>,
pub fs_type: Option<String>,
pub partition: Option<i32>,
pub read_only: Option<bool>,
}
Expand description
Represents a Persistent Disk resource in Google Compute Engine.
A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.
Fields§
§pd_name: Option<String>
pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
fs_type: Option<String>
fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: “ext4”, “xfs”, “ntfs”. Implicitly inferred to be “ext4” if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine +optional
partition: Option<i32>
partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as “1”. Similarly, the volume partition for /dev/sda is “0” (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk +optional
read_only: Option<bool>
readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk +optional
Implementations§
Source§impl GcePersistentDiskVolumeSource
impl GcePersistentDiskVolumeSource
Sourcepub fn pd_name(&self) -> &str
pub fn pd_name(&self) -> &str
Returns the value of pd_name
, or the default value if pd_name
is unset.
Sourcepub fn fs_type(&self) -> &str
pub fn fs_type(&self) -> &str
Returns the value of fs_type
, or the default value if fs_type
is unset.
Trait Implementations§
Source§impl Clone for GcePersistentDiskVolumeSource
impl Clone for GcePersistentDiskVolumeSource
Source§fn clone(&self) -> GcePersistentDiskVolumeSource
fn clone(&self) -> GcePersistentDiskVolumeSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Hash for GcePersistentDiskVolumeSource
impl Hash for GcePersistentDiskVolumeSource
Source§impl Message for GcePersistentDiskVolumeSource
impl Message for GcePersistentDiskVolumeSource
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl PartialEq for GcePersistentDiskVolumeSource
impl PartialEq for GcePersistentDiskVolumeSource
Source§fn eq(&self, other: &GcePersistentDiskVolumeSource) -> bool
fn eq(&self, other: &GcePersistentDiskVolumeSource) -> bool
self
and other
values to be equal, and is used by ==
.