AgentPoolUpgradeSettings Class
- java.
lang. Object - com.
azure. resourcemanager. containerservice. models. AgentPoolUpgradeSettings
- com.
Implements
public final class AgentPoolUpgradeSettings
implements JsonSerializable<AgentPoolUpgradeSettings>
Settings for upgrading an agentpool.
Constructor Summary
Constructor | Description |
---|---|
AgentPoolUpgradeSettings() |
Creates an instance of Agent |
Method Summary
Modifier and Type | Method and Description |
---|---|
Integer |
drainTimeoutInMinutes()
Get the drain |
static
Agent |
fromJson(JsonReader jsonReader)
Reads an instance of Agent |
String |
maxSurge()
Get the max |
String |
maxUnavailable()
Get the max |
Integer |
nodeSoakDurationInMinutes()
Get the node |
Json |
toJson(JsonWriter jsonWriter) |
Undrainable |
undrainableNodeBehavior()
Get the undrainable |
void |
validate()
Validates the instance. |
Agent |
withDrainTimeoutInMinutes(Integer drainTimeoutInMinutes)
Set the drain |
Agent |
withMaxSurge(String maxSurge)
Set the max |
Agent |
withMaxUnavailable(String maxUnavailable)
Set the max |
Agent |
withNodeSoakDurationInMinutes(Integer nodeSoakDurationInMinutes)
Set the node |
Agent |
withUndrainableNodeBehavior(UndrainableNodeBehavior undrainableNodeBehavior)
Set the undrainable |
Methods inherited from java.lang.Object
Constructor Details
AgentPoolUpgradeSettings
public AgentPoolUpgradeSettings()
Creates an instance of AgentPoolUpgradeSettings class.
Method Details
drainTimeoutInMinutes
public Integer drainTimeoutInMinutes()
Get the drainTimeoutInMinutes property: The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes.
Returns:
fromJson
public static AgentPoolUpgradeSettings fromJson(JsonReader jsonReader)
Reads an instance of AgentPoolUpgradeSettings from the JsonReader.
Parameters:
Returns:
Throws:
maxSurge
public String maxSurge()
Get the maxSurge property: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster.
Returns:
maxUnavailable
public String maxUnavailable()
Get the maxUnavailable property: This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster.
Returns:
nodeSoakDurationInMinutes
public Integer nodeSoakDurationInMinutes()
Get the nodeSoakDurationInMinutes property: The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 minutes.
Returns:
toJson
undrainableNodeBehavior
public UndrainableNodeBehavior undrainableNodeBehavior()
Get the undrainableNodeBehavior property: Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes.
Returns:
validate
public void validate()
Validates the instance.
withDrainTimeoutInMinutes
public AgentPoolUpgradeSettings withDrainTimeoutInMinutes(Integer drainTimeoutInMinutes)
Set the drainTimeoutInMinutes property: The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes.
Parameters:
Returns:
withMaxSurge
public AgentPoolUpgradeSettings withMaxSurge(String maxSurge)
Set the maxSurge property: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster.
Parameters:
Returns:
withMaxUnavailable
public AgentPoolUpgradeSettings withMaxUnavailable(String maxUnavailable)
Set the maxUnavailable property: This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster.
Parameters:
Returns:
withNodeSoakDurationInMinutes
public AgentPoolUpgradeSettings withNodeSoakDurationInMinutes(Integer nodeSoakDurationInMinutes)
Set the nodeSoakDurationInMinutes property: The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 minutes.
Parameters:
Returns:
withUndrainableNodeBehavior
public AgentPoolUpgradeSettings withUndrainableNodeBehavior(UndrainableNodeBehavior undrainableNodeBehavior)
Set the undrainableNodeBehavior property: Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes.
Parameters:
Returns: