Add support for file based secret (#1159)

* Support file based secret
* Fix issue about read-only volume path and add support to absolute path at long-syntax
This commit is contained in:
João Vitor Paes de Barros do Carmo
2019-12-01 12:05:31 +08:00
committed by Hang Yan
parent ac2b852955
commit 30736a3973
16 changed files with 687 additions and 7 deletions
+5 -2
View File
@@ -29,6 +29,8 @@ type KomposeObject struct {
// Transformer need to know origin format in order to tell user what tag is not supported in origin format
// as they can have different names. For example environment variables are called environment in compose but Env in bundle.
LoadedFrom string
Secrets map[string]dockerCliTypes.SecretConfig
}
// ConvertOptions holds all options that controls transformation process
@@ -110,8 +112,9 @@ type ServiceConfig struct {
Replicas int `compose:"replicas"`
GroupAdd []int64 `compose:"group_add"`
Volumes []Volumes `compose:""`
HealthChecks HealthCheck `compose:""`
Placement map[string]string `compose:""`
Secrets []dockerCliTypes.ServiceSecretConfig
HealthChecks HealthCheck `compose:""`
Placement map[string]string `compose:""`
//This is for long LONG SYNTAX link(https://docs.docker.com/compose/compose-file/#long-syntax)
Configs []dockerCliTypes.ServiceConfigObjConfig `compose:""`
//This is for SHORT SYNTAX link(https://docs.docker.com/compose/compose-file/#configs)