From 2dbb416e3e779c82a3e47c478e81ac9f8eda6afe Mon Sep 17 00:00:00 2001 From: Rick Brouwer Date: Sun, 17 Nov 2024 14:41:05 +0100 Subject: [PATCH] Remove deprecated tlsCertFile from External scaler Signed-off-by: Rick Brouwer --- CHANGELOG.md | 2 +- pkg/scalers/external_scaler.go | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbba7b57a05..e693e6d14b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -84,7 +84,7 @@ New deprecation(s): ### Breaking Changes -- TODO ([#XXX](https://github.com/kedacore/keda/issues/XXX)) +**External Scaler**: Remove deprecated tlsCertFile from External scaler ([#4549](https://github.com/kedacore/keda/issues/4549)) ### Other diff --git a/pkg/scalers/external_scaler.go b/pkg/scalers/external_scaler.go index f6e0ef63acc..de82a8d97d8 100644 --- a/pkg/scalers/external_scaler.go +++ b/pkg/scalers/external_scaler.go @@ -35,7 +35,6 @@ type externalPushScaler struct { type externalScalerMetadata struct { scalerAddress string - tlsCertFile string originalMetadata map[string]string triggerIndex int caCert string @@ -116,10 +115,6 @@ func parseExternalScalerMetadata(config *scalersconfig.ScalerConfig) (externalSc return meta, fmt.Errorf("scaler Address is a required field") } - if val, ok := config.TriggerMetadata["tlsCertFile"]; ok && val != "" { - meta.tlsCertFile = val - } - meta.originalMetadata = make(map[string]string) if val, ok := config.AuthParams["caCert"]; ok { meta.caCert = val @@ -306,19 +301,6 @@ func getClientForConnectionPool(metadata externalScalerMetadata, logger logr.Log defer connectionPoolMutex.Unlock() buildGRPCConnection := func(metadata externalScalerMetadata) (*grpc.ClientConn, error) { - // FIXME: DEPRECATED to be removed in v2.13 https://github.com/kedacore/keda/issues/4549 - if metadata.tlsCertFile != "" { - logger.V(1).Info("tlsCertFile in ScaleObject metadata will be deprecated in v2.12. Please use" + - "tlsClientCert, tlsClientKey and caCert in TriggerAuthentication instead.") - creds, err := credentials.NewClientTLSFromFile(metadata.tlsCertFile, "") - if err != nil { - return nil, err - } - return grpc.NewClient(metadata.scalerAddress, - grpc.WithDefaultServiceConfig(grpcConfig), - grpc.WithTransportCredentials(creds)) - } - tlsConfig, err := util.NewTLSConfig(metadata.tlsClientCert, metadata.tlsClientKey, metadata.caCert, metadata.unsafeSsl) if err != nil { return nil, err