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:
@@ -94,23 +94,20 @@ 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
|
||||||
}
|
if l, ok := service.Labels[LabelMapEnv]; ok {
|
||||||
// remove the variables that are already defined in the environment
|
envmap, err := labelStructs.MapEnvFrom(l)
|
||||||
if l, ok := service.Labels[LabelMapEnv]; ok {
|
if err != nil {
|
||||||
envmap, err := labelStructs.MapEnvFrom(l)
|
log.Fatal("Error parsing map-env", err)
|
||||||
if err != nil {
|
}
|
||||||
log.Fatal("Error parsing map-env", err)
|
for key, value := range envmap {
|
||||||
}
|
cm.AddData(key, strings.ReplaceAll(value, "__APP__", appName))
|
||||||
for key, value := range envmap {
|
done[key] = true
|
||||||
cm.AddData(key, strings.ReplaceAll(value, "__APP__", appName))
|
}
|
||||||
done[key] = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for key, env := range service.Environment {
|
for key, env := range service.Environment {
|
||||||
|
Reference in New Issue
Block a user