A KEDA external scaler for Durable Task Framework (DTFx) and Azure Durable Function applications in Kubernetes that rely on the Azure Storage backend.
This specification describes the external trigger for applications that use the Durable Task Azure Storage provider.
triggers:
- type: external
metadata:
scalerAddress: dtfx-scaler.keda:4370
connectionFromEnv: STORAGE_CONNECTIONSTRING_ENV_NAME
maxActivitiesPerWorker: 5
maxOrchestrationsPerWorker: 2
taskHubName: mytaskhubaccountName- Optional name of the Azure Storage account used by the Durable Task Framework (DTFx). This value is only required whenuseManagedIdentityistrueactiveDirectoryEndpoint- Optional host authority for Azure Active Directory (AAD). This value is only required whencloudisPrivate. Otherwise, the value is automatically derived for well-known cloud environmentsclientId- Optional identity used when authenticating via managed identity. This value can only be specified whenuseManagedIdentityistruecloud- Optional name of the cloud environment that contains the Azure Storage account. Must be a known Azure cloud environment, orPrivatefor Azure Stack Hub or air-gapped clouds. IfPrivateis specified, bothendpointSuffixandactiveDirectoryEndpointmust be specified. Defaults to theAzurePublicCloud. Possible values include:AzurePublicCloudAzureUSGovernmentCloudAzureChinaCloudAzureGermanCloudPrivate
connection- Optional connection string for the Azure Storage account that may be used as an alternative toconnectionFromEnvconnectionFromEnv- Optional name of the environment variable your deployment uses to get the connection string. Defaults toAzureWebJobsStorageendpointSuffix- Optional suffix for the Azure Storage service URLs. This value is only required whencloudisPrivate. Otherwise, the value is automatically derived for well-known cloud environmentsmaxActivitiesPerWorker- Optional maximum number of activity work items that a single worker may process at any time. This is equivalent toMaxConcurrentActivityFunctionsin Azure Durable Functions andMaxConcurrentTaskActivityWorkItemsin the Durable Task Framework (DTFx). Must be greater than 0. Defaults to10maxOrchestrationsPerWorker- Optional maximum number of orchestration work items that a single worker may process at any time. This is equivalent toMaxConcurrentOrchestratorFunctionsin Azure Durable Functions andMaxConcurrentTaskOrchestrationWorkItemsin the Durable Task Framework (DTFx). Must be greater than 0. Defaults to5scalerAddress- Required address for the scaler service within the Kubernetes cluster. The format of the address is<scaler-service-name>.<scaler-kubernetes-namespace>:<port>. By default, the chart uses port4370while the service name and namespace are dependent on the Helm installation command. For example, an installation likehelm install -n keda dtfx-scaler wsugarman/durabletask-azurestorage-scalerwould use the addressdtfx-scaler.keda:4370. For more details, please see the service template in the Helm charttaskHubName- Optional name of the Durable Task Framework (DTFx) task hub. This name is used when determining the name of blob containers, tables, and queues related to the application. Defaults toTestHubNameuseManagedIdentity- Optionally indicates that AAD pod identity or workload identity should be used to authenticate between the scaler and the Azure Storage account. Iftrue,Accountmust be specified, and the appropriate annotations, bindings, and/or labels must be configured for the deployment. Defaults tofalse
The scaler supports authentication using either an Azure Storage connection string, AAD pod identity, or Azure AD Workload Identity.
Connection strings may be specified using an environment variable exposed to the deployment using the parameter connectionFromEnv. By default, the scaler will look for an environment variable called AzureWebJobsStorage. For example:
triggers:
- type: external
metadata:
scalerAddress: dtfx-scaler.keda:4370 # Required. Address of the external scaler service
connectionFromEnv: <variable> # Optional. By default 'AzureWebJobsStorage'Connection strings may also be specified directly via the connection parameter:
triggers:
- type: external
metadata:
scalerAddress: dtfx-scaler.keda:4370 # Required. Address of the external scaler service
connection: <connection> # Optional. Defaults to connectionFromEnvKEDA external scalers do not support the use of TriggerAuthentication, but the scaler can still leverage an identity-based connection. To use an identity, the scaler deployment must include an AAD Pod Binding or Workload Identity Service Account labels. If there are multiple identities, be sure to specify the clientId parameter if not already specified for Workload Identity.
An example specification that uses an identity-based connection can be seen below:
triggers:
- type: external
metadata:
scalerAddress: dtfx-scaler.keda:4370 # Required. Address of the external scaler service
accountName: <name> # Optional. Required for pod identity
clientId: <client-id> # Optional. Recommended if there are multiple identities
cloud: <cloud> # Optional. Defaults to AzurePublicCloud
useManagedIdentity: true # Optional. Must be true for managed identity. Defaults to falseThe scaler is available as a Helm chart in the repository https://wsugarman.github.io/charts:
helm repo add wsugarman https://wsugarman.github.io/charts
helm repo update
helm install --namespace keda --create-namespace dtfx-scaler wsugarman/durabletask-azurestorage-scalerFor more information, see the chart README or visit Artifact Hub.
The external scaler is licensed under the MIT license. The storm icon was created by Evon and is licensed royalty-free through The Noun Project.