File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
pkg/apis/autoscaling.k8s.io/v1 Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -458,6 +458,7 @@ spec:
458458 - " Off"
459459 - Initial
460460 - Recreate
461+ - InPlaceOrRecreate
461462 - Auto
462463 type : string
463464 type : object
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ type PodUpdatePolicy struct {
151151}
152152
153153// UpdateMode controls when autoscaler applies changes to the pod resources.
154- // +kubebuilder:validation:Enum=Off;Initial;Recreate;Auto
154+ // +kubebuilder:validation:Enum=Off;Initial;Recreate;InPlaceOrRecreate; Auto
155155type UpdateMode string
156156
157157const (
@@ -169,8 +169,15 @@ const (
169169 // UpdateModeAuto means that autoscaler assigns resources on pod creation
170170 // and additionally can update them during the lifetime of the pod,
171171 // using any available update method. Currently this is equivalent to
172- // Recreate, which is the only available update method .
172+ // Recreate.
173173 UpdateModeAuto UpdateMode = "Auto"
174+ // UpdateModeInPlaceOrRecreate means that autoscaler tries to assign resources in-place.
175+ // If this is not possible (e.g., resizing takes too long or is infeasible), it falls back to the
176+ // "Recreate" update mode.
177+ // Requires VPA level feature gate "InPlaceOrRecreate" to be enabled
178+ // on the admission and updater pods.
179+ // Requires cluster feature gate "InPlacePodVerticalScaling" to be enabled.
180+ UpdateModeInPlaceOrRecreate UpdateMode = "InPlaceOrRecreate"
174181)
175182
176183// PodResourcePolicy controls how autoscaler computes the recommended resources
You can’t perform that action at this time.
0 commit comments