Support config short syntax and fix old bugs (#1230)

This commit is contained in:
Hang Yan
2020-01-05 10:19:22 +08:00
committed by GitHub
parent fe4301192a
commit 05e9bf4fc8
13 changed files with 209 additions and 77 deletions
+5 -11
View File
@@ -798,18 +798,12 @@ func checkUnsupportedKeyForV3(composeObject *types.Config) []string {
var keysFound []string
for _, service := range composeObject.Services {
//For short syntax, volume mount path must be /, but this will cause pod create fail in kubernetes
//So we ignore this attribute
for _, tmpConfig := range service.Configs {
if tmpConfig.Mode == nil {
keysFound = append(keysFound, "short syntax config")
} else {
if tmpConfig.GID != "" {
keysFound = append(keysFound, "long syntax config gid")
}
if tmpConfig.UID != "" {
keysFound = append(keysFound, "long syntax config uid")
}
if tmpConfig.GID != "" {
keysFound = append(keysFound, "long syntax config gid")
}
if tmpConfig.UID != "" {
keysFound = append(keysFound, "long syntax config uid")
}
}