carvel-dev / carvel-dev/secretgen-controller
SecretTemplate's type cannot be updated
- Dominant language
- Go
- Stars
- 201
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem/challenge you have**
https://github.com/vmware-tanzu/carvel-secretgen-controller/pull/66 Introduced the SecretTemplate API. This allows you to define arbitrary input resources that are used to generate a new Kubernetes Secret based on templating.
One of the fields that is available for templating within the Secret is `type`. Given this field is immutable the question is what should happen if this value changes within the template.
This could change if someone updates the SecretTemplate `type` field directly .eg. `type: foo` to `type: bar` or if they are using templating and the field changes. e.g. `type: $(.resource.data.foo)`.
The current behaviour is that SecretTemplate attempts to update the Secret but fails. A user will have to delete and recreate the SecretTemplate to get the new value.
**Describe the solution you'd like**
This may not be a huge issue as it's fairly unlikely that `type` will be a dynamic field. However if someone typos the `type` field being able to simply update the template would be nice.
So for changes to `type` we should consider deleting and re-creating the entire secret.
**Anything else you would like to add:**
More context in this comment https://github.com/vmware-tanzu/carvel-secretgen-controller/pull/66#discussion_r878108198
---
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you would like to work on this issue.
Contributor guide
Assessment
This issue has not been assessed yet.