Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add postgresql option target_session_attrs #1847

Merged

Conversation

larsux
Copy link
Contributor

@larsux larsux commented Apr 30, 2024

SUMMARY

Added support for the postgresql option 'target_session_attrs'. This is required if you have a postgreSQL database cluster and want to ensure that AWX only connects to the primary database node with write permissions.

This change is all the more necessary as this option cannot be passed in custom.py as the order in which the configuration files are loaded is not stable. It is therefor not possible to guarantee, that the DATABASES dictionary is already defined or will be overwritten later.

PR fixes #1792

ISSUE TYPE
  • New or Enhanced Feature
ADDITIONAL INFORMATION

The following has been added:

  • add target_session_attrs to the database credentials template in the ansible installer role
  • add target_session_attrs to the postgresql config template in the helm chart

I've successfully tested that change with molecule/kind and in our own K8s Cluster with postgreSQL-Cluster database backend.

Signed-off-by: Lars Wildemann <lars.wildemann@plusserver.com>
@fosterseth fosterseth enabled auto-merge (squash) May 15, 2024 18:36
@rooftopcellist
Copy link
Member

Thanks for the contribution @larsux

@fosterseth fosterseth merged commit e98c913 into ansible:devel May 15, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for external PostgreSQL cluster client-side High Availability
3 participants