Skip to content

Commit

Permalink
Return pod_ip param to k8s config in Patroni
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcapet committed Oct 4, 2023
1 parent 849a71e commit 5ae4a90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion postgres-appliance/scripts/configure_spilo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5ae4a90

Please sign in to comment.