diff --git a/pkg/scalers/mssql_scaler.go b/pkg/scalers/mssql_scaler.go index 0b4ae633979..845fc716049 100644 --- a/pkg/scalers/mssql_scaler.go +++ b/pkg/scalers/mssql_scaler.go @@ -27,21 +27,22 @@ type mssqlScaler struct { } type mssqlMetadata struct { - ConnectionString string `keda:"name=connectionString,order=authParams;resolvedEnv;triggerMetadata,optional"` - Username string `keda:"name=username,order=authParams;triggerMetadata,optional"` - Password string `keda:"name=password,order=authParams;resolvedEnv;triggerMetadata,optional"` - Host string `keda:"name=host,order=authParams;triggerMetadata,optional"` - Port int `keda:"name=port,order=authParams;triggerMetadata,optional"` - Database string `keda:"name=database,order=authParams;triggerMetadata,optional"` - 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"` + ConnectionString string `keda:"name=connectionString,order=authParams;resolvedEnv;triggerMetadata,optional"` + Username string `keda:"name=username,order=authParams;triggerMetadata,optional"` + Password string `keda:"name=password,order=authParams;resolvedEnv;triggerMetadata,optional"` + Host string `keda:"name=host,order=authParams;triggerMetadata,optional"` + Port int `keda:"name=port,order=authParams;triggerMetadata,optional"` + Database string `keda:"name=database,order=authParams;triggerMetadata,optional"` + Query string `keda:"name=query,order=triggerMetadata"` + TargetValue float64 `keda:"name=targetValue,order=triggerMetadata"` + ActivationTargetValue float64 `keda:"name=activationTargetValue,order=triggerMetadata,optional,default=0"` 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,