Trim spaces on coma separated values
Maybe a function to ensure this... later...
This commit is contained in:
@@ -573,6 +573,7 @@ func prepareEnvFromFiles(name string, s *types.ServiceConfig, container *helm.Co
|
|||||||
cf := f + "-" + name
|
cf := f + "-" + name
|
||||||
isSecret := false
|
isSecret := false
|
||||||
for _, s := range secretsFiles {
|
for _, s := range secretsFiles {
|
||||||
|
s = strings.TrimSpace(s)
|
||||||
if s == envfile {
|
if s == envfile {
|
||||||
isSecret = true
|
isSecret = true
|
||||||
}
|
}
|
||||||
@@ -746,6 +747,7 @@ func setSecretVar(name string, s *types.ServiceConfig, c *helm.Container) *helm.
|
|||||||
|
|
||||||
store := helm.NewSecret(name + "-secrets")
|
store := helm.NewSecret(name + "-secrets")
|
||||||
for _, secretvar := range strings.Split(secretvars, ",") {
|
for _, secretvar := range strings.Split(secretvars, ",") {
|
||||||
|
secretvar = strings.TrimSpace(secretvar)
|
||||||
// get the value from env
|
// get the value from env
|
||||||
_, ok := s.Environment[secretvar]
|
_, ok := s.Environment[secretvar]
|
||||||
if !ok {
|
if !ok {
|
||||||
|
Reference in New Issue
Block a user