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

Cluster-wide SleepInfo and namespace exclusion #167

Open
ams0 opened this issue Jul 25, 2022 · 4 comments
Open

Cluster-wide SleepInfo and namespace exclusion #167

ams0 opened this issue Jul 25, 2022 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@ams0
Copy link

ams0 commented Jul 25, 2022

For cluster with large number of namespaces, it would be more convenient to set a new CRD called ClusterSleepInfo that operates across all namespaces, with default exclusion of kube-system and option list of namespaces and resources to exclude:

apiVersion: kube-green.com/v1alpha1
kind: ClusterSleepInfo
metadata:
  name: working-hours
spec:
  weekdays: "1-5"
  sleepAt: "20:00"
  wakeUpAt: "08:00"
  timeZone: "Europe/Rome"
  suspendCronJobs: true
  excludeRef:
    - apiVersion: "apps/v1"
      kind:       Deployment
      name:       my-deployment
    - apiVersion: "v1"
      kind:       Namespace
      name:       my-namespace

I am aware of the implications here (controller needs access to every namespace) but it sounds like a good idea (at least to me!)

@davidebianchi
Copy link
Member

Hi @ams0!
Definitely yes! It's already in the kube-green roadmap as a draft proposal.

For the excludeRef spec, maybe we could use some labels to specify if a namespace and/or a resource should be excluded.

@mimmus
Copy link

mimmus commented Oct 30, 2023

I'm currently using:
https://codeberg.org/hjacobs/kube-downscaler
and its include/exclude system is quite flexible.

@VarunTyagi86
Copy link

@davidebianchi - Do you know by when this enhancement will be available for us to consume ?

@davidebianchi
Copy link
Member

Hi @VarunTyagi86! I don't have a schedule for this enhancement, but since it is a high rate request we should work on it after the end of support of generic resources (I'm already working on it).

If someone which needs this feature is interested also in implement it, I can for sure support!

@davidebianchi davidebianchi added this to the v0.7.0 milestone Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

4 participants