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
2 changes: 1 addition & 1 deletion components/schemas/containers/config/ContainerNetwork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ properties:
- "null"
description: Custom network routes applied to the container's instances.
items:
$ref: ./network/NetworkRoute.yml
$ref: ./network/NetworkRouteConfig.yml
hostname:
type: string
description: The hostname for the given container.
Expand Down
18 changes: 0 additions & 18 deletions components/schemas/containers/config/network/NetworkRoute.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
title: NetworkRouteConfig
type: object
description: A single network route directing traffic for a destination network.
required:
- destination
- source
- ensure_source_exists
- gateway
properties:
destination:
description: The destination network, in CIDR notation, that this route matches.
oneOf:
- $ref: ../../../Cidr.yml
- type: "null"
source:
description: >-
The source network, in CIDR notation, that this route applies to.
oneOf:
- $ref: ../../../Cidr.yml
- type: "null"
ensure_source_exists:
type: boolean
description: >-
When true, the source address is verified to exist on the host before
this route is applied.
family:
description: The IP protocol family this route applies to.
oneOf:
- type: string
enum:
- ipv4
- ipv6
- type: "null"
gateway:
description: The IP address that traffic matching the destination is forwarded to.
$ref: ../../../IpAddress.yml
nexthops:
type: array
description: Additional next hops for this route, used for multipath (ECMP) routing.
items:
$ref: ./NetworkRouteConfigNexthop.yml
interface:
type: string
description: The name of the network interface this route is bound to.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
title: NetworkRouteConfigNexthop
type: object
description: A single next hop for a multipath network route.
required:
- gateway
properties:
gateway:
description: The IP address of this next hop's gateway.
$ref: ../../../IpAddress.yml
hop_weight:
description: >-
The relative weight of this next hop when distributing traffic across
multiple next hops.
oneOf:
- type: integer
format: int64
- type: "null"
50 changes: 50 additions & 0 deletions stackspec/schema/StackSpecContainerConfigNetwork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,61 @@ properties:
- $ref: ../../components/schemas/Cidr.yml
- type: "null"
- $ref: StackVariable.yml
source:
description: >-
The source network, in CIDR notation, that this route applies to.
Used for source-based (policy) routing.
oneOf:
- $ref: ../../components/schemas/Cidr.yml
- type: "null"
- $ref: StackVariable.yml
ensure_source_exists:
description: >-
When true, the source address is verified to exist on the host
before this route is applied.
oneOf:
- type: boolean
- $ref: StackVariable.yml
family:
description: The IP protocol family this route applies to.
oneOf:
- type: string
enum:
- ipv4
- ipv6
- type: "null"
- $ref: StackVariable.yml
gateway:
description: The IP address that traffic matching the destination is forwarded to.
oneOf:
- $ref: ../../components/schemas/IpAddress.yml
- $ref: StackVariable.yml
nexthops:
description: Additional next hops for this route, used for multipath routing.
oneOf:
- type: array
items:
title: NetworkRouteNexthop
type: object
description: A single next hop for a multipath network route.
required:
- gateway
properties:
gateway:
description: The IP address of this next hop's gateway.
oneOf:
- $ref: ../../components/schemas/IpAddress.yml
- $ref: StackVariable.yml
hop_weight:
description: >-
The relative weight of this next hop when distributing
traffic across multiple next hops.
oneOf:
- type: integer
format: int64
- type: "null"
- $ref: StackVariable.yml
- $ref: StackVariable.yml
interface:
description: The name of the network interface this route is bound to.
oneOf:
Expand Down
Loading