carvel-dev / carvel-dev/secretgen-controller
Option to create multiple keys in Secrets
- Dominant language
- Go
- Stars
- 201
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem/challenge you have**
When multiple keys are defined in a Password object, the generated secrets are the same across all keys.
Here is an example:
```
---
apiVersion: secretgen.k14s.io/v1alpha1
kind: Password
metadata:
name: postgresql-password
spec:
secretTemplate:
type: Opaque
stringData:
postgresql-password: $(value)
postgresql-postgres-password: $(value)
repmgr-password: $(value)
```
What is currently generated:
```
apiVersion: v1
data:
postgresql-password: ZDJ1cjJiZm1keHFpb2F3cnNtZGYxMHN0YTl0Z2J1anB0cWx3aGdjbA==
postgresql-postgres-password: ZDJ1cjJiZm1keHFpb2F3cnNtZGYxMHN0YTl0Z2J1anB0cWx3aGdjbA==
repmgr-password: ZDJ1cjJiZm1keHFpb2F3cnNtZGYxMHN0YTl0Z2J1anB0cWx3aGdjbA==
kind: Secret
name: postgresql-password
type: Opaque
```
**Describe the solution you'd like**
It would be fantastic, if each key in the secret would get a unique password.
**Anything else you would like to add:**
N/A
Thank you for your hard work!
Contributor guide
Assessment
This issue has not been assessed yet.