Class V1NetworkPolicyIngressRule
NetworkPolicyIngressRule describes a particular set of traffic that is allowed
to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match
both ports and from.
Inheritance
V1NetworkPolicyIngressRule
Assembly: KubernetesClient.dll
Syntax
public record V1NetworkPolicyIngressRule : IEquatable<V1NetworkPolicyIngressRule>
Constructors
View Source
V1NetworkPolicyIngressRule()
Declaration
public V1NetworkPolicyIngressRule()
View Source
V1NetworkPolicyIngressRule(V1NetworkPolicyIngressRule)
Declaration
protected V1NetworkPolicyIngressRule(V1NetworkPolicyIngressRule original)
Parameters
Properties
View Source
EqualityContract
Declaration
protected virtual Type EqualityContract { get; }
Property Value
View Source
FromProperty
from is a list of sources which should be able to access the pods selected for
this rule. Items in this list are combined using a logical OR operation. If this
field is empty or missing, this rule matches all sources (traffic not restricted
by source). If this field is present and contains at least one item, this rule
allows traffic only if the traffic matches at least one item in the from list.
Declaration
[JsonPropertyName("from")]
public IList<V1NetworkPolicyPeer> FromProperty { get; set; }
Property Value
View Source
Ports
ports is a list of ports which should be made accessible on the pods selected
for this rule. Each item in this list is combined using a logical OR. If this
field is empty or missing, this rule matches all ports (traffic not restricted
by port). If this field is present and contains at least one item, then this
rule allows traffic only if the traffic matches at least one port in the list.
Declaration
[JsonPropertyName("ports")]
public IList<V1NetworkPolicyPort> Ports { get; set; }
Property Value
Methods
View Source
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
Equals(V1NetworkPolicyIngressRule?)
Declaration
public virtual bool Equals(V1NetworkPolicyIngressRule? other)
Parameters
Returns
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
PrintMembers(StringBuilder)
Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Returns
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
View Source
operator ==(V1NetworkPolicyIngressRule?, V1NetworkPolicyIngressRule?)
Declaration
public static bool operator ==(V1NetworkPolicyIngressRule? left, V1NetworkPolicyIngressRule? right)
Parameters
Returns
View Source
operator !=(V1NetworkPolicyIngressRule?, V1NetworkPolicyIngressRule?)
Declaration
public static bool operator !=(V1NetworkPolicyIngressRule? left, V1NetworkPolicyIngressRule? right)
Parameters
Returns
Implements