Make use of driver and driver_opts fields in secrets

Signed-off-by: Sune Keller <absukl@almbrand.dk>
This commit is contained in:
Sune Keller
2019-03-28 16:16:54 +01:00
committed by Sune Keller
parent 89f9d806ff
commit c662ba03de
3 changed files with 38 additions and 3 deletions

View File

@ -634,7 +634,8 @@ func LoadConfigObjs(source map[string]interface{}, details types.ConfigDetails)
func loadFileObjectConfig(name string, objType string, obj types.FileObjectConfig, details types.ConfigDetails) (types.FileObjectConfig, error) {
// if "external: true"
if obj.External.External {
switch {
case obj.External.External:
// handle deprecated external.name
if obj.External.Name != "" {
if obj.Name != "" {
@ -651,7 +652,11 @@ func loadFileObjectConfig(name string, objType string, obj types.FileObjectConfi
}
}
// if not "external: true"
} else {
case obj.Driver != "":
if obj.File != "" {
return obj, errors.Errorf("%[1]s %[2]s: %[1]s.driver and %[1]s.file conflict; only use %[1]s.driver", objType, name)
}
default:
obj.File = absPath(details.WorkingDir, obj.File)
}