bitnami / bitnami/sealed-secrets
Allow add annotations/labels on private key creation/rotation
- Dominant language
- Go
- Stars
- 9.3k
- Forks
- 776
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 30
Description
**Which component**:
controller
**Is your feature request related to a problem? Please describe.**
Actually, the private key [creation/rotation](https://github.com/bitnami-labs/sealed-secrets/blob/main/cmd/controller/keyregistry.go#L50) function does not allow us to include any kind of annotations/labels to it.
Which should be useful to replicate theses secrets automatically to another(s) cluster(s) using systems like *"kubed/config-syncer"*, which check for an specific annotations on the secrets/configmaps to be replicate.
**Describe the solution you'd like**
private key creation/rotation should accept a list of annotations/labels from the controller configuration.
```
--privatekey-annotations 'kubed.appscode.com/sync: ""'
--privatekey-labels 'app.kubernetes.io/instance=production-cluster' --privatekey-labels 'app.kubernetes.io/part-of=sysadmin'
```
**Additional context**
Replicate secrets between clusters using [kubed/config-syncer][(https://github.com/kubeops/config-syncer)](https://appscode.com/products/kubed/v0.12.0/guides/config-syncer/inter-cluster/)
Note: Not sure if someone have this kind of tasks (replicate the private key between cluster) covered using another solution ?
Contributor guide
Research direction
Start with cmd/controller/keyregistry.go at the private-key creation and rotation code, then trace how controller configuration and command-line flags are defined. Add configurable annotations and labels to newly created or rotated private-key Secrets, and verify that the requested values are preserved across both operations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100