pub struct StorageClass {
pub metadata: Option<ObjectMeta>,
pub provisioner: Option<String>,
pub parameters: BTreeMap<String, String>,
pub reclaim_policy: Option<String>,
pub mount_options: Vec<String>,
pub allow_volume_expansion: Option<bool>,
pub volume_binding_mode: Option<String>,
pub allowed_topologies: Vec<TopologySelectorTerm>,
}
Expand description
StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.
StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.
Fields§
§metadata: Option<ObjectMeta>
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional
provisioner: Option<String>
provisioner indicates the type of the provisioner.
parameters: BTreeMap<String, String>
parameters holds the parameters for the provisioner that should create volumes of this storage class. +optional
reclaim_policy: Option<String>
reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class. Defaults to Delete. +optional
mount_options: Vec<String>
mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. e.g. [“ro”, “soft”]. Not validated - mount of the PVs will simply fail if one is invalid. +optional +listType=atomic
allow_volume_expansion: Option<bool>
allowVolumeExpansion shows whether the storage class allow volume expand. +optional
volume_binding_mode: Option<String>
volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature. +optional
allowed_topologies: Vec<TopologySelectorTerm>
allowedTopologies restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature. +optional +listType=atomic
Implementations§
source§impl StorageClass
impl StorageClass
sourcepub fn provisioner(&self) -> &str
pub fn provisioner(&self) -> &str
Returns the value of provisioner
, or the default value if provisioner
is unset.
sourcepub fn reclaim_policy(&self) -> &str
pub fn reclaim_policy(&self) -> &str
Returns the value of reclaim_policy
, or the default value if reclaim_policy
is unset.
sourcepub fn allow_volume_expansion(&self) -> bool
pub fn allow_volume_expansion(&self) -> bool
Returns the value of allow_volume_expansion
, or the default value if allow_volume_expansion
is unset.
sourcepub fn volume_binding_mode(&self) -> &str
pub fn volume_binding_mode(&self) -> &str
Returns the value of volume_binding_mode
, or the default value if volume_binding_mode
is unset.
Trait Implementations§
source§impl Clone for StorageClass
impl Clone for StorageClass
source§fn clone(&self) -> StorageClass
fn clone(&self) -> StorageClass
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StorageClass
impl Debug for StorageClass
source§impl Default for StorageClass
impl Default for StorageClass
source§impl Message for StorageClass
impl Message for StorageClass
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 Metadata for StorageClass
impl Metadata for StorageClass
source§impl PartialEq for StorageClass
impl PartialEq for StorageClass
source§impl Resource for StorageClass
impl Resource for StorageClass
source§const API_VERSION: &'static str = "storage.k8s.io/v1"
const API_VERSION: &'static str = "storage.k8s.io/v1"
Resource::GROUP
and Resource::VERSION
(eg "apiextensions.k8s.io/v1beta1"
)
or just the version for resources without a group (eg "v1"
). Read moresource§const GROUP: &'static str = "storage.k8s.io"
const GROUP: &'static str = "storage.k8s.io"
source§const URL_PATH_SEGMENT: &'static str = "storageclasses"
const URL_PATH_SEGMENT: &'static str = "storageclasses"
source§type Scope = ClusterResourceScope
type Scope = ClusterResourceScope
impl StructuralPartialEq for StorageClass
Auto Trait Implementations§
impl Freeze for StorageClass
impl RefUnwindSafe for StorageClass
impl Send for StorageClass
impl Sync for StorageClass
impl Unpin for StorageClass
impl UnwindSafe for StorageClass
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)