struct

Kubernetes::NetworkPolicyPeer

Inherits YAML::Serializable < JSON::Serializable < Kubernetes::Serializable < Struct < Value < Object

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

Constructors

new(pull : ::JSON::PullParser)
new(*, __pull_for_json_serializable pull : ::JSON::PullParser)
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)

Instance methods

ip_block

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

Source
ip_block=(ip_block : IPBlock | Nil)

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

Source
namespace_selector

namespaceSelector 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.

Source
namespace_selector=(namespace_selector : LabelSelector | Nil)

namespaceSelector 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.

Source
pod_selector

podSelector 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.

Source
pod_selector=(pod_selector : LabelSelector | Nil)

podSelector 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.

Source

Macros

field(name, type = nil, **options, &block)

Helper macro for defining fields with automatic camelCase conversion

Source