Change label system

This commit is contained in:
2021-12-02 14:56:51 +01:00
parent 04d54bc2a3
commit 96de1269fb
4 changed files with 21 additions and 12 deletions

View File

@@ -57,8 +57,9 @@ func NewContainer(name, image string, environment, labels map[string]string) *Co
EnvFrom: make([]map[string]map[string]string, 0),
}
// find bound environment variable to a service
toServices := make([]string, 0)
if bound, ok := labels[K+"/to-services"]; ok {
if bound, ok := labels[LABEL_ENV_SERVICE]; ok {
toServices = strings.Split(bound, ",")
}