Skip to content

horizon: improve cnpg credential handling - #181

Merged
jacekn merged 1 commit into
stellar:mainfrom
jacekn:db
Jul 24, 2026
Merged

horizon: improve cnpg credential handling#181
jacekn merged 1 commit into
stellar:mainfrom
jacekn:db

Conversation

@jacekn

@jacekn jacekn commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Currently creds can't be provided via pre-exisitng secret - they have to come from the values file.
This PR makes it possible to provide existing secret via the following:

cnpg:
  cluster:
    spec:
      bootstrap:
        initdb:
          secret:
            name: cnpg-db-creds

Original method is still active so the changes should be backwards compatible

Currently creds can't be provided via pre-exisitng secret - they have to come
from the values file.
This PR makes it possible to provide existing secret via the following:
```
cnpg:
  cluster:
    spec:
      bootstrap:
        initdb:
          secret:
            name: cnpg-db-creds
```

Original method is still active so the changes should be backwards compatible
Copilot AI review requested due to automatic review settings July 24, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for existing CloudNativePG bootstrap secrets while preserving chart-managed credentials.

Changes:

  • Conditionally renders CNPG and database credentials.
  • Adds configuration validation and username defaults.
  • Documents external-secret usage and bumps the chart version.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
charts/horizon/values.yaml Documents credential options.
charts/horizon/templates/database-secret.yaml Gates database secret generation.
charts/horizon/templates/cnpg-cluster.yaml Invokes credential validation.
charts/horizon/templates/cnpg-app-secret.yaml Skips managed credentials for custom bootstrap.
charts/horizon/templates/_helpers.tpl Adds validation and credential fallback logic.
charts/horizon/templates/_cnpg.tpl Preserves user-provided bootstrap configuration.
charts/horizon/README.md Documents existing-secret setup.
charts/horizon/Chart.yaml Bumps chart version to 0.8.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jacekn
jacekn merged commit 7df7119 into stellar:main Jul 24, 2026
2 checks passed
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.

3 participants