Explicitly set ceph_dashboard_vip when Ceph Dashboard is enabled

When the Ceph Dashboard environment file is added, the haproxy config
is created for both the ceph dashboard and the monitoring stack (made
by grafana, prometheus, alertmanager, node-exporter).
We used to have the 'ceph_dashboard_vip' rely to the ctlplane network
unless the StorageDashboard composable network is explicitly added to
the overcloud deployment.
This patch, instead, explicitly sets the ceph_dashboard_vip using the
'CephDashboardNetwork' parameter defined in tripleo-heat-templates.
By doing this the operator has the flexibility to use the network
defined via tht to reach the Ceph Dashboard, resulting in a more
consistent configuration according to the user expectations.

Change-Id: Icc68dad8074dd02d84f76efac45ed08b42a2bd2f
(cherry picked from commit 5dc5cdb626)
This commit is contained in:
Francesco Pantano 2021-07-08 14:24:39 +02:00
parent 23bba2a877
commit 86633a52a2
1 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,10 @@
{% set _ = vip_data.__setitem__('internal_api_virtual_ip', (net_vip_map[networks['InternalApi']['name_lower']])) %}
{% endif %}
{% set _ = vip_data.__setitem__('network_virtual_ips', network_virtual_ips) %}
{# when ceph monitoring stack is enabled the frontend vip is explicitly set according to CephDashboardNetwork #}
{% if 'ceph_grafana' in enabled_services %}
{% set _ = vip_data.__setitem__('ceph_dashboard_vip', (net_vip_map[service_net_map['ceph_dashboard_network']])) %}
{% endif %}
{% for network in enabled_networks %}
{% if network == 'StorageNFS' %}
{% set _ = vip_data.__setitem__('ganesha_vip', (net_vip_map[networks['StorageNFS']['name_lower']])) %}