pub struct StatefulSetPersistentVolumeClaimRetentionPolicy {
pub when_deleted: Option<String>,
pub when_scaled: Option<String>,
}Expand description
StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.
Fields§
§when_deleted: Option<String>whenDeleted specifies what happens to PVCs created from StatefulSet
VolumeClaimTemplates when the StatefulSet is deleted. The default policy
of Retain causes PVCs to not be affected by StatefulSet deletion. The
Delete policy causes those PVCs to be deleted.
when_scaled: Option<String>whenScaled specifies what happens to PVCs created from StatefulSet
VolumeClaimTemplates when the StatefulSet is scaled down. The default
policy of Retain causes PVCs to not be affected by a scaledown. The
Delete policy causes the associated PVCs for any excess pods above
the replica count to be deleted.
Implementations§
Source§impl StatefulSetPersistentVolumeClaimRetentionPolicy
impl StatefulSetPersistentVolumeClaimRetentionPolicy
Sourcepub fn when_deleted(&self) -> &str
pub fn when_deleted(&self) -> &str
Returns the value of when_deleted, or the default value if when_deleted is unset.
Sourcepub fn when_scaled(&self) -> &str
pub fn when_scaled(&self) -> &str
Returns the value of when_scaled, or the default value if when_scaled is unset.
Trait Implementations§
Source§impl Clone for StatefulSetPersistentVolumeClaimRetentionPolicy
impl Clone for StatefulSetPersistentVolumeClaimRetentionPolicy
Source§fn clone(&self) -> StatefulSetPersistentVolumeClaimRetentionPolicy
fn clone(&self) -> StatefulSetPersistentVolumeClaimRetentionPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Message for StatefulSetPersistentVolumeClaimRetentionPolicy
impl Message for StatefulSetPersistentVolumeClaimRetentionPolicy
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 StatefulSetPersistentVolumeClaimRetentionPolicy
impl PartialEq for StatefulSetPersistentVolumeClaimRetentionPolicy
Source§fn eq(&self, other: &StatefulSetPersistentVolumeClaimRetentionPolicy) -> bool
fn eq(&self, other: &StatefulSetPersistentVolumeClaimRetentionPolicy) -> bool
self and other values to be equal, and is used by ==.