From ae5a792c01100b690b2e619b213fbcf1bdbb1796 Mon Sep 17 00:00:00 2001 From: Alejandro Visiedo Date: Wed, 20 Mar 2024 09:37:41 +0100 Subject: [PATCH] fix(HMS-3731): workaround to fix type for cloudwatch Temporary workaround that fill type with "cloudwatch" string when we fill the cloudwatch configuration. Once the referenced PR is merged, we can remove See: https://github.com/RedHatInsights/clowder/pull/627 Signed-off-by: Alejandro Visiedo --- internal/config/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/config/config.go b/internal/config/config.go index 0f2ce267..38a70dc8 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -290,6 +290,11 @@ func setClowderConfiguration(v *viper.Viper, clowderConfig *clowder.AppConfig) { v.Set("logging.cloudwatch.group", clowderConfig.Logging.Cloudwatch.LogGroup) v.Set("logging.cloudwatch.region", clowderConfig.Logging.Cloudwatch.Region) v.Set("logging.cloudwatch.secret", clowderConfig.Logging.Cloudwatch.SecretAccessKey) + // TODO Delete the block below when the below PR is merged + // See: https://github.com/RedHatInsights/clowder/pull/627 + if clowderConfig.Logging.Type == "" && len(clowderConfig.Logging.Cloudwatch.SecretAccessKey) > 0 { + v.Set("logging.type", "cloudwatch") + } } // Metrics configuration