Skip to content

Commit 9fcfd69

Browse files
committed
extend validation section, add examples for when the feature is enabled
1 parent f636c80 commit 9fcfd69

File tree

1 file changed

+9
-2
lines changed
  • vertical-pod-autoscaler/enhancements/8515-support-custom-request-to-limit-ratio

1 file changed

+9
-2
lines changed

vertical-pod-autoscaler/enhancements/8515-support-custom-request-to-limit-ratio/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ The behavior after implementing this feature is as follows:
116116
#### Dynamic Validation via Admission Controller
117117

118118
* When using the new `RequestToLimitRatio` field, the `controlledValues` field must be set to `RequestsAndLimits`. It does not make sense to specify `RequestToLimitRatio` if VPA is not allowed to update limits. This requirement is enforced by the admission controller.
119-
* If `Type` is set to `Quantity`, then its `Value` will be validated.
119+
* If `Type` is set to `Quantity`, then its `Value` will be validated using the [ParseQuantity](https://github.com/kubernetes/apimachinery/blob/v0.34.1/pkg/api/resource/quantity.go#L277) function from `apimachinery`.
120+
120121

121122
### Feature Enablement and Rollback
122123

@@ -130,7 +131,13 @@ The behavior after implementing this feature is as follows:
130131
#### When Enabled
131132

132133
* The admission controller will **accept** new VPA objects that include a configured `RequestToLimitRatio`.
133-
* For containers targeted by a VPA object using `RequestToLimitRatio`, the admission controller and/or the updater will enforce the configured ratio.
134+
* For containers targeted by a VPA object using `RequestToLimitRatio`, the admission controller and/or the updater will enforce the configured ratio. Here are some examples of how this may happen:
135+
* **From default to a specific ratio**: This occurs when we have running Pods targeted by a VPA object that does not define `RequestToLimitRatio`. In this case, the Pods use the default ratio derived from the workload API (e.g. Deployment). Once we specify a custom ratio using the `RequestToLimitRatio` field, the new ratio is not applied immediately, as the updater still relies on its current behavior to decide when to evict Pods or perform in-place updates. With the `InPlaceOrRecreate` mode, two possibilities exist:
136+
1. If the new ratio does **not** change the QoS class, the updater will attempt to apply the new ratio using an in-place update. If the in-place update cannot be completed in time, it will evict the Pod to force the change.
137+
2. If the new ratio **does** change the QoS class, the updater will evict the Pod, since the QoS class field is immutable and in-place updates are not possible.
138+
* **From one ratio to another**:
139+
In this case, the default ratio defined in the workload API is ignored, and the ratio specified in the `RequestToLimitRatio` field is enforced. The same logic from the first example applies (see points 1 and 2 above).
140+
134141

135142
#### When Disabled
136143

0 commit comments

Comments
 (0)