Add mapenv label that is more agnostic
- that means that katenary.io/env-to-service is now DEPRECATED - the yaml style in label is OK, that allows more possibilities and adaptation for users
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package helm
|
||||
|
||||
import (
|
||||
"katenary/logger"
|
||||
"strings"
|
||||
|
||||
"github.com/compose-spec/compose-go/types"
|
||||
@@ -44,6 +45,17 @@ func NewContainer(name, image string, environment types.MappingWithEquals, label
|
||||
if bound, ok := labels[LABEL_ENV_SERVICE]; ok {
|
||||
toServices = strings.Split(bound, ",")
|
||||
}
|
||||
if len(toServices) > 0 {
|
||||
// warn, it's deprecated now
|
||||
logger.ActivateColors = true
|
||||
logger.Yellowf(
|
||||
"[deprecated] in \"%s\" service: label %s is deprecated, please use %s instead\n",
|
||||
name,
|
||||
LABEL_ENV_SERVICE,
|
||||
LABEL_MAP_ENV,
|
||||
)
|
||||
logger.ActivateColors = false
|
||||
}
|
||||
|
||||
idx := 0
|
||||
for n, v := range environment {
|
||||
|
Reference in New Issue
Block a user