Show / Hide Table of Contents

Class V1PodDisruptionBudgetSpec

PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.

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

Constructors

View Source

V1PodDisruptionBudgetSpec()

Declaration
public V1PodDisruptionBudgetSpec()
View Source

V1PodDisruptionBudgetSpec(V1PodDisruptionBudgetSpec)

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

Properties

View Source

EqualityContract

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

MaxUnavailable

An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable".

Declaration
[JsonPropertyName("maxUnavailable")]
public IntOrString MaxUnavailable { get; set; }
Property Value
Type Description
IntOrString
View Source

MinAvailable

An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%".

Declaration
[JsonPropertyName("minAvailable")]
public IntOrString MinAvailable { get; set; }
Property Value
Type Description
IntOrString
View Source

Selector

Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.

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

UnhealthyPodEvictionPolicy

UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type="Ready",status="True".

Valid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.

IfHealthyBudget policy means that running pods (status.phase="Running"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.

AlwaysAllow policy means that all running pods (status.phase="Running"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.

Additional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.

Declaration
[JsonPropertyName("unhealthyPodEvictionPolicy")]
public string UnhealthyPodEvictionPolicy { get; set; }
Property Value
Type Description
string

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(V1PodDisruptionBudgetSpec?)

Declaration
public virtual bool Equals(V1PodDisruptionBudgetSpec? other)
Parameters
Type Name Description
V1PodDisruptionBudgetSpec 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 ==(V1PodDisruptionBudgetSpec?, V1PodDisruptionBudgetSpec?)

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

operator !=(V1PodDisruptionBudgetSpec?, V1PodDisruptionBudgetSpec?)

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

Implements

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