Add Octavia API endpoint to haproxy

This patch adds an endpoint for Octavia API to haproxy.

Closes-Bug: #1728589

Change-Id: I978b83fa5f3900d2f09c2affc59e90e150a42892
This commit is contained in:
Brent Eagles 2017-08-02 14:00:47 -02:30
parent 2045d83811
commit c410f608ca
2 changed files with 29 additions and 0 deletions

View File

@ -293,6 +293,10 @@
# (optional) Enable or not Kubernetes API binding
# Defaults to hiera('kubernetes_master_enabled', false)
#
# [*octavia*]
# (optional) Enable or not Octavia APII binding
# Defaults to hiera('octavia_api_enabled', false)
#
# [*mysql*]
# (optional) Enable or not MySQL Galera binding
# Defaults to hiera('mysql_enabled', false)
@ -479,6 +483,10 @@
# (optional) Specify the network etcd is running on.
# Defaults to hiera('etcd_network', undef)
#
# [*octavia_network*]
# (optional) Specify the network octavia is running on.
# Defaults to hiera('octavia_api_network', undef)
#
# [*opendaylight_network*]
# (optional) Specify the network opendaylight is running on.
# Defaults to hiera('opendaylight_api_network', undef)
@ -556,6 +564,8 @@
# 'nova_metadata_port' (Defaults to 8775)
# 'nova_novnc_port' (Defaults to 6080)
# 'nova_novnc_ssl_port' (Defaults to 13080)
# 'octavia_api_port' (Defaults to 9876)
# 'octavia_api_ssl_port' (Defaults to 13876)
# 'opendaylight_api_port' (Defaults to 8081)
# 'panko_api_port' (Defaults to 8977)
# 'panko_api_ssl_port' (Defaults to 13977)
@ -639,6 +649,7 @@ class tripleo::haproxy (
$horizon = hiera('horizon_enabled', false),
$ironic = hiera('ironic_api_enabled', false),
$ironic_inspector = hiera('ironic_inspector_enabled', false),
$octavia = hiera('octavia_api_enabled', false),
$mysql = hiera('mysql_enabled', false),
$kubernetes_master = hiera('kubernetes_master_enabled', false),
$mysql_clustercheck = false,
@ -682,6 +693,7 @@ class tripleo::haproxy (
$nova_novncproxy_network = hiera('nova_vnc_proxy_network', undef),
$nova_osapi_network = hiera('nova_api_network', undef),
$nova_placement_network = hiera('nova_placement_network', undef),
$octavia_network = hiera('octavia_api_network', undef),
$panko_network = hiera('panko_api_network', undef),
$ovn_dbs_network = hiera('ovn_dbs_network', undef),
$ec2_api_network = hiera('ec2_api_network', undef),
@ -751,6 +763,8 @@ class tripleo::haproxy (
nova_metadata_port => 8775,
nova_novnc_port => 6080,
nova_novnc_ssl_port => 13080,
octavia_api_port => 9876,
octavia_api_ssl_port => 13876,
opendaylight_api_port => 8081,
panko_api_port => 8977,
panko_api_ssl_port => 13977,
@ -1506,6 +1520,17 @@ class tripleo::haproxy (
}
}
if $octavia {
::tripleo::haproxy::endpoint { 'octavia':
public_virtual_ip => $public_virtual_ip,
internal_ip => hiera('octavia_api_vip', $controller_virtual_ip),
service_port => $ports[octavia_api_port],
ip_addresses => hiera('octavia_api_node_ips'),
server_names => hiera('octavia_api_node_names'),
public_ssl_port => $ports[octavia_api_ssl_port],
service_network => $octavia_network,
}
}
if $ovn_dbs and $ovn_dbs_manage_lb {
# FIXME: is this config enough to ensure we only hit the first node in

View File

@ -0,0 +1,4 @@
---
fixes:
- |
Added missing haproxy endpoint for the Octavia API.