Skip to content

Commit 46374fa

Browse files
authored
Update Chart for v3 (#590)
- Update README with corrections and nitpicks - Update chart.yaml - Properly dispose of the previous certificate - Use slim builder for web app
1 parent dc21d63 commit 46374fa

File tree

7 files changed

+95
-84
lines changed

7 files changed

+95
-84
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ This specification describes the `external` trigger for applications that use th
2424
### Parameter List
2525
- **`accountName`** - Optional name of the Azure Storage account used by the Durable Task Framework (DTFx). This value is only required when `useManagedIdentity` is `true`
2626
- **`clientId`** - Optional identity used when authenticating via managed identity. This value can only be specified when `useManagedIdentity` is `true`
27-
- **`cloud`** - Optional name of the cloud environment that contains the Azure Storage account. Must be a known Azure cloud environment, or `Private` for Azure Stack Hub or air-gapped clouds. If `Private` is specified, both `endpointSuffix` and `activeDirectoryEndpoint` must be specified. Defaults to the `'AzurePublicCloud'`. Possible values include:
27+
- **`cloud`** - Optional name of the cloud environment that contains the Azure Storage account. Must be a known Azure cloud environment, or `Private` for Azure Stack Hub or air-gapped clouds. If `'Private'` is specified, both `endpointSuffix` and `entraEndpoint` must be specified. Defaults to the `'AzurePublicCloud'`. Possible values include:
2828
- `AzurePublicCloud`
2929
- `AzureUSGovernmentCloud`
3030
- `AzureChinaCloud`
3131
- `Private`
3232
- **`connection`** - Optional connection string for the Azure Storage account that may be used as an alternative to `connectionFromEnv`
3333
- **`connectionFromEnv`** - Optional name of the environment variable your deployment uses to get the connection string. Defaults to `'AzureWebJobsStorage'`
34-
- **`endpointSuffix`** - Optional suffix for the Azure Storage service URLs. This value is only required when `cloud` is `Private`. Otherwise, the value is automatically derived for well-known cloud environments
35-
- **`entraEndpoint`** - Optional host authority for Microsoft Entra. This value is only required when `cloud` is `Private`. Otherwise, the value is automatically derived for well-known cloud environments
34+
- **`endpointSuffix`** - Optional suffix for the Azure Storage service URLs. This value is only required when `cloud` is `'Private'`. Otherwise, the value is automatically derived for well-known cloud environments
35+
- **`entraEndpoint`** - Optional host authority for Microsoft Entra. This value is only required when `cloud` is `'Private'`. Otherwise, the value is automatically derived for well-known cloud environments
3636
- **`maxActivitiesPerWorker`** - Optional maximum number of activity work items that a single worker may process at any time. This is equivalent to `MaxConcurrentActivityFunctions`in Azure Durable Functions and `MaxConcurrentTaskActivityWorkItems` in the Durable Task Framework (DTFx). Must be greater than 0. Defaults to `10`
3737
- **`maxOrchestrationsPerWorker`** - Optional maximum number of orchestration work items that a single worker may process at any time. This is equivalent to `MaxConcurrentOrchestratorFunctions` in Azure Durable Functions and `MaxConcurrentTaskOrchestrationWorkItems` in the Durable Task Framework (DTFx). Must be greater than 0. Defaults to `5`
38-
- **`scalerAddress`** - 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 port `4370` while the service name and namespace are dependent on the Helm installation command. For example, an installation like `helm install -n keda dtfx-scaler wsugarman/durabletask-azurestorage-scaler` would use the address `dtfx-scaler.keda:4370`. For more details, please see the [service template](/charts/durabletask-azurestorage-scaler/templates/03-service.yaml) in the Helm chart
38+
- **`scalerAddress`** - 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 port `4370` while the service name and namespace are dependent on the Helm installation command. For example, an installation like `helm install -n keda dtfx-scaler wsugarman/durabletask-azurestorage-scaler` would use the address `dtfx-scaler.keda:4370`. For more details, please see the [service template](/charts/durabletask-azurestorage-scaler/templates/03-service.yaml) in the Helm chart
3939
- **`taskHubName`** - 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 to `'TestHubName'`
4040
- **`useManagedIdentity`** - Optionally indicates that Microsoft Entra Workload Identity should be used to authenticate between the scaler and the Azure Storage account. If `true`, `Account` must be specified, and the scaler deployment must also include a workload identity. Defaults to `false`
4141
- **`useTablePartitionManagement`** - Optionally indicates that the task hub uses the newer [Partition Manager V3](https://techcommunity.microsoft.com/blog/appsonazureblog/preview-of-durable-functions-extension-v3-0-0/4000452) that relies on Azure Table Storage instead of the older Blob-based Partition Manager. Defaults to `true`

charts/durabletask-azurestorage-scaler/Chart.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Version corresponds to the chart version and should be updated every time the chart is changed.
33
# AppVersion on the other hand should be updated every time the web app is changed.
44
apiVersion: v2
5-
appVersion: "2.1.0"
5+
appVersion: "3.0.0"
66
description: A KEDA external scaler for the Durable Task Azure Storage backend
77
home: https://github.com/wsugarman/durabletask-azurestorage-scaler
88
icon: https://raw.githubusercontent.com/wsugarman/durabletask-azurestorage-scaler/main/img/storm-icon.png
@@ -17,16 +17,22 @@ name: durabletask-azurestorage-scaler
1717
sources:
1818
- https://github.com/wsugarman/durabletask-azurestorage-scaler
1919
type: application
20-
version: "2.1.0"
20+
version: "3.0.0"
2121
annotations:
2222
artifacthub.io/category: monitoring-logging
2323
artifacthub.io/changes: |
2424
- kind: added
25-
description: Added new readiness check when TLS is enabled to ensure that the configured certificates are available.
25+
description: Added support for Partition Manager v3 using the new useTablePartitionManagement field in the ScaledObject
26+
- kind: changed
27+
description: Updated base image to mcr.microsoft.com/dotnet/aspnet:9.0.0-azurelinux3.0-distroless
28+
- kind: fixed
29+
description: Fixed possible race condition when reloading certificates that may be currently in use
30+
- kind: removed
31+
description: Removed support for AAD Pod Identity. Microsoft Entra Workload Identity is now the recommended approach
2632
artifacthub.io/containsSecurityUpdates: "false"
2733
artifacthub.io/images: |
2834
- name: durabletask-azurestorage-scaler
29-
image: ghcr.io/wsugarman/durabletask-azurestorage-scaler:2.1.0
35+
image: ghcr.io/wsugarman/durabletask-azurestorage-scaler:3.0.0
3036
platforms:
3137
- linux/amd64
3238
artifacthub.io/license: MIT

src/Keda.Scaler.DurableTask.AzureStorage.Test/Certificates/ConfigureCustomTrustStore.Test.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ public async ValueTask GivenCertificateFileChange_WhenConfiguringOptions_ThenUpd
143143
{
144144
configure.Configure(options);
145145
actual = Assert.Single(options.CustomTrustStore);
146-
} while (actual.Thumbprint != expected2.Thumbprint || Volatile.Read(ref reloads) is 0);
146+
} while (Volatile.Read(ref reloads) is 0 && !TestContext.Current.CancellationToken.IsCancellationRequested);
147147

148+
actual = Assert.Single(options.CustomTrustStore);
149+
Assert.Equal(expected2.Thumbprint, actual.Thumbprint);
148150
Assert.Equal(X509ChainTrustMode.CustomRootTrust, options.ChainTrustValidationMode);
149151
Assert.Equal(1, Volatile.Read(ref reloads));
150152
}

