From 0f5b66d209985e5e2569c25343f3f801ab0b9e07 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Fri, 6 May 2022 15:21:47 +0200 Subject: [PATCH] Trim spaces on coma separated values Maybe a function to ensure this... later... --- generator/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generator/main.go b/generator/main.go index f2d92cb..cec719f 100644 --- a/generator/main.go +++ b/generator/main.go @@ -573,6 +573,7 @@ func prepareEnvFromFiles(name string, s *types.ServiceConfig, container *helm.Co cf := f + "-" + name isSecret := false for _, s := range secretsFiles { + s = strings.TrimSpace(s) if s == envfile { isSecret = true } @@ -746,6 +747,7 @@ func setSecretVar(name string, s *types.ServiceConfig, c *helm.Container) *helm. store := helm.NewSecret(name + "-secrets") for _, secretvar := range strings.Split(secretvars, ",") { + secretvar = strings.TrimSpace(secretvar) // get the value from env _, ok := s.Environment[secretvar] if !ok {