postgres-operator
postgres-operator copied to clipboard
Allow option to exclude default keys from the generated secret
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
- Prevents conflicts with application-specific environment variables
- Provides greater flexibility in secret configuration
- Improves compatibility with various applications
Suggested Implementation
- Add a new CRD field, e.g.,
excludeDefaultKeysthat defaults tofalse - Allow configuring this setting at the operator level