Add ctlplane interface routes

For the isolated networks we use the subnets host_routes
to set and get the routes for overcloud node interfaces.

This change add's this to the ctlplane interface.

Partial: blueprint tripleo-routed-networks-templates
Change-Id: Id4cf0cc17bc331ae27f8d0ef8f285050330b7be0
This commit is contained in:
Harald Jensås 2018-09-25 01:06:48 +02:00
parent b8206cc0f5
commit 055e252872
39 changed files with 396 additions and 63 deletions

View File

@ -20,6 +20,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
ExternalIpSubnet: ExternalIpSubnet:
default: '' default: ''
description: IP address/subnet on the external network description: IP address/subnet on the external network

View File

@ -20,6 +20,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
ExternalIpSubnet: ExternalIpSubnet:
default: '' default: ''
description: IP address/subnet on the external network description: IP address/subnet on the external network

View File

@ -17,6 +17,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
ExternalIpSubnet: ExternalIpSubnet:
default: '' default: ''
description: IP address/subnet on the external network description: IP address/subnet on the external network

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -121,6 +121,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -27,6 +27,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -17,6 +17,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -25,6 +25,14 @@ parameters:
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
default: 192.168.24.1 default: 192.168.24.1
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
ControlPlaneSubnetCidr: ControlPlaneSubnetCidr:
default: '' default: ''
description: > description: >

View File

@ -20,6 +20,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -34,7 +34,11 @@ parameters:
type: string type: string
ControlPlaneStaticRoutes: ControlPlaneStaticRoutes:
default: [] default: []
description: A list of static routes description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []

View File

@ -32,6 +32,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -32,6 +32,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -31,6 +31,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []
description: > description: >

View File

@ -34,7 +34,11 @@ parameters:
type: string type: string
ControlPlaneStaticRoutes: ControlPlaneStaticRoutes:
default: [] default: []
description: A list of static routes description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json type: json
DnsServers: # Override this via parameter_defaults DnsServers: # Override this via parameter_defaults
default: [] default: []

View File

@ -21,6 +21,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{% for network in networks %} {% for network in networks %}
{{network.name}}IpSubnet: {{network.name}}IpSubnet:
default: '' default: ''
@ -90,10 +98,12 @@ resources:
- - get_param: ControlPlaneIp - - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr - get_param: ControlPlaneSubnetCidr
routes: routes:
- ip_netmask: 169.254.169.254/32 list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- - ip_netmask: 169.254.169.254/32
next_hop: next_hop:
get_param: EC2MetadataIp get_param: EC2MetadataIp
- default: true - default: true # NOTE(hjensas): This is the IPv4 default route
next_hop: next_hop:
get_param: ControlPlaneDefaultRoute get_param: ControlPlaneDefaultRoute
- type: ovs_bridge - type: ovs_bridge

View File

@ -19,6 +19,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{% for network in networks %} {% for network in networks %}
{{network.name}}IpSubnet: {{network.name}}IpSubnet:
default: '' default: ''
@ -88,7 +96,9 @@ resources:
- - get_param: ControlPlaneIp - - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr - get_param: ControlPlaneSubnetCidr
routes: routes:
- ip_netmask: 169.254.169.254/32 list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- - ip_netmask: 169.254.169.254/32
next_hop: next_hop:
get_param: EC2MetadataIp get_param: EC2MetadataIp
- default: true # NOTE(hjensas): This is the IPv4 default route - default: true # NOTE(hjensas): This is the IPv4 default route

View File

@ -17,6 +17,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{% for network in networks %} {% for network in networks %}
{{network.name}}IpSubnet: {{network.name}}IpSubnet:
default: '' default: ''
@ -93,6 +101,7 @@ resources:
- get_param: ControlPlaneSubnetCidr - get_param: ControlPlaneSubnetCidr
routes: routes:
list_concat_unique: list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- - ip_netmask: 169.254.169.254/32 - - ip_netmask: 169.254.169.254/32
next_hop: next_hop:
get_param: EC2MetadataIp get_param: EC2MetadataIp

View File

@ -19,6 +19,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{% for network in networks %} {% for network in networks %}
{{network.name}}IpSubnet: {{network.name}}IpSubnet:
default: '' default: ''
@ -84,7 +92,9 @@ resources:
- - get_param: ControlPlaneIp - - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr - get_param: ControlPlaneSubnetCidr
routes: routes:
- ip_netmask: 169.254.169.254/32 list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- - ip_netmask: 169.254.169.254/32
next_hop: next_hop:
get_param: EC2MetadataIp get_param: EC2MetadataIp
- default: true - default: true

View File

@ -18,6 +18,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{% for network in networks %} {% for network in networks %}
{{network.name}}IpSubnet: {{network.name}}IpSubnet:
default: '' default: ''
@ -83,7 +91,9 @@ resources:
- - get_param: ControlPlaneIp - - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr - get_param: ControlPlaneSubnetCidr
routes: routes:
- ip_netmask: 169.254.169.254/32 list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- - ip_netmask: 169.254.169.254/32
next_hop: next_hop:
get_param: EC2MetadataIp get_param: EC2MetadataIp
# IPv4 Default Route # IPv4 Default Route

View File

@ -17,6 +17,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{% for network in networks %} {% for network in networks %}
{{network.name}}IpSubnet: {{network.name}}IpSubnet:
default: '' default: ''
@ -88,7 +96,9 @@ resources:
- - get_param: ControlPlaneIp - - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr - get_param: ControlPlaneSubnetCidr
routes: routes:
- ip_netmask: 169.254.169.254/32 list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- - ip_netmask: 169.254.169.254/32
next_hop: next_hop:
get_param: EC2MetadataIp get_param: EC2MetadataIp
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %} {%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}

View File

@ -18,6 +18,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{% for network in networks %} {% for network in networks %}
{{network.name}}IpSubnet: {{network.name}}IpSubnet:
default: '' default: ''
@ -83,7 +91,9 @@ resources:
- - get_param: ControlPlaneIp - - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr - get_param: ControlPlaneSubnetCidr
routes: routes:
- ip_netmask: 169.254.169.254/32 list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- - ip_netmask: 169.254.169.254/32
next_hop: next_hop:
get_param: EC2MetadataIp get_param: EC2MetadataIp
- default: true # NOTE(hjensas): This is the IPv4 default route - default: true # NOTE(hjensas): This is the IPv4 default route

View File

@ -17,6 +17,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{% for network in networks %} {% for network in networks %}
{{network.name}}IpSubnet: {{network.name}}IpSubnet:
default: '' default: ''
@ -86,7 +94,9 @@ resources:
- - get_param: ControlPlaneIp - - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr - get_param: ControlPlaneSubnetCidr
routes: routes:
- ip_netmask: 169.254.169.254/32 list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- - ip_netmask: 169.254.169.254/32
next_hop: next_hop:
get_param: EC2MetadataIp get_param: EC2MetadataIp
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %} {%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}

View File

@ -21,6 +21,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{% for network in networks %} {% for network in networks %}
{{network.name}}IpSubnet: {{network.name}}IpSubnet:
default: '' default: ''
@ -86,7 +94,9 @@ resources:
- - get_param: ControlPlaneIp - - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr - get_param: ControlPlaneSubnetCidr
routes: routes:
- ip_netmask: 169.254.169.254/32 list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- - ip_netmask: 169.254.169.254/32
next_hop: next_hop:
get_param: EC2MetadataIp get_param: EC2MetadataIp
- default: true - default: true

View File

@ -18,6 +18,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{% for network in networks %} {% for network in networks %}
{{network.name}}IpSubnet: {{network.name}}IpSubnet:
default: '' default: ''
@ -83,7 +91,9 @@ resources:
- - get_param: ControlPlaneIp - - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr - get_param: ControlPlaneSubnetCidr
routes: routes:
- ip_netmask: 169.254.169.254/32 list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- - ip_netmask: 169.254.169.254/32
next_hop: next_hop:
get_param: EC2MetadataIp get_param: EC2MetadataIp
- default: true # NOTE(hjensas): This is the IPv4 default route - default: true # NOTE(hjensas): This is the IPv4 default route

View File

@ -17,6 +17,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{% for network in networks %} {% for network in networks %}
{{network.name}}IpSubnet: {{network.name}}IpSubnet:
default: '' default: ''
@ -86,7 +94,9 @@ resources:
- - get_param: ControlPlaneIp - - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr - get_param: ControlPlaneSubnetCidr
routes: routes:
- ip_netmask: 169.254.169.254/32 list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- - ip_netmask: 169.254.169.254/32
next_hop: next_hop:
get_param: EC2MetadataIp get_param: EC2MetadataIp
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %} {%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}

View File

@ -249,6 +249,14 @@ parameters:
description: The default route of the control plane network. (The parameter description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.) is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
EC2MetadataIp: EC2MetadataIp:
default: '' default: ''
description: The IP address of the EC2 metadata server. (The parameter description: The IP address of the EC2 metadata server. (The parameter
@ -353,6 +361,9 @@ conditions:
ctlplane_default_route_set: ctlplane_default_route_set:
not: not:
equals: [{get_param: ControlPlaneDefaultRoute}, ''] equals: [{get_param: ControlPlaneDefaultRoute}, '']
ctlplane_static_routes_set:
not:
equals: [{get_param: ControlPlaneStaticRoutes}, []]
ec2metadaip_set: ec2metadaip_set:
not: not:
equals: [{get_param: EC2MetadataIp}, ''] equals: [{get_param: EC2MetadataIp}, '']
@ -504,6 +515,11 @@ resources:
- ctlplane_default_route_set - ctlplane_default_route_set
- {get_param: ControlPlaneDefaultRoute} - {get_param: ControlPlaneDefaultRoute}
- {get_attr: [{{server_resource_name}}, addresses, ctlplane, 0, subnets, 0, gateway_ip]} - {get_attr: [{{server_resource_name}}, addresses, ctlplane, 0, subnets, 0, gateway_ip]}
ControlPlaneStaticRoutes:
if:
- ctlplane_static_routes_set
- {get_param: ControlPlaneStaticRoutes}
- {get_attr: [{{server_resource_name}}, addresses, ctlplane, 0, subnets, 0, host_routes]}
EC2MetadataIp: EC2MetadataIp:
if: if:
- ec2metadaip_set - ec2metadaip_set