Skip to content

Commit

Permalink
feat: Introduce Azure Event Grid as a new CloudEvent destination (ked…
Browse files Browse the repository at this point in the history
…acore#1336)

Co-authored-by: Tom Kerkhove <[email protected]>
  • Loading branch information
SpiritZhou and tomkerkhove authored Apr 22, 2024
1 parent 5956082 commit 31251ff
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions content/docs/2.14/operate/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ metadata:
name: {cloud-event-name}
spec:
clusterName: {cluster-name} #Optional. Will be used in the source/subject to specify where the event comes from. The default value is 'kubernetes-default' and it can also be set during the installation of KEDA with --k8sClusterName. This one will overwrite others if set.
authenticationRef:
name: {trigger-authentication-name} #Optional. Used to reference a `TriggerAuthentication` for authentication.
kind: TriggerAuthentication # Optional. Used to choose the authentication scopes. https://keda.sh/docs/latest/concepts/authentication/#authentication-scopes-namespace-vs-cluster
destination:
http:
uri: http://foo.bar
azureEventGridTopic:
endpoint: https://my-topic.eastus-1.eventgrid.azure.net/api/events

eventSubscription: #Optional. Submit included/excluded event types will filter events when emitting events.
includedEventTypes: #Optional. Only events in this section will be emitted.
- keda.scaledobject.failed.v1
Expand Down Expand Up @@ -80,6 +86,7 @@ There will be multiple types of destination to emit KEDA events to.
Here is an overview of the supported destinations:

- [HTTP endpoint](#http-endpoint).
- [Azure Event Grid endpoint](#azure-event-grid).

#### HTTP endpoint
```yaml
Expand All @@ -88,6 +95,36 @@ Here is an overview of the supported destinations:
uri: http://foo.bar #An http endpoint that can receive cloudevent
```
#### Azure Event Grid
```yaml
destination:
azureEventGrid:
endpoint: Endpoint:foo.bar #endpoint from AzureEventGrid Topic
```
Authentication information must be provided by using `authenticationRef` which allows you to provide the access key or managed identity for Azure Event Grid authentication by providing a `TriggerAuthentication`.

Here is an overview of the supported authentication types:

##### Connection String Authentication

- `accessKey` - Access key string for the Azure Event Grid connection auth.

##### Pod identity based authentication
[Azure AD Workload Identity](https://azure.github.io/azure-workload-identity/docs/) providers can be used.

```yaml
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: nameOfTriggerAuth
namespace: default
spec:
podIdentity:
provider: azure-workload
```

### Event Filter

You can include filter(s) to define what event types you are interested in, or want to ignore. This is done by using `includedEventTypes` or `excludedEventTypes` respectively for a given sink.
Expand Down

0 comments on commit 31251ff

Please sign in to comment.