How to change sleeping time in kube-green
Use the SleepInfo resource in the target namespace to control when workloads sleep and wake up.
Check existing SleepInfo resources
kubectl get sleepinfo --all-namespaces

Edit a namespace configuration
For example, to edit the hh-ballbot namespace:
kubectl edit sleepinfo -n hh-ballbot
This command opens your default editor.
SleepInfo fields
weekdays: Days when the sleep rule applies. Use*for every day,1for Monday, or1-5for Monday to Friday.sleepAt: Time inHH:mmwhen the namespace should sleep.wakeUpAt: Time inHH:mmwhen the namespace should be restored.timeZone: Time zone in IANA format, for exampleAsia/Jakarta.
When kube-green puts a namespace to sleep, deployments are scaled down to 0. If suspendCronJobs is enabled, cron jobs are also suspended.
If wakeUpAt is not set, workloads will not be restored automatically.
Example configuration
In hh-ballbot, the namespace is configured to sleep at 20:00 and wake up at 20:10 every day.
spec:
sleepAt: "20:00"
timeZone: Asia/Jakarta
wakeUpAt: "20:10"
weekdays: "*"
Update the values as needed, then save the file.
If you are using Vim, save and exit with:
:wq
After saving, kube-green will apply the new schedule automatically.