From 633987ed46557e6cb2f3dee2a45adcb9a3fd2248 Mon Sep 17 00:00:00 2001 From: rickbrouwer Date: Mon, 16 Sep 2024 08:46:12 +0200 Subject: [PATCH] fix --- pkg/scalers/mssql_scaler.go | 9 +++++---- pkg/scalers/mssql_scaler_test.go | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/scalers/mssql_scaler.go b/pkg/scalers/mssql_scaler.go index 0b4ae633979..3b96303f246 100644 --- a/pkg/scalers/mssql_scaler.go +++ b/pkg/scalers/mssql_scaler.go @@ -36,12 +36,13 @@ type mssqlMetadata struct { Query string `keda:"name=query,order=triggerMetadata"` TargetValue float64 `keda:"name=targetValue,order=triggerMetadata"` ActivationTargetValue float64 `keda:"name=activationTargetValue,order=triggerMetadata,optional,default=0"` - WorkloadIdentityClientID string `keda:"name=WorkloadIdentityClientID,order=authParams;triggerMetadata,optional"` - WorkloadIdentityTenantID string `keda:"name=WorkloadIdentityTenantID,order=authParams;triggerMetadata,optional"` - WorkloadIdentityAuthorityHost string `keda:"name=WorkloadIdentityAuthorityHost,order=authParams;triggerMetadata,optional"` - WorkloadIdentityResource string `keda:"name=WorkloadIdentityResource,order=authParams;triggerMetadata,optional"` TriggerIndex int + + WorkloadIdentityResource string `keda:"name=WorkloadIdentityResource,order=authParams;triggerMetadata,optional"` + WorkloadIdentityClientID string + WorkloadIdentityTenantID string + WorkloadIdentityAuthorityHost string } func (m *mssqlMetadata) Validate() error { diff --git a/pkg/scalers/mssql_scaler_test.go b/pkg/scalers/mssql_scaler_test.go index 22ae1c14a21..2d18d495c3c 100644 --- a/pkg/scalers/mssql_scaler_test.go +++ b/pkg/scalers/mssql_scaler_test.go @@ -122,7 +122,7 @@ var testMSSQLMetadata = []parseMSSQLMetadataTestData{ }, resolvedEnv: map[string]string{}, authParams: map[string]string{ - "workloadIdentityResource": "https://database.windows.net/", + "workloadIdentityResource": "mssql-resource-id", }, podIdentity: v1alpha1.AuthPodIdentity{ Provider: v1alpha1.PodIdentityProviderAzureWorkload,