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

Introduce Azure Event Grid as event destination #3587

Closed
tomkerkhove opened this issue Aug 24, 2022 · 3 comments
Closed

Introduce Azure Event Grid as event destination #3587

tomkerkhove opened this issue Aug 24, 2022 · 3 comments
Assignees
Labels
azure All issues concerning integration with Azure 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

Introduce Azure Event Grid as event destination:

apiVersion: events.keda.sh/v1alpha1
kind: EventSource # Or ClusterEventSource
metadata:
  name: operations-cross-cluster-events
spec:
  destination:
    azureEventgrid:
      topicEndpoint: https://{resource-name}.{region}.eventgrid.azure.net/api/events # Mandatory
      authentication: # End-users must use accessKey or activeDirectory
        accessKey:
          # Allow end-users to pull information from Kubernetes secret or from TriggerAuthentication resources
          valueFrom:
            secretKeyRef:
              name: secrets-operations-events
              key: webhook-api-key
            triggerAuthenticationRef:
              name: trigger-auth-sample
              parameterName: eventGridAuth
        activeDirectory:
          tenantId: xyz
          clientApplication:
            id: ABC
            secret:
              valueFrom:
                secretKeyRef:
                  name: secrets-operations-events
                  key: webhook-api-key
                triggerAuthenticationRef:
                  name: trigger-auth-sample
                  parameterName: eventGridAuth
          managedIdentity:
            valueFrom:
              triggerAuthenticationRef:
                name: trigger-auth-sample

Use-Case

Automatically forward CloudEvents to Azure Event Grid without HTTP endpoint in the middle.

Anything else?

No response

@tomkerkhove tomkerkhove added azure All issues concerning integration with Azure feature All issues for new features that have been committed to operations extensibility All issues related to extensibility of KEDA cloudevents All events related to CloudEvents to extend KEDA labels Aug 24, 2022
@tomkerkhove tomkerkhove moved this to Proposed in Roadmap - KEDA Core Aug 24, 2022
@tomkerkhove tomkerkhove moved this from Proposed to To Do in Roadmap - KEDA Core Aug 24, 2022
@tomkerkhove
Copy link
Member Author

@kedacore/keda-maintainers Let me know what you think of the spec design but I'm open to suggestions

@tomkerkhove
Copy link
Member Author

tomkerkhove commented Sep 14, 2023

With regards to the e2e infrastructure for this, what we will need to add is: (tracked in kedacore/testing-infrastructure#144)

  • An Azure Event Grid Topic to which we will push events
  • An Azure Service Bus Namespace + Topic that is used to subscribe to events, from the above Azure Event Grid Topic.

For every test run + test, we need to:

  1. Create a new subscription on the Service Bus Topic that will automatically delete in 1 day (ID: Random but should be logged)
  2. Create a new subscription on the topic with respective filters (specific per test case) and propagate all tests to the Service Bus Topic
  3. End-to-end test starts an async poller that gets all messages from subscription in 1)
  4. Start test and trigger events that need to be emitted
  5. Plow through received events from 3) in the test and make sure that the expected tests were processed

Here is an example of how I typically do this:

image

This is the only way that I've seen how you can securely and reliable do integration tests with Azure Event Grid.

@JorTurFer
Copy link
Member

I'm a noobie with Event Grid, so I can't give you any feedback about how to test it, sorry
But I can support you with the infra changes if you need it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure All issues concerning integration with Azure 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
Archived in project
Development

No branches or pull requests

3 participants