mirror of https://github.com/docker/cli.git
Fix endpoint mode in Compose format.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
d37d03c9dc
commit
64c6b9a938
|
@ -1,4 +1,4 @@
|
|||
version: "3"
|
||||
version: "3.2"
|
||||
|
||||
services:
|
||||
foo:
|
||||
|
@ -45,6 +45,7 @@ services:
|
|||
window: 120s
|
||||
placement:
|
||||
constraints: [node=foo]
|
||||
endpoint_mode: dnsrr
|
||||
|
||||
devices:
|
||||
- "/dev/ttyUSB0:/dev/ttyUSB0"
|
||||
|
|
|
@ -220,9 +220,7 @@ func transform(source map[string]interface{}, target interface{}) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = decoder.Decode(source)
|
||||
// TODO: log unused keys
|
||||
return err
|
||||
return decoder.Decode(source)
|
||||
}
|
||||
|
||||
func transformHook(
|
||||
|
|
|
@ -674,6 +674,7 @@ func TestFullExample(t *testing.T) {
|
|||
Placement: types.Placement{
|
||||
Constraints: []string{"node=foo"},
|
||||
},
|
||||
EndpointMode: "dnsrr",
|
||||
},
|
||||
Devices: []string{"/dev/ttyUSB0:/dev/ttyUSB0"},
|
||||
DNS: []string{"8.8.8.8", "9.9.9.9"},
|
||||
|
|
|
@ -158,7 +158,7 @@ type DeployConfig struct {
|
|||
Resources Resources
|
||||
RestartPolicy *RestartPolicy `mapstructure:"restart_policy"`
|
||||
Placement Placement
|
||||
EndpointMode string
|
||||
EndpointMode string `mapstructure:"endpoint_mode"`
|
||||
}
|
||||
|
||||
// HealthCheckConfig the healthcheck configuration for a service
|
||||
|
|
Loading…
Reference in New Issue