Skip to content

Conversation

ecdobry
Copy link

@ecdobry ecdobry commented Sep 16, 2025

The intention behind this pull request is to get diode's chart more inline with how the netbox community chart handles postgresql secrets. While not exactly the same, the goal is to create some familiarity between the two.

Additionally if a consumer of this chart were to leverage an external postgresql database, they would need to override environment variables to do so. This is less than ideal and these changes provide an easier mechanism to use external databases.

values.yaml:

  • Expanded externalPostgresql values: Added support for database, username, password, existingSecretName, and existingSecretKey fields in values.yaml

_helpers.tpl:

  • diode.postgresql.database - Returns database name (built-in or external)
  • diode.postgresql.username - Returns username (built-in or external)
  • diode.postgresql.secretname - Returns appropriate secret name based on configuration
  • diode.postgresql.secretkey - Returns appropriate secret key based on configuration

diode-secrets.yaml: creates external postgresql secrets when needed

diode-reconciler-deployment.yaml: properly references postgresql passwords from secrets

diode-reconciler-configmap.yaml: uses helper templates for consistent database/username configuration

@CLAassistant
Copy link

CLAassistant commented Sep 16, 2025

CLA assistant check
All committers have signed the CLA.

@ecdobry ecdobry force-pushed the ecdobry/postgres_secrets branch from fd02648 to 7db0d30 Compare September 16, 2025 19:23
@ecdobry ecdobry force-pushed the ecdobry/postgres_secrets branch from 7db0d30 to f4ca8c2 Compare September 16, 2025 19:54
@ecdobry ecdobry force-pushed the ecdobry/postgres_secrets branch from f4ca8c2 to a657830 Compare September 16, 2025 19:55
@ecdobry ecdobry changed the title feat: improve postgresql secret handling feat: improve helm chart postgresql secret handling Sep 16, 2025
Copy link
Member

@mfiedorowicz mfiedorowicz left a comment

Choose a reason for hiding this comment

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

Thanks @ecdobry

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.

5 participants