Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Set an "include" annotation #64

Open
jaxxstorm opened this issue Jul 17, 2019 · 2 comments
Open

Set an "include" annotation #64

jaxxstorm opened this issue Jul 17, 2019 · 2 comments

Comments

@jaxxstorm
Copy link

Right now, the only way to determine if a deployment or sts should be downscaled is using an "exclude" annotation.

It would be great if there was also a downscale/include: true mechanism to allow opt in for downscaling

@hjacobs
Copy link
Owner

hjacobs commented Jul 17, 2019

Can you describe your use case? You want to have no downscaling by default, but in this case you can already just set the downscaler/uptime annotation and not set any default up/downtime.

@jaxxstorm
Copy link
Author

We have built an operator that creates statefulset resources, and there's a spec value for Downscale. The actual downscale timings are set on the downscaler configuration (so cluster wide, rather than resource specific)

Because of the exclude only annotation, I essentially have to do some double negative logic. For example, in the operator code (pseudo code)

const downscaleAnnotation = "downscaler/exclude"

if cr.Spec.Downscale { // we want to downscale this thing
  downscaleAnnotation = false
} else {
// we don't want to downscale this thing
  downscaleAnnotation = true
}

Im actually not even sure if setting downscale/exclude = "false" works correctly?

Perhaps there's a better way to do this?

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

No branches or pull requests

2 participants