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, ",")
}

View File

@@ -9,6 +9,13 @@ import (
)
const K = "katenary.io"
const (
LABEL_ENV_SECRET = K + "/secret-envfiles"
LABEL_PORT = K + "/ports"
LABEL_INGRESS = K + "/ingress"
LABEL_ENV_SERVICE = K + "/env-to-service"
LABEL_VOL_CM = K + "/configmap-volumes"
)
var Appname = ""