Struct k8s_openapi::v1_11::api::networking::v1::NetworkPolicyPeer[][src]

pub struct NetworkPolicyPeer {
    pub ip_block: Option<IPBlock>,
    pub namespace_selector: Option<LabelSelector>,
    pub pod_selector: Option<LabelSelector>,
}

NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed

Fields

IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.

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.

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

impl Clone for NetworkPolicyPeer
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for NetworkPolicyPeer
[src]

Formats the value using the given formatter. Read more

impl Default for NetworkPolicyPeer
[src]

Returns the "default value" for a type. Read more

impl PartialEq for NetworkPolicyPeer
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'de> Deserialize<'de> for NetworkPolicyPeer
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for NetworkPolicyPeer
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations