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: README.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -617,11 +617,21 @@ The feature to scale DaemonSets can be very useful for reducing the base occupan
617
617
618
618
The feature to scale PodDisruptionBudgets can be useful to relax availability constraints on workloads. If enabled, the PodDisruptionBudget algorithm works like this:
619
619
620
-
1. Downtime Hours: Kube Downscaler will bring `minAvailable` and `maxUnavailable` to 0
620
+
1. Downtime Hours: Kube Downscaler will bring `minAvailable` and `maxUnavailable` to downtime replicas value
621
621
2. Uptime Hours: Kube Downscaler will bring back `minAvailable` and `maxUnavailable` to their original value
622
622
623
-
**Important**: Kube Downscaler, actually, cannot process values written in percentages. Resources with `minAvailable` or `maxUnavailable` written as percentages will be automatically excluded from scaling
623
+
**Percentage Values**: Kube Downscaler can process PodDisruptionBudgets with `minAvailable` or `maxUnavailable`. In this case, during downtime hours, the following behavior applies:
624
+
1. The `downscaler/original-replicas` annotation will store the original percentage value (e.g., "75%") as a string.
625
+
2. The `minAvailable`/`maxUnavailable` field of the object will be updated to the target downtime replicas value (e.g., 0) as an integer.
624
626
627
+
The original percentage value in the `minAvailable`/`maxUnavailable` field will be restored once the downtime hours end
628
+
629
+
**Downtime Replicas**: Kube Downscaler can process downtime replicas specified as a percentage. The behavior will be the following:
630
+
- If `--include-resources` only scales PodDisruptionBudgets, the value assigned to downtime replicas can be set as a percentage inside the global argument value `--downtime-replicas` or as a namespace/workload
631
+
annotation `downscaler/donwtime-replicas` (e.g. `--donwtime-replicas="20%"` or `downscaler/donwtime-replicas: "10%"`)
632
+
- If `--include-resources` scales PodDisruptionBudgets and other resources, using a percentage value inside the global argument value `--downtime-replicas` or as a namespace
633
+
annotation `downscaler/donwtime-replicas` will result in all other resources under its scope being ignored (e.g. if you set `--downtime-replicas="10%"` all resources inside the cluster other than PodDisruptionBudgets will be ignored,
634
+
if you set `downscaler/donwtime-replicas: "10%"` at namespace level, all resources other than PodDisruptionBudgets in that namespace will be ignored)
625
635
### Scaling ScaledObjects
626
636
627
637
The ability to downscale ScaledObjects is very useful for workloads that use Keda to support
0 commit comments