You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keps/sig-autoscaling/853-configurable-hpa-scale-velocity/README.md
+15-17Lines changed: 15 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,20 +84,20 @@ To customize the scaling behavior we should add a `behavior` object with the fol
84
84
-`scaleUp` specifies the rules which are used to control scaling behavior while scaling up.
85
85
-`stabilizationWindowSeconds` - this value indicates the amount of time the HPA controller should consider
86
86
previous recommendations to prevent flapping of the number of replicas.
87
-
-`selectPolicy` can be `min`or `max` and specifies which value from the policies should be selected. The `max` value is used by default.
87
+
-`selectPolicy` can be `Min`, `Max`or `Disabled` and specifies which value from the policies should be selected. The `Max` value is used by default.
88
88
-`policies` a list of policies which regulate the amount of scaling. Each item has the following fields
89
-
-`type` can have the value `pods` or `percent` which indicates the allowed changed in terms of absolute number of pods or percentage of current replicas.
89
+
-`type` can have the value `Pods` or `Percent` which indicates the allowed changed in terms of absolute number of pods or percentage of current replicas.
90
90
-`periodSeconds` the amount of time in seconds for which the rule should hold true.
91
91
-`value` the value for the policy
92
92
-`scaleDown` similar to the `scaleUp` but specifies the rules for scaling down.
93
93
94
94
A user will specify the parameters for the HPA, thus controlling the HPA logic.
95
95
96
-
The `selectPolicy` field indicates which policy should be applied. By default the `max` policy is chosen or in other words while scaling up the highest
96
+
The `selectPolicy` field indicates which policy should be applied. By default the `Max` policy is chosen or in other words while scaling up the highest
97
97
possible number of replicas is used and while scaling down the lowest possible number of replicas is chosen.
98
98
99
99
If the user does not specify `policies` for either `scaleUp` or `scaleDown` then default value for that policy is used
100
-
(see the [Default Values][] section below). Setting the `value` to `0` for `scaleUp` or `scaleDown` disables scaling in that direction.
100
+
(see the [Default Values][] section below).
101
101
102
102
[Default Values]: #default-values
103
103
[Stabilization Window]: #stabilization-window
@@ -114,7 +114,7 @@ Create an HPA with the following configuration:
114
114
behavior:
115
115
scaleUp:
116
116
policies:
117
-
- type: percent
117
+
- type: Percent
118
118
value: 900%
119
119
```
120
120
@@ -142,11 +142,11 @@ Create an HPA with the following behavior:
142
142
behavior:
143
143
scaleUp:
144
144
policies:
145
-
- type: percent
145
+
- type: Percent
146
146
value: 900%
147
147
scaleDown:
148
148
policies:
149
-
- type: pods
149
+
- type: Pods
150
150
value: 1
151
151
periodSeconds: 600 # (i.e., scale down one pod every 10 min)
152
152
```
@@ -165,7 +165,7 @@ Create an HPA with the following behavior:
165
165
behavior:
166
166
scaleUp:
167
167
policies:
168
-
- type: pods
168
+
- type: Pods
169
169
value: 1
170
170
```
171
171
@@ -186,9 +186,7 @@ Create an HPA with the following constraints:
186
186
```yaml
187
187
behavior:
188
188
scaleDown:
189
-
policies:
190
-
- type: pods
191
-
value: 0
189
+
selectPolicy: Disabled
192
190
```
193
191
194
192
The cluster will scale up as usual (default values), but will never scale down.
@@ -204,7 +202,7 @@ behavior:
204
202
scaleDown:
205
203
stabilizationWindowSeconds: 600
206
204
policies:
207
-
- type: pods
205
+
- type: Pods
208
206
value: 5
209
207
```
210
208
@@ -246,7 +244,7 @@ behavior:
246
244
scaleUp:
247
245
stabilizationWindowSeconds: 300
248
246
policies:
249
-
- type: pods
247
+
- type: Pods
250
248
value: 20
251
249
```
252
250
@@ -359,16 +357,16 @@ For smooth transition it makes sense to set the following default values:
359
357
- `behavior.scaleUp.stabilizationWindowSeconds = 0`, do not gather recommendations, instantly scale up to the calculated number of replicas
360
358
- `behavior.scaleUp.policies`has the following policies
361
359
- Percentage policy
362
-
- `policy = percent`
360
+
- `policy = Percent`
363
361
- `periodSeconds = 60`, one minute period for scaleUp
364
362
- `value = 100`which means the number of replicas can be doubled every minute.
365
363
- Pod policy
366
-
- `policy = pods`
364
+
- `policy = Pods`
367
365
- `periodSeconds = 60`, one minute period for scaleUp
368
366
- `value = 4`which means the 4 replicas can be added every minute.
369
367
- `behavior.scaleDown.policies`has the following policies
370
368
- Percentage Policy
371
-
- `policy = percent`
369
+
- `policy = Percent`
372
370
- `periodSeconds = 60`one minute period for scaleDown
373
371
- `value = 100`which means all the replicas can be scaled down in one minute.
374
372
@@ -380,7 +378,7 @@ Please note that:
380
378
- from the command-line options for the controller. Check the [Command Line Option Changes][] section.
381
379
- from the hardcoded default value `300`.
382
380
383
-
The `scaleDown` behavior has a single `percent` policy with a value of `100` because
381
+
The `scaleDown` behavior has a single `Percent` policy with a value of `100` because
384
382
the current scale down behavior is only limited by [Stabilization Window][] which means after
385
383
the stabilization window has passed the target can be scaled down to the minimum specified replicas.
386
384
In order to replicate the default behavior we set `behavior.scaleDown.stabilizationWindowSeconds` to 300
0 commit comments