diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 5ec9f5da89..c7a2414aae 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -573,6 +573,7 @@ placement_api_public_port: "{{ haproxy_single_external_frontend_public_port if h prometheus_external_fqdn: "{{ kolla_external_fqdn }}" prometheus_internal_fqdn: "{{ kolla_internal_fqdn }}" prometheus_port: "9091" +prometheus_listen_port: "{{ prometheus_port }}" prometheus_public_port: "{{ haproxy_single_external_frontend_public_port if haproxy_single_external_frontend | bool else prometheus_port }}" prometheus_node_exporter_port: "9100" prometheus_mysqld_exporter_port: "9104" diff --git a/ansible/roles/prometheus/defaults/main.yml b/ansible/roles/prometheus/defaults/main.yml index ae5d7292b3..e66d0d44da 100644 --- a/ansible/roles/prometheus/defaults/main.yml +++ b/ansible/roles/prometheus/defaults/main.yml @@ -18,7 +18,9 @@ prometheus_services: enabled: "{{ enable_prometheus_server_external | bool }}" mode: "http" external: true + external_fqdn: "{{ prometheus_external_fqdn }}" port: "{{ prometheus_public_port }}" + listen_port: "{{ prometheus_listen_port }}" active_passive: "{{ prometheus_active_passive | bool }}" prometheus-node-exporter: container_name: prometheus_node_exporter diff --git a/releasenotes/notes/fix-expose-prometheus-externally-with-single-frontend-45ca4e25c8948393.yaml b/releasenotes/notes/fix-expose-prometheus-externally-with-single-frontend-45ca4e25c8948393.yaml new file mode 100644 index 0000000000..b720e60ed5 --- /dev/null +++ b/releasenotes/notes/fix-expose-prometheus-externally-with-single-frontend-45ca4e25c8948393.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes an issue when using ``enable_prometheus_server_external`` in + conjunction with ``haproxy_single_external_frontend``.