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
An ApplicationSet should be able to be configured to allow preserving the state of custom annotations. This is already hard-coded for the Argo CD Notifications and the Argo CD refresh type annotations, the reason this was done for those can also apply to custom annotations.
Motivation
I'm using a custom plugin that patches the Application being refreshed with some context that is only available at refresh time. I need that context to be available to Argo CD Notifications (and other external systems) so I am storing that context in a custom annotation. The problem now is that the ApplicationSet controller will remove the annotation as it isn't defined on the ApplicationSet. Its a common pattern for operators and such to use custom annotations to keep some state, as seen by the annotations Argo CD itself uses.
Proposal
I propose adding a new field to the ApplicationSet that allows users to configure annotations that should be preserved. This would look something like: preservedFields.annotations: ["custom-anno"]. This structure can be evolved in the future to support preserving other fields (labels could be a good candidate), though you may want to avoid allowing arbitrary fields to be preserved.
The text was updated successfully, but these errors were encountered:
#12507) (#12408)
* feat: Support configuring annotations that are preserved by the AppSet
Signed-off-by: Lawrence Carvalho <lacarvalho91@gmail.com>
Signed-off-by: Lawrence Carvalho <lawrence.carvalho@sky.uk>
* Docs
Signed-off-by: Lawrence Carvalho <lawrence.carvalho@sky.uk>
* Retrigger CI pipeline
Signed-off-by: Lawrence Carvalho <lawrence.carvalho@sky.uk>
---------
Signed-off-by: Lawrence Carvalho <lacarvalho91@gmail.com>
Signed-off-by: Lawrence Carvalho <lawrence.carvalho@sky.uk>
yyzxw
pushed a commit
to yyzxw/argo-cd
that referenced
this issue
Aug 9, 2023
argoproj#12507) (argoproj#12408)
* feat: Support configuring annotations that are preserved by the AppSet
Signed-off-by: Lawrence Carvalho <lacarvalho91@gmail.com>
Signed-off-by: Lawrence Carvalho <lawrence.carvalho@sky.uk>
* Docs
Signed-off-by: Lawrence Carvalho <lawrence.carvalho@sky.uk>
* Retrigger CI pipeline
Signed-off-by: Lawrence Carvalho <lawrence.carvalho@sky.uk>
---------
Signed-off-by: Lawrence Carvalho <lacarvalho91@gmail.com>
Signed-off-by: Lawrence Carvalho <lawrence.carvalho@sky.uk>
Summary
An ApplicationSet should be able to be configured to allow preserving the state of custom annotations. This is already hard-coded for the Argo CD Notifications and the Argo CD refresh type annotations, the reason this was done for those can also apply to custom annotations.
Motivation
I'm using a custom plugin that patches the
Application
being refreshed with some context that is only available at refresh time. I need that context to be available to Argo CD Notifications (and other external systems) so I am storing that context in a custom annotation. The problem now is that the ApplicationSet controller will remove the annotation as it isn't defined on theApplicationSet
. Its a common pattern for operators and such to use custom annotations to keep some state, as seen by the annotations Argo CD itself uses.Proposal
I propose adding a new field to the
ApplicationSet
that allows users to configure annotations that should be preserved. This would look something like:preservedFields.annotations: ["custom-anno"]
. This structure can be evolved in the future to support preserving other fields (labels could be a good candidate), though you may want to avoid allowing arbitrary fields to be preserved.The text was updated successfully, but these errors were encountered: