Skip to content

Make postgres Secret name release-scoped via fullname helper#62

Closed
Copilot wants to merge 2 commits intoproper-dbfrom
copilot/sub-pr-61
Closed

Make postgres Secret name release-scoped via fullname helper#62
Copilot wants to merge 2 commits intoproper-dbfrom
copilot/sub-pr-61

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 9, 2026

Hardcoding the Secret name postgres-credentials causes collisions when multiple Helm releases are deployed to the same namespace. Each release must own its own Secret.

Changes

  • postgres-secret.yaml — Secret name now uses {{ include "java-backend.fullname" . }}-postgres-credentials, consistent with how all other chart resources are named
  • deployment.yamlSPRING_DATASOURCE_* env vars are rendered explicitly in the template (not via values.yaml) so the secretKeyRef.name can reference the template-computed name
  • values.yaml — Removed the three hardcoded SPRING_DATASOURCE_* secretKeyRef entries; those vars are now owned by the deployment template
# Before
metadata:
  name: postgres-credentials          # static — collides across releases

# After
metadata:
  name: {{ include "java-backend.fullname" . }}-postgres-credentials   # e.g. java-backend-postgres-credentials

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: kon-mtal <50518677+kon-mtal@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on moving to PostgreSQL and keeping H2 for testing Make postgres Secret name release-scoped via fullname helper Mar 9, 2026
@kon-mtal kon-mtal closed this Mar 23, 2026
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.

2 participants