Update ResourcePolicy description and limit control README

This commit is contained in:
Sachin Tiptur 2023-08-08 15:14:12 +02:00
parent 8c749fc655
commit 407f4bc2ea
2 changed files with 9 additions and 3 deletions

View File

@ -15,6 +15,7 @@
- [Troubleshooting](#troubleshooting)
- [Components of VPA](#components-of-vpa)
- [Tear down](#tear-down)
- [Limits control](#limits-control)
- [Examples](#examples)
- [Keeping limit proportional to request](#keeping-limit-proportional-to-request)
- [Capping to Limit Range](#capping-to-limit-range)
@ -259,7 +260,7 @@ kubectl delete clusterrolebinding myname-cluster-admin-binding
# Limits control
When setting limits VPA will conform to
[resource policies](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go#L82).
[resource policies](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go#L100).
It will maintain limit to request ratio specified for all containers.
VPA will try to cap recommendations between min and max of
@ -267,6 +268,8 @@ VPA will try to cap recommendations between min and max of
and VPA resource policy conflict, VPA will follow VPA policy (and set values outside the limit
range).
To disable getting VPA recommendations for an individual container, set `mode` to `"Off"` in `containerPolicies`.
## Examples
### Keeping limit proportional to request

View File

@ -94,8 +94,11 @@ type VerticalPodAutoscalerSpec struct {
// Controls how the autoscaler computes recommended resources.
// The resource policy may be used to set constraints on the recommendations
// for individual containers. If not specified, the autoscaler computes recommended
// resources for all containers in the pod, without additional constraints.
// for individual containers.
// If any individual containers need to be excluded from getting the VPA recommendations, then
// it must be disabled explicitly by setting mode to "Off" under containerPolicies.
// If not specified, the autoscaler computes recommended resources for all containers in the pod,
// without additional constraints.
// +optional
ResourcePolicy *PodResourcePolicy `json:"resourcePolicy,omitempty" protobuf:"bytes,3,opt,name=resourcePolicy"`