kedacore / keda

KEDA is a Kubernetes-based Event Driven Autoscaling component. It provides event driven scale for any container running in Kubernetes
https://keda.sh
Apache License 2.0
8.11k stars 1.02k forks source link

Provide CloudEvents around the management of ScaledObjects resources #3522

Open tomkerkhove opened 1 year ago

tomkerkhove commented 1 year ago

Proposal

Event Types

Payload:

{
    "specversion" : "1.0",
    "type" : "keda.scaledobject.created.v1",
    "subject" : "/{kubernetes-cluster-name}/{namespace}/scaled-objects/{resource-name}/",
    "time" : "2018-04-05T17:31:00Z",
    "datacontenttype" : "application/json",
    "data" : {
      "scaleTarget": {
         "name": "sample-workload",
         "apiVersion": "Deployment",
         "kind": "apps/v1",
      },
      "replicas": {
         "min": 0,
         "max": 10,
         "idle": 0,
      },
      "triggers": [
        {
          "type": "CPU",
          "type": {
            // Trigger information
          }
        }
      ],
      "intervals": {
         "cooldown": 300,
         "polling": 30
      },
      "fallback": {
         "threshold": 3,
         "replicas": 6
      }
   }
}

Use-Case

Allow end-users to react to changes to their ScaledObjects by using our EventSource CRD

Anything else?

Relates to https://github.com/kedacore/keda/issues/479

tomkerkhove commented 2 weeks ago

@SpiritZhou Are you planning on implementing the updated scenario as well?