Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sleep between Tuesday-Saturday, wake up Sunday #300

Open
pelegz opened this issue May 30, 2023 · 1 comment
Open

Sleep between Tuesday-Saturday, wake up Sunday #300

pelegz opened this issue May 30, 2023 · 1 comment

Comments

@pelegz
Copy link

pelegz commented May 30, 2023

Hello,

Is there an option to configure namespaces to sleep WHOLE days and wake up on a specific days?

We have workloads only running on Sundays. On the rest of the days, I'd like to scale down all deployments in our namespaces and only wake them up on Sundays.

Documentation says that I can only configure sleep and for waking them up I have to deploy the resources manually.
Is there a workaround?

Thank you!

@davidebianchi
Copy link
Member

davidebianchi commented May 31, 2023

Hi @pelegz! To run workload only on Sundays, you can configure something like:

apiVersion: kube-green.com/v1alpha1
kind: SleepInfo
metadata:
  name: working-hours
spec:
  weekdays: "0"
  sleepAt: "20:00"
  wakeUpAt: "08:00"
  timeZone: "Europe/Rome"
  suspendCronJobs: true

Where weekdays 0 is Sunday.
With this configuration, you wake up workload on Sunday at 8am and sleep on Sunday at 20pm. So, the workload only run during Sunday. Obviously, you can change the time slot as you prefer.
Is this configuration ok for your use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants