Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cli/compose/convert/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func Service(
Placement: &swarm.Placement{
Constraints: service.Deploy.Placement.Constraints,
Preferences: getPlacementPreference(service.Deploy.Placement.Preferences),
MaxReplicas: service.Deploy.Placement.MaxReplicas,
},
},
EndpointSpec: endpoint,
Expand Down
3 changes: 2 additions & 1 deletion cli/compose/loader/full-example.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.7"
version: "3.8"

services:
foo:
Expand Down Expand Up @@ -82,6 +82,7 @@ services:
window: 120s
placement:
constraints: [node=foo]
max_replicas_per_node: 5
preferences:
- spread: node.labels.az
endpoint_mode: dnsrr
Expand Down
11 changes: 7 additions & 4 deletions cli/compose/loader/full-struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func fullExampleConfig(workingDir, homeDir string) *types.Config {
return &types.Config{
Version: "3.7",
Version: "3.8",
Services: services(workingDir, homeDir),
Networks: networks(),
Volumes: volumes(),
Expand Down Expand Up @@ -111,6 +111,7 @@ func services(workingDir, homeDir string) []types.ServiceConfig {
},
Placement: types.Placement{
Constraints: []string{"node=foo"},
MaxReplicas: uint64(5),
Preferences: []types.PlacementPreferences{
{
Spread: "node.labels.az",
Expand Down Expand Up @@ -507,7 +508,7 @@ func secrets(workingDir string) map[string]types.SecretConfig {
}

func fullExampleYAML(workingDir string) string {
return fmt.Sprintf(`version: "3.7"
return fmt.Sprintf(`version: "3.8"
services:
foo:
build:
Expand Down Expand Up @@ -588,6 +589,7 @@ services:
- node=foo
preferences:
- spread: node.labels.az
max_replicas_per_node: 5
endpoint_mode: dnsrr
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
Expand Down Expand Up @@ -1083,7 +1085,8 @@ func fullExampleJSON(workingDir string) string {
{
"spread": "node.labels.az"
}
]
],
"max_replicas_per_node": 5
},
"endpoint_mode": "dnsrr"
},
Expand Down Expand Up @@ -1383,7 +1386,7 @@ func fullExampleJSON(workingDir string) string {
"working_dir": "/code"
}
},
"version": "3.7",
"version": "3.8",
"volumes": {
"another-volume": {
"name": "user_specified_name",
Expand Down
44 changes: 44 additions & 0 deletions cli/compose/schema/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading