Allow external resources secret key customization
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 88
- Forks
- 66
- Avg merge
- 53m
- Merged PRs (30d)
- 1
Description
Is your feature request related to a problem? Please describe.
The ability to define the keys in the secret for external db and cache instances.
A lot of operators for services like PostgreSQL, example CloudNativePG https://cloudnative-pg.io/documentation/1.27/applications/#secrets, automatically generate secrets that contain all the needed information for Pulp to connect to the DB but with different keys than what the Pulp Operator expects.
Example CNPG secret
apiVersion: v1
kind: Secret
metadata:
name: app-db-app
namespace: app
type: kubernetes.io/basic-auth
data:
dbname: app
host: app-db-rw
jdbc-uri: jdbc:postgresql://app-db-rw.app:5432/app?password=password&user=app
password: password
pgpass: |
app-db-rw:5432:app:app:password
port: "5432"
uri: postgresql://app:password@app-db-rw.app:5432/app
user: app
username: app
Describe the solution you'd like
The ability to set the key names for the values.
Example:
spec
database:
external_db_secret: my-db
keys:
host: host
name: dbname
port: port
username: username
password: password
Describe alternatives you've considered
- Use External-Secrets to sync a secret from an external source to both formats. This requires using an external source which is another attack point that requires securing which if it's a service entirely based in the cluster is unnecessary.
- Use External-Secrets to watch the generated secret and create a new secret.
- Manually copying the secret. Not conducive to automation, doesn't scale
All the methods require maintaining multiple secrets and ensuring they remain in sync.
Additional context
Add any other context about the feature request here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named in the issue. Start by locating the operator's external database and cache secret handling and the configuration schema for external resources. Done means users can map the expected connection fields to differently named Secret keys, with coverage for the PostgreSQL-style example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, postgresql
- Domain
- database, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100