Package org.cdk8s.plus25
Interface ScalingRules
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ScalingRules.Jsii$Proxy
@Generated(value="jsii-pacmak/1.88.0 (build eaabd08)", date="2023-09-11T06:17:58.412Z") @Stability(Stable) public interface ScalingRules extends software.amazon.jsii.JsiiSerializable
Defines the scaling behavior for one direction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classScalingRules.BuilderA builder forScalingRulesstatic classScalingRules.Jsii$ProxyAn implementation forScalingRules
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static ScalingRules.Builderbuilder()default List<ScalingPolicy>getPolicies()The scaling policies.default org.cdk8s.DurationgetStabilizationWindow()Defines the window of past metrics that the autoscaler should consider when calculating wether or not autoscaling should occur.default ScalingStrategygetStrategy()The strategy to use when scaling.
-
-
-
Method Detail
-
getPolicies
@Stability(Stable) @Nullable default List<ScalingPolicy> getPolicies()
The scaling policies.Default: * Scale up * Increase no more than 4 pods per 60 seconds * Double the number of pods per 60 seconds * Scale down * Decrease to minReplica count
-
getStabilizationWindow
@Stability(Stable) @Nullable default org.cdk8s.Duration getStabilizationWindow()
Defines the window of past metrics that the autoscaler should consider when calculating wether or not autoscaling should occur.Minimum duration is 1 second, max is 1 hour.
Default: * On scale down no stabilization is performed. * On scale up stabilization is performed for 5 minutes.
Example:
stabilizationWindow: Duration.minutes(30) // Autoscaler considers the last 30 minutes of metrics when deciding whether to scale.
-
getStrategy
@Stability(Stable) @Nullable default ScalingStrategy getStrategy()
The strategy to use when scaling.Default: MAX_CHANGE
-
builder
@Stability(Stable) static ScalingRules.Builder builder()
- Returns:
- a
ScalingRules.BuilderofScalingRules
-
-