#[non_exhaustive]pub struct ClusterPolicyConfig {
pub no_system_mutation: Option<bool>,
pub no_system_impersonation: Option<bool>,
pub no_unsafe_webhooks: Option<bool>,
pub no_standard_node_pools: Option<bool>,
/* private fields */
}Expand description
ClusterPolicyConfig stores the configuration for cluster wide policies.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.no_system_mutation: Option<bool>Denotes that preventing creation and mutation of resources in GKE managed namespaces and cluster-scoped GKE managed resources .
no_system_impersonation: Option<bool>Denotes preventing impersonation and CSRs for GKE System users.
no_unsafe_webhooks: Option<bool>Denotes preventing unsafe webhooks.
no_standard_node_pools: Option<bool>Denotes preventing standard node pools and requiring only autopilot node pools.
Implementations§
Source§impl ClusterPolicyConfig
impl ClusterPolicyConfig
Sourcepub fn set_no_system_mutation<T>(self, v: T) -> Self
pub fn set_no_system_mutation<T>(self, v: T) -> Self
Sets the value of no_system_mutation.
§Example
ⓘ
let x = ClusterPolicyConfig::new().set_no_system_mutation(true);Sourcepub fn set_or_clear_no_system_mutation<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_no_system_mutation<T>(self, v: Option<T>) -> Self
Sets or clears the value of no_system_mutation.
§Example
ⓘ
let x = ClusterPolicyConfig::new().set_or_clear_no_system_mutation(Some(false));
let x = ClusterPolicyConfig::new().set_or_clear_no_system_mutation(None::<bool>);Sourcepub fn set_no_system_impersonation<T>(self, v: T) -> Self
pub fn set_no_system_impersonation<T>(self, v: T) -> Self
Sets the value of no_system_impersonation.
§Example
ⓘ
let x = ClusterPolicyConfig::new().set_no_system_impersonation(true);Sourcepub fn set_or_clear_no_system_impersonation<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_no_system_impersonation<T>(self, v: Option<T>) -> Self
Sets or clears the value of no_system_impersonation.
§Example
ⓘ
let x = ClusterPolicyConfig::new().set_or_clear_no_system_impersonation(Some(false));
let x = ClusterPolicyConfig::new().set_or_clear_no_system_impersonation(None::<bool>);Sourcepub fn set_no_unsafe_webhooks<T>(self, v: T) -> Self
pub fn set_no_unsafe_webhooks<T>(self, v: T) -> Self
Sets the value of no_unsafe_webhooks.
§Example
ⓘ
let x = ClusterPolicyConfig::new().set_no_unsafe_webhooks(true);Sourcepub fn set_or_clear_no_unsafe_webhooks<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_no_unsafe_webhooks<T>(self, v: Option<T>) -> Self
Sets or clears the value of no_unsafe_webhooks.
§Example
ⓘ
let x = ClusterPolicyConfig::new().set_or_clear_no_unsafe_webhooks(Some(false));
let x = ClusterPolicyConfig::new().set_or_clear_no_unsafe_webhooks(None::<bool>);Sourcepub fn set_no_standard_node_pools<T>(self, v: T) -> Self
pub fn set_no_standard_node_pools<T>(self, v: T) -> Self
Sets the value of no_standard_node_pools.
§Example
ⓘ
let x = ClusterPolicyConfig::new().set_no_standard_node_pools(true);Sourcepub fn set_or_clear_no_standard_node_pools<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_no_standard_node_pools<T>(self, v: Option<T>) -> Self
Sets or clears the value of no_standard_node_pools.
§Example
ⓘ
let x = ClusterPolicyConfig::new().set_or_clear_no_standard_node_pools(Some(false));
let x = ClusterPolicyConfig::new().set_or_clear_no_standard_node_pools(None::<bool>);Trait Implementations§
Source§impl Clone for ClusterPolicyConfig
impl Clone for ClusterPolicyConfig
Source§fn clone(&self) -> ClusterPolicyConfig
fn clone(&self) -> ClusterPolicyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClusterPolicyConfig
impl Debug for ClusterPolicyConfig
Source§impl Default for ClusterPolicyConfig
impl Default for ClusterPolicyConfig
Source§fn default() -> ClusterPolicyConfig
fn default() -> ClusterPolicyConfig
Returns the “default value” for a type. Read more
Source§impl Message for ClusterPolicyConfig
impl Message for ClusterPolicyConfig
Source§impl PartialEq for ClusterPolicyConfig
impl PartialEq for ClusterPolicyConfig
Source§fn eq(&self, other: &ClusterPolicyConfig) -> bool
fn eq(&self, other: &ClusterPolicyConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClusterPolicyConfig
Auto Trait Implementations§
impl Freeze for ClusterPolicyConfig
impl RefUnwindSafe for ClusterPolicyConfig
impl Send for ClusterPolicyConfig
impl Sync for ClusterPolicyConfig
impl Unpin for ClusterPolicyConfig
impl UnsafeUnpin for ClusterPolicyConfig
impl UnwindSafe for ClusterPolicyConfig
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
Mutably borrows from an owned value. Read more