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
I would like to be able to force a single deployment to have it's own grace period instead of using the command line options.
Problem to solve
I am creating an integration test for a deployment of py-kube-downscaler but when I create a deployment and set it to scale in a small window (to keep test time reasonable) I get the following log messages:
2024-07-19 18:09:30,688 DEBUG: https://192.168.0.1:443 "GET /api/v1/namespaces/addon-test HTTP/11" 200 None
2024-07-19 18:09:30,689 DEBUG: Deployment addon-test/test-downscaler-deployment has 3 replicas (original: None, uptime: ignored)
2024-07-19 18:09:30,689 INFO: Deployment addon-test/test-downscaler-deployment within grace period (900s), not scaling down (yet)
I would prefer my test to take < 5 minutes rather than 15+ minutes to run so I would like to be able to make it so this single test deployment scales down immediately regardless of the grace period.
Further details
Proposal
First add a new annotation called downscaler/grace-period to this list:
Then update the within_grace_period function to check for this new annotation and prefer it over command line argument or ENV variable used to start the controller:
Issue
I would like to be able to force a single deployment to have it's own grace period instead of using the command line options.
Problem to solve
I am creating an integration test for a deployment of py-kube-downscaler but when I create a deployment and set it to scale in a small window (to keep test time reasonable) I get the following log messages:
I would prefer my test to take < 5 minutes rather than 15+ minutes to run so I would like to be able to make it so this single test deployment scales down immediately regardless of the grace period.
Further details
Proposal
First add a new annotation called
downscaler/grace-period
to this list:py-kube-downscaler/kube_downscaler/scaler.py
Lines 31 to 41 in 9aa2078
Then update the
within_grace_period
function to check for this new annotation and prefer it over command line argument or ENV variable used to start the controller:py-kube-downscaler/kube_downscaler/scaler.py
Line 83 in 9aa2078
Who can address the issue
Other links/references
The text was updated successfully, but these errors were encountered: