fix(values): Remove tplString in environment directive

We badly set a "tpl string" in values.yaml file for "values" labels set
in compose.yaml file.
This commit is contained in:
2024-10-23 16:17:01 +02:00
parent 865473b41b
commit 164a617869

View File

@@ -94,14 +94,10 @@ func NewConfigMap(service types.ServiceConfig, appName string, forFile bool) *Co
done[value] = true done[value] = true
continue continue
} }
val := utils.TplValue(service.Name, "environment."+value)
service.Environment[value] = &val
} }
if forFile { if !forFile {
// do not bind env variables to the configmap // do not bind env variables to the configmap
return cm
}
// remove the variables that are already defined in the environment // remove the variables that are already defined in the environment
if l, ok := service.Labels[LabelMapEnv]; ok { if l, ok := service.Labels[LabelMapEnv]; ok {
envmap, err := labelStructs.MapEnvFrom(l) envmap, err := labelStructs.MapEnvFrom(l)
@@ -113,6 +109,7 @@ func NewConfigMap(service types.ServiceConfig, appName string, forFile bool) *Co
done[key] = true done[key] = true
} }
} }
}
for key, env := range service.Environment { for key, env := range service.Environment {
_, isDropped := drop[key] _, isDropped := drop[key]
_, isDone := done[key] _, isDone := done[key]