src/Keda.Scaler.DurableTask.AzureStorage/Certificates/ConfigureCustomTrustStore.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ private void Reload(X509Certificate2 certificate)
7474
{
7575
_certificateLock.EnterWriteLock();
7676

77+
_certificates[0].Dispose();
7778
_certificates = [certificate];
7879
ConfigurationReloadToken previousToken = Interlocked.Exchange(ref _reloadToken, new ConfigurationReloadToken());
7980
previousToken.OnReload();

src/Keda.Scaler.DurableTask.AzureStorage/Gen/Microsoft.Extensions.Configuration.Binder.SourceGeneration/Microsoft.Extensions.Configuration.Binder.SourceGeneration.ConfigurationBindingGenerator/BindingExtensions.g.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public static void Bind_ScalerOptions(this IConfiguration configuration, object?
6969

7070
#region OptionsBuilder<TOptions> extensions.
7171
/// <summary>Registers the dependency injection container to bind <typeparamref name="TOptions"/> against the <see cref="IConfiguration"/> obtained from the DI service provider.</summary>
72-
[InterceptsLocation(1, "wgqWBPyxn2CKVzq/OBRyozYEAABJU2VydmljZUNvbGxlY3Rpb24uRXh0ZW5zaW9ucy5jcw==")] // C:\Git\durabletask-azurestorage-scaler\src\Keda.Scaler.DurableTask.AzureStorage\Certificates\IServiceCollection.Extensions.cs(26,14)
73-
[InterceptsLocation(1, "wgqWBPyxn2CKVzq/OBRyo+0FAABJU2VydmljZUNvbGxlY3Rpb24uRXh0ZW5zaW9ucy5jcw==")] // C:\Git\durabletask-azurestorage-scaler\src\Keda.Scaler.DurableTask.AzureStorage\Certificates\IServiceCollection.Extensions.cs(34,14)
72+
[InterceptsLocation(1, "/3MNeE1JY/xkE9t5VlNxzzYEAABJU2VydmljZUNvbGxlY3Rpb24uRXh0ZW5zaW9ucy5jcw==")] // C:\Git\durabletask-azurestorage-scaler\src\Keda.Scaler.DurableTask.AzureStorage\Certificates\IServiceCollection.Extensions.cs(26,14)
73+
[InterceptsLocation(1, "/3MNeE1JY/xkE9t5VlNxz+0FAABJU2VydmljZUNvbGxlY3Rpb24uRXh0ZW5zaW9ucy5jcw==")] // C:\Git\durabletask-azurestorage-scaler\src\Keda.Scaler.DurableTask.AzureStorage\Certificates\IServiceCollection.Extensions.cs(34,14)
7474
public static OptionsBuilder<TOptions> BindConfiguration<TOptions>(this OptionsBuilder<TOptions> optionsBuilder, string configSectionPath, Action<BinderOptions>? configureBinder = null) where TOptions : class
7575
{
7676
ArgumentNullException.ThrowIfNull(optionsBuilder);

0 commit comments

Comments
 (0)