* gen v1.21.0 * update version converter * bump version to 5 * remove support of netstandard2.0 * update test dependency
182 lines
8.7 KiB
C#
Generated
182 lines
8.7 KiB
C#
Generated
// <auto-generated>
|
|
// Code generated by Microsoft (R) AutoRest Code Generator.
|
|
// Changes may cause incorrect behavior and will be lost if the code is
|
|
// regenerated.
|
|
// </auto-generated>
|
|
|
|
namespace k8s.Models
|
|
{
|
|
using Newtonsoft.Json;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
/// <summary>
|
|
/// PodDisruptionBudgetStatus represents information about the status of a
|
|
/// PodDisruptionBudget. Status may trail the actual state of a system.
|
|
/// </summary>
|
|
public partial class V1beta1PodDisruptionBudgetStatus
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the V1beta1PodDisruptionBudgetStatus
|
|
/// class.
|
|
/// </summary>
|
|
public V1beta1PodDisruptionBudgetStatus()
|
|
{
|
|
CustomInit();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the V1beta1PodDisruptionBudgetStatus
|
|
/// class.
|
|
/// </summary>
|
|
/// <param name="currentHealthy">current number of healthy pods</param>
|
|
/// <param name="desiredHealthy">minimum desired number of healthy
|
|
/// pods</param>
|
|
/// <param name="disruptionsAllowed">Number of pod disruptions that are
|
|
/// currently allowed.</param>
|
|
/// <param name="expectedPods">total number of pods counted by this
|
|
/// disruption budget</param>
|
|
/// <param name="conditions">Conditions contain conditions for PDB. The
|
|
/// disruption controller sets the DisruptionAllowed condition. The
|
|
/// following are known values for the reason field (additional reasons
|
|
/// could be added in the future): - SyncFailed: The controller
|
|
/// encountered an error and wasn't able to compute
|
|
/// the number of allowed disruptions. Therefore no disruptions are
|
|
/// allowed and the status of the condition will be False.
|
|
/// - InsufficientPods: The number of pods are either at or below the
|
|
/// number
|
|
/// required by the PodDisruptionBudget. No disruptions are
|
|
/// allowed and the status of the condition will be False.
|
|
/// - SufficientPods: There are more pods than required by the
|
|
/// PodDisruptionBudget.
|
|
/// The condition will be True, and the number of allowed
|
|
/// disruptions are provided by the disruptionsAllowed
|
|
/// property.</param>
|
|
/// <param name="disruptedPods">DisruptedPods contains information
|
|
/// about pods whose eviction was processed by the API server eviction
|
|
/// subresource handler but has not yet been observed by the
|
|
/// PodDisruptionBudget controller. A pod will be in this map from the
|
|
/// time when the API server processed the eviction request to the time
|
|
/// when the pod is seen by PDB controller as having been marked for
|
|
/// deletion (or after a timeout). The key in the map is the name of
|
|
/// the pod and the value is the time when the API server processed the
|
|
/// eviction request. If the deletion didn't occur and a pod is still
|
|
/// there it will be removed from the list automatically by
|
|
/// PodDisruptionBudget controller after some time. If everything goes
|
|
/// smooth this map should be empty for the most of the time. Large
|
|
/// number of entries in the map may indicate problems with pod
|
|
/// deletions.</param>
|
|
/// <param name="observedGeneration">Most recent generation observed
|
|
/// when updating this PDB status. DisruptionsAllowed and other status
|
|
/// information is valid only if observedGeneration equals to PDB's
|
|
/// object generation.</param>
|
|
public V1beta1PodDisruptionBudgetStatus(int currentHealthy, int desiredHealthy, int disruptionsAllowed, int expectedPods, IList<V1Condition> conditions = default(IList<V1Condition>), IDictionary<string, System.DateTime?> disruptedPods = default(IDictionary<string, System.DateTime?>), long? observedGeneration = default(long?))
|
|
{
|
|
Conditions = conditions;
|
|
CurrentHealthy = currentHealthy;
|
|
DesiredHealthy = desiredHealthy;
|
|
DisruptedPods = disruptedPods;
|
|
DisruptionsAllowed = disruptionsAllowed;
|
|
ExpectedPods = expectedPods;
|
|
ObservedGeneration = observedGeneration;
|
|
CustomInit();
|
|
}
|
|
|
|
/// <summary>
|
|
/// An initialization method that performs custom operations like setting defaults
|
|
/// </summary>
|
|
partial void CustomInit();
|
|
|
|
/// <summary>
|
|
/// Gets or sets conditions contain conditions for PDB. The disruption
|
|
/// controller sets the DisruptionAllowed condition. The following are
|
|
/// known values for the reason field (additional reasons could be
|
|
/// added in the future): - SyncFailed: The controller encountered an
|
|
/// error and wasn't able to compute
|
|
/// the number of allowed disruptions. Therefore no disruptions are
|
|
/// allowed and the status of the condition will be False.
|
|
/// - InsufficientPods: The number of pods are either at or below the
|
|
/// number
|
|
/// required by the PodDisruptionBudget. No disruptions are
|
|
/// allowed and the status of the condition will be False.
|
|
/// - SufficientPods: There are more pods than required by the
|
|
/// PodDisruptionBudget.
|
|
/// The condition will be True, and the number of allowed
|
|
/// disruptions are provided by the disruptionsAllowed property.
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "conditions")]
|
|
public IList<V1Condition> Conditions { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets current number of healthy pods
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "currentHealthy")]
|
|
public int CurrentHealthy { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets minimum desired number of healthy pods
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "desiredHealthy")]
|
|
public int DesiredHealthy { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets disruptedPods contains information about pods whose
|
|
/// eviction was processed by the API server eviction subresource
|
|
/// handler but has not yet been observed by the PodDisruptionBudget
|
|
/// controller. A pod will be in this map from the time when the API
|
|
/// server processed the eviction request to the time when the pod is
|
|
/// seen by PDB controller as having been marked for deletion (or after
|
|
/// a timeout). The key in the map is the name of the pod and the value
|
|
/// is the time when the API server processed the eviction request. If
|
|
/// the deletion didn't occur and a pod is still there it will be
|
|
/// removed from the list automatically by PodDisruptionBudget
|
|
/// controller after some time. If everything goes smooth this map
|
|
/// should be empty for the most of the time. Large number of entries
|
|
/// in the map may indicate problems with pod deletions.
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "disruptedPods")]
|
|
public IDictionary<string, System.DateTime?> DisruptedPods { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets number of pod disruptions that are currently allowed.
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "disruptionsAllowed")]
|
|
public int DisruptionsAllowed { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets total number of pods counted by this disruption budget
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "expectedPods")]
|
|
public int ExpectedPods { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets most recent generation observed when updating this PDB
|
|
/// status. DisruptionsAllowed and other status information is valid
|
|
/// only if observedGeneration equals to PDB's object generation.
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "observedGeneration")]
|
|
public long? ObservedGeneration { get; set; }
|
|
|
|
/// <summary>
|
|
/// Validate the object.
|
|
/// </summary>
|
|
/// <exception cref="Microsoft.Rest.ValidationException">
|
|
/// Thrown if validation fails
|
|
/// </exception>
|
|
public virtual void Validate()
|
|
{
|
|
if (Conditions != null)
|
|
{
|
|
foreach (var element in Conditions)
|
|
{
|
|
if (element != null)
|
|
{
|
|
element.Validate();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|