NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed
new()
IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
mixinInstance(ipBlock)
withCidr(cidr)
CIDR is a string representing the IP Block Valid examples are “192.168.1.1⁄24”
withExcept(except)
Except is a slice of CIDRs that should not be included within an IP Block Valid examples are “192.168.1.1⁄24” Except values will be rejected if they are outside the CIDR range
withExceptMixin(except)
Except is a slice of CIDRs that should not be included within an IP Block Valid examples are “192.168.1.1⁄24” Except values will be rejected if they are outside the CIDR range
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.
mixinInstance(namespaceSelector)
withMatchExpressions(matchExpressions)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
withMatchExpressions
takes an array of type matchExpressionsType
. You can create
an instance of matchExpressionsType
with hidden.meta.v1.labelSelectorRequirement.new()
.
see hidden.meta.v1.labelSelectorRequirement
withMatchExpressionsMixin(matchExpressions)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
withMatchExpressionsMixin
takes an array of type matchExpressionsType
. You can create
an instance of matchExpressionsType
with hidden.meta.v1.labelSelectorRequirement.new()
.
see hidden.meta.v1.labelSelectorRequirement
withMatchLabels(matchLabels)
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
withMatchLabelsMixin(matchLabels)
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
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.
mixinInstance(podSelector)
withMatchExpressions(matchExpressions)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
withMatchExpressions
takes an array of type matchExpressionsType
. You can create
an instance of matchExpressionsType
with hidden.meta.v1.labelSelectorRequirement.new()
.
see hidden.meta.v1.labelSelectorRequirement
withMatchExpressionsMixin(matchExpressions)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
withMatchExpressionsMixin
takes an array of type matchExpressionsType
. You can create
an instance of matchExpressionsType
with hidden.meta.v1.labelSelectorRequirement.new()
.
see hidden.meta.v1.labelSelectorRequirement
withMatchLabels(matchLabels)
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
withMatchLabelsMixin(matchLabels)
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.