Skip to content

Extend the API to configure TLS to secure Postgres #51

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

Draft
wants to merge 13 commits into
base: release-v1.16.x
Choose a base branch
from

Conversation

sergicastro
Copy link
Collaborator

@sergicastro sergicastro commented Jul 23, 2025

This PR allows for managing TLS-secured connections in the PostgreSQL instances.

It:

  • Introduces the new TLS field in the Kubegres spec
  • Includes tls_ prefixes scripts for:
    • postgres.conf
    • pghba.conf
    • copy primary data to replica
    • backup
  • Manages transition between TLS and no TLS config without losing data

Additionally:

  • Introduces unit tests, executable from make, and added to the build CI job
  • Adds make targets to create and destroy a Kind cluster for dev/testing
  • Extends test DB utils to connect to the deployed instances
  • Loads the postgres image to the kind nodes to speed up the tests

piotrkpc pushed a commit that referenced this pull request Aug 7, 2025
…nce (#53)

I need to finish testing of the TLS PR #51 before making this connection
management compatible with TLS-secured connections.

The [`func (r *ServicesCountSpecEnforcer) canConnectToPrimaryDb()
bool`](https://github.com/tetrateio/kubegres/pull/53/files#diff-2069405fe99f8bae54d23273d6e4708cb8b4e1ec715bbe3f276c63b3157c5ee2R136)
method is the current one checking all of this works.
It will need to be removed once the target PR starts using these
changes.

---------

Signed-off-by: Sergi Castro <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant