postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

Allow option to exclude default keys from the generated secret

Open NominalTrajectory opened this issue 1 year ago • 0 comments

Description

Currently, the Postgres operator includes default keys (like HOST) in generated secrets. This causes conflicts when applications use these keys for their own purposes, preventing users from mounting the entire secret without overriding application variables.

Proposed Feature

Add an option to fully override keys in the secret from the secretTemplate, allowing users to drop default keys instead of appending them.

Benefits

  1. Prevents conflicts with application-specific environment variables
  2. Provides greater flexibility in secret configuration
  3. Improves compatibility with various applications

Suggested Implementation

  1. Add a new CRD field, e.g., excludeDefaultKeys that defaults to false
  2. Allow configuring this setting at the operator level

NominalTrajectory avatar Sep 10 '24 19:09 NominalTrajectory