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

Provide CloudEvents when scaling workload(s) from/to 0 #3527

Open
2 tasks
tomkerkhove opened this issue Aug 9, 2022 · 4 comments
Open
2 tasks

Provide CloudEvents when scaling workload(s) from/to 0 #3527

tomkerkhove opened this issue Aug 9, 2022 · 4 comments
Labels
cloudevents All events related to CloudEvents to extend KEDA extensibility All issues related to extensibility of KEDA feature All issues for new features that have been committed to operations

Comments

@tomkerkhove
Copy link
Member

Proposal

Event Types

  • keda.workload.scaletozero.v1
  • keda.workload.scalefromzero.v1

Payload:

{
    "specversion" : "1.0",
    "type" : "keda.workload.scaletozero.v1",
    "subject" : "/{kubernetes-cluster-name}/{namespace}/workload/{resource-name}/",
    "time" : "2018-04-05T17:31:00Z",
    "datacontenttype" : "application/json",
    "data" : {
      "scaleTarget": {
         "name": "sample-workload",
         "apiVersion": "Deployment",
         "kind": "apps/v1",
      }
   }
}

Use-Case

Allow end-users to get notified when workloads are scaling to/from 0.

Anything else?

Relates to #479

@tomkerkhove tomkerkhove added needs-discussion feature-request All issues for new features that have not been committed to extensibility All issues related to extensibility of KEDA feature All issues for new features that have been committed to operations cloudevents All events related to CloudEvents to extend KEDA and removed needs-discussion feature-request All issues for new features that have not been committed to labels Aug 9, 2022
@tomkerkhove tomkerkhove modified the milestone: CloudEvents - Initial version Aug 9, 2022
@tomkerkhove
Copy link
Member Author

@neelanjan00 will look in to this

@neelanjan00
Copy link
Contributor

neelanjan00 commented Mar 24, 2024

A question, do we want to emit an event for a ScaledJob scaling from/to 0? If yes, can you suggest at which point during the reconciliation we can check if the runningJobCount has become zero?

Sorry if it's a dumb question. As far as I understood KEDA doesn't actively scale the ScaledJob workloads to zero since Kubernetes Jobs are not meant to keep executing, and after they complete executing the number of pods becomes zero.

CC: @tomkerkhove

@neelanjan00
Copy link
Contributor

Hi @tomkerkhove can you PTAL at the above comment? Thanks!

@tomkerkhove
Copy link
Member Author

There are no stupid questions so no worries =) Let's leave out ScaledJobs indeed given we do not scale to 0 but only activate new instances when need be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloudevents All events related to CloudEvents to extend KEDA extensibility All issues related to extensibility of KEDA feature All issues for new features that have been committed to operations
Projects
Status: To Do
Development

No branches or pull requests

2 participants