diff --git a/schema/compose-spec.json b/schema/compose-spec.json index f2dc22ad..1da7f228 100644 --- a/schema/compose-spec.json +++ b/schema/compose-spec.json @@ -320,7 +320,8 @@ "^.+$": {"type": ["string", "number"]} } }, - "priority": {"type": "number"} + "priority": {"type": "number"}, + "gw_priority": {"type": "number"} }, "additionalProperties": false, "patternProperties": {"^x-": {}} diff --git a/types/types.go b/types/types.go index 83ad830e..4c7baa46 100644 --- a/types/types.go +++ b/types/types.go @@ -438,13 +438,14 @@ type PlacementPreferences struct { // ServiceNetworkConfig is the network configuration for a service type ServiceNetworkConfig struct { - Priority int `yaml:"priority,omitempty" json:"priority,omitempty"` - Aliases []string `yaml:"aliases,omitempty" json:"aliases,omitempty"` - Ipv4Address string `yaml:"ipv4_address,omitempty" json:"ipv4_address,omitempty"` - Ipv6Address string `yaml:"ipv6_address,omitempty" json:"ipv6_address,omitempty"` - LinkLocalIPs []string `yaml:"link_local_ips,omitempty" json:"link_local_ips,omitempty"` - MacAddress string `yaml:"mac_address,omitempty" json:"mac_address,omitempty"` - DriverOpts Options `yaml:"driver_opts,omitempty" json:"driver_opts,omitempty"` + Priority int `yaml:"priority,omitempty" json:"priority,omitempty"` + GatewayPriority int `yaml:"gw_priority,omitempty" json:"gw_priority,omitempty"` + Aliases []string `yaml:"aliases,omitempty" json:"aliases,omitempty"` + Ipv4Address string `yaml:"ipv4_address,omitempty" json:"ipv4_address,omitempty"` + Ipv6Address string `yaml:"ipv6_address,omitempty" json:"ipv6_address,omitempty"` + LinkLocalIPs []string `yaml:"link_local_ips,omitempty" json:"link_local_ips,omitempty"` + MacAddress string `yaml:"mac_address,omitempty" json:"mac_address,omitempty"` + DriverOpts Options `yaml:"driver_opts,omitempty" json:"driver_opts,omitempty"` Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"` }