Skip to content

feat: make postgres SSL certificate paths configurable #41

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

blink-so[bot]
Copy link

@blink-so blink-so bot commented Jun 5, 2025

This PR fixes the hardcoded certificate paths introduced in PR #40 by making the SSL certificate configuration fully customizable.

Changes

  • Removed hardcoded paths: No more /home/coder/.postgresql defaults
  • Made sslrootcert configurable: Now accepts custom certificate paths or can be left empty
  • Made volumes and volumeMounts configurable: Users can specify their own volume configuration
  • Added conditional rendering: Prevents empty volume mounts from being rendered
  • Updated connection string logic: Handles optional sslrootcert parameter gracefully
  • Updated documentation: README reflects new default values

Configuration Example

Users can now configure SSL certificates like this:

global:
  postgres:
    sslmode: require
    sslrootcert: /custom/path/to/rootcert.pem
    volumes:
      - name: "custom-certs"
        configMap:
          name: "my-postgres-certs"
    volumeMounts:
      - name: "custom-certs"
        mountPath: "/custom/path/to"
        readOnly: true

Breaking Change

This is a breaking change for users who relied on the hardcoded defaults. Users will need to explicitly configure SSL certificate paths if they use SSL connections.

Fixes the issue where certificate paths were hardcoded to /home/coder/.postgresql/.

- Remove hardcoded /home/coder/.postgresql paths
- Make sslrootcert, volumes, and volumeMounts configurable with no defaults
- Add conditional rendering to avoid empty volume mounts
- Update postgres connector string to handle optional sslrootcert
- Update README documentation

Fixes hardcoded certificate paths introduced in PR #40
@blink-so blink-so bot requested a review from dannykopping as a code owner June 5, 2025 19:12
blink-so bot and others added 2 commits June 5, 2025 19:15
- Remove example configuration comments
- Keep only essential comments for SSL certificate configuration
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