From 06b53d29710cfb7eae483db6d2732e40e50fa435 Mon Sep 17 00:00:00 2001 From: Polina Bungina <27892524+hughcapet@users.noreply.github.com> Date: Wed, 4 Oct 2023 21:25:25 +0200 Subject: [PATCH] Return pod_ip param to k8s config in Patroni (#931) --- postgres-appliance/scripts/configure_spilo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/postgres-appliance/scripts/configure_spilo.py b/postgres-appliance/scripts/configure_spilo.py index 48ea4a722..00f460c1e 100755 --- a/postgres-appliance/scripts/configure_spilo.py +++ b/postgres-appliance/scripts/configure_spilo.py @@ -728,7 +728,9 @@ def get_dcs_config(config, placeholders): config['kubernetes']['labels'] = kubernetes_labels if not config['kubernetes'].pop('use_configmaps'): - config['kubernetes'].update({'use_endpoints': True, 'ports': [{'port': 5432, 'name': 'postgresql'}]}) + config['kubernetes'].update({'use_endpoints': True, + 'pod_ip': placeholders['instance_data']['ip'], + 'ports': [{'port': 5432, 'name': 'postgresql'}]}) if str(config['kubernetes'].pop('bypass_api_service', None)).lower() == 'true': config['kubernetes']['bypass_api_service'] = True else: