You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Annotations and Labels must be removed from the Secret when removed from secretTemplate #4292
Is your feature request related to a problem? Please describe.
SecretTemplate defines annotations and labels to be propagated to the Kubernetes Secret when it is created or updated. Once created, labels and annotations are not yet removed from the Secret when they are removed from the template.
Describe the solution you'd like
When a Certificate is updated, we need to iterate over the labels and annotations and remove the items that no longer exists.
Describe alternatives you've considered
Instead of keep annotations and labels tracked, when a Certificate is updated, we could clean up all the current annotations and labels from the secret and recreate them. Any annotation from a third-party solution would have to annotate the secretTemplate instead.
Additional context
As the Secret created by cert-manager can be annotated or labelled externally, an extra field must be added containing all the labels and annotations previously created in order to identify which ones were created by cert-manager and remove them. The alternative cited above is simpler to implement but will limit the utilisation a bit.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale
Thanks @jonathansp, I am currently putting something together which makes use of managed fields and server side apply. It should be ready for review soon, then hopefully merged in an alpha state for v1.7 🤞.
Activity
jetstack-bot commentedon Nov 1, 2021
Issues go stale after 90d of inactivity.
Mark the issue as fresh with
/remove-lifecycle stale.Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with
/close.Send feedback to jetstack.
/lifecycle stale
irbekrm commentedon Nov 1, 2021
This should still be done
/remove-lifecycle stale
/milestone v1.7
JoshVanL commentedon Nov 24, 2021
/assign
jonathansp commentedon Nov 30, 2021
@JoshVanL please let me know if I can help with this issue as I have capacity in the following weeks.
JoshVanL commentedon Nov 30, 2021
Thanks @jonathansp, I am currently putting something together which makes use of managed fields and server side apply. It should be ready for review soon, then hopefully merged in an alpha state for
v1.7🤞.