Show / Hide Table of Contents

Class V1NetworkPolicyPeer

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

Inheritance
object
V1NetworkPolicyPeer
Implements
IEquatable<V1NetworkPolicyPeer>
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: k8s.Models
Assembly: KubernetesClient.dll
Syntax
public record V1NetworkPolicyPeer : IEquatable<V1NetworkPolicyPeer>

Constructors

View Source

V1NetworkPolicyPeer()

Declaration
public V1NetworkPolicyPeer()
View Source

V1NetworkPolicyPeer(V1NetworkPolicyPeer)

Declaration
protected V1NetworkPolicyPeer(V1NetworkPolicyPeer original)
Parameters
Type Name Description
V1NetworkPolicyPeer original

Properties

View Source

EqualityContract

Declaration
protected virtual Type EqualityContract { get; }
Property Value
Type Description
Type
View Source

IpBlock

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

Declaration
[JsonPropertyName("ipBlock")]
public V1IPBlock IpBlock { get; set; }
Property Value
Type Description
V1IPBlock
View Source

NamespaceSelector

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.

Declaration
[JsonPropertyName("namespaceSelector")]
public V1LabelSelector NamespaceSelector { get; set; }
Property Value
Type Description
V1LabelSelector
View Source

PodSelector

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.

Declaration
[JsonPropertyName("podSelector")]
public V1LabelSelector PodSelector { get; set; }
Property Value
Type Description
V1LabelSelector

Methods

View Source

Equals(object?)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
object.Equals(object)
View Source

Equals(V1NetworkPolicyPeer?)

Declaration
public virtual bool Equals(V1NetworkPolicyPeer? other)
Parameters
Type Name Description
V1NetworkPolicyPeer other
Returns
Type Description
bool
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()
View Source

PrintMembers(StringBuilder)

Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Type Name Description
StringBuilder builder
Returns
Type Description
bool
View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Operators

View Source

operator ==(V1NetworkPolicyPeer?, V1NetworkPolicyPeer?)

Declaration
public static bool operator ==(V1NetworkPolicyPeer? left, V1NetworkPolicyPeer? right)
Parameters
Type Name Description
V1NetworkPolicyPeer left
V1NetworkPolicyPeer right
Returns
Type Description
bool
View Source

operator !=(V1NetworkPolicyPeer?, V1NetworkPolicyPeer?)

Declaration
public static bool operator !=(V1NetworkPolicyPeer? left, V1NetworkPolicyPeer? right)
Parameters
Type Name Description
V1NetworkPolicyPeer left
V1NetworkPolicyPeer right
Returns
Type Description
bool

Implements

IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX