Skip to content

Provide annotation information from resource in all CloudEvents #3624

Open
@tomkerkhove

Description

@tomkerkhove

Proposal

Introduce a metadata section in all our events which has all the annotations of the subject in annotations:

{
    "specversion" : "1.0",
    "type" : "keda.scaledobject.authentication.failed.v1",
    "subject" : "/{kubernetes-cluster-name}/{namespace}/{scaled-job/object}/{resource-name}/triggers/{trigger-name}",
    "time" : "2018-04-05T17:31:00Z",
    "datacontenttype" : "application/json",
    "data" : {
      "scaleTarget": {
         "name": "sample-workload",
         "apiVersion": "Deployment",
         "kind": "apps/v1",
      },
      "scaledObject/scaledJob": {
         "name": "sample-workload",
         "namespace": "<namespace>",
      },
      "trigger": {
         "type": "<trigger type, ie CPU>",
          "name": "<trigger-name>",
         "metadata": {
           // Trigger information
         }
      },
      "error": {
         "message": "<error message>"
      },
+      "metadata": {
+         "annotations": {
+	        "example": "annotation"
+         }
+      }
   }
}

If we want, we can introduce more information to metadata going forward.

Use-Case

End-users want to have metadata about the subject of the CloudEvent.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    cloudeventsAll events related to CloudEvents to extend KEDAextensibilityAll issues related to extensibility of KEDAfeatureAll issues for new features that have been committed tooperations

    Type

    No type

    Projects

    • Status

      To Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions