Struct k8s_openapi::api::networking::v1::NetworkPolicyPeer
source · [−]pub struct NetworkPolicyPeer {
pub ip_block: Option<IPBlock>,
pub namespace_selector: Option<LabelSelector>,
pub pod_selector: Option<LabelSelector>,
}
Expand description
NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed
Fields
ip_block: Option<IPBlock>
IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
namespace_selector: Option<LabelSelector>
Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.
If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
pod_selector: Option<LabelSelector>
This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.
If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy’s own Namespace.
Trait Implementations
sourceimpl Clone for NetworkPolicyPeer
impl Clone for NetworkPolicyPeer
sourcefn clone(&self) -> NetworkPolicyPeer
fn clone(&self) -> NetworkPolicyPeer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for NetworkPolicyPeer
impl Debug for NetworkPolicyPeer
sourceimpl DeepMerge for NetworkPolicyPeer
impl DeepMerge for NetworkPolicyPeer
sourcefn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
Merge other
into self
.
sourceimpl Default for NetworkPolicyPeer
impl Default for NetworkPolicyPeer
sourcefn default() -> NetworkPolicyPeer
fn default() -> NetworkPolicyPeer
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for NetworkPolicyPeer
impl<'de> Deserialize<'de> for NetworkPolicyPeer
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<NetworkPolicyPeer> for NetworkPolicyPeer
impl PartialEq<NetworkPolicyPeer> for NetworkPolicyPeer
sourcefn eq(&self, other: &NetworkPolicyPeer) -> bool
fn eq(&self, other: &NetworkPolicyPeer) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for NetworkPolicyPeer
impl Serialize for NetworkPolicyPeer
impl StructuralPartialEq for NetworkPolicyPeer
Auto Trait Implementations
impl RefUnwindSafe for NetworkPolicyPeer
impl Send for NetworkPolicyPeer
impl Sync for NetworkPolicyPeer
impl Unpin for NetworkPolicyPeer
impl UnwindSafe for NetworkPolicyPeer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more