Class HPAScalingRules
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.autoscaling.v2beta2.HPAScalingRules
-
- All Implemented Interfaces:
com.marcnuri.yakc.model.Model
public class HPAScalingRules extends java.lang.Object implements com.marcnuri.yakc.model.Model
HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HPAScalingRules.Builder
-
Constructor Summary
Constructors Constructor Description HPAScalingRules()
HPAScalingRules(java.util.List<HPAScalingPolicy> policies, java.lang.String selectPolicy, java.lang.Number stabilizationWindowSeconds)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HPAScalingRules.Builder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.util.List<HPAScalingPolicy>
getPolicies()
policies is a list of potential scaling polices which can be used during scaling.java.lang.String
getSelectPolicy()
selectPolicy is used to specify which policy should be used.java.lang.Number
getStabilizationWindowSeconds()
StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down.int
hashCode()
void
setPolicies(java.util.List<HPAScalingPolicy> policies)
policies is a list of potential scaling polices which can be used during scaling.void
setSelectPolicy(java.lang.String selectPolicy)
selectPolicy is used to specify which policy should be used.void
setStabilizationWindowSeconds(java.lang.Number stabilizationWindowSeconds)
StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down.HPAScalingRules.Builder
toBuilder()
java.lang.String
toString()
-
-
-
Constructor Detail
-
HPAScalingRules
public HPAScalingRules(java.util.List<HPAScalingPolicy> policies, java.lang.String selectPolicy, java.lang.Number stabilizationWindowSeconds)
-
HPAScalingRules
public HPAScalingRules()
-
-
Method Detail
-
builder
public static HPAScalingRules.Builder builder()
-
toBuilder
public HPAScalingRules.Builder toBuilder()
-
getPolicies
public java.util.List<HPAScalingPolicy> getPolicies()
policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
-
getSelectPolicy
public java.lang.String getSelectPolicy()
selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.
-
getStabilizationWindowSeconds
public java.lang.Number getStabilizationWindowSeconds()
StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
-
setPolicies
public void setPolicies(java.util.List<HPAScalingPolicy> policies)
policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
-
setSelectPolicy
public void setSelectPolicy(java.lang.String selectPolicy)
selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.
-
setStabilizationWindowSeconds
public void setStabilizationWindowSeconds(java.lang.Number stabilizationWindowSeconds)
StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-