-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ignoreDifferences
as a resource annotation
#12686
Comments
@pasha-codefresh @blakepettersson this feature would be amazing, as it would allow for many more "escape hatches" without needing to update the Application itself. |
This is also related to the request of having the ability for a specific resource to be "ignored" (not updated during a sync) if it has a specific annotation (e.g. Here is the issue for that request: |
I also have a need for this. Being able to do this on a specific resource via annotation is critical. |
This would be a awesome addition, eliminating the need to manage a large list in the Application CRD. |
This kinda goes against the idea of resource being owned by an application and using manifests in a repo to control values. |
If it's still necessary, I'd prefer to use application-level annotations, since they are already available and support even per-resource config, see https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration. Lack of a centralized place to see what differences are ignored can make it harder to do updates, e.g. if some annotation needs to be removed, people may not find it and revisit if it's still needed. Please, let me know if you are not convinced by these arguments and why. |
In my case, my applications are all derived from application sets. My fear is that if that application-level annotation is included as part of the application set it will apply to all applications derived from them which is not desired at all. I have a specific manifest that I apply as part of an application (specifically tailscale-operator) which has a field that gets overwritten dynamically by the operator. This causes the application to show as out of sync in Argo. If I had a way to add an annotation to that specific manifest to basically ignore the specific field of that manifest, then my issue would be resolved. |
You can try solving this with generator templates https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Template/#generator-templates. Lmk if that works for you. |
I use generator templates, but the templates are the source of every application created by the application set. So as I mentioned prior, this would then apply to all applications which would not be desired. Unless there is a way to apply it to a single app manifest via the template. I could totally be missing something here. |
I think you can have multiple generators - one for one app you need overrides and one for everything else. Let me know if it's not actually possible. |
That would then mean that I would have to break up the application set into multiple scopes excluding the specific sub folder of the deployment repository and then have an additional one specific to that repository folder only. I guess thats technically possible, but that complicates the app of apps pattern. It would certainly be tremendously easier to just add an annotation to the specific manifest that is applied. |
Summary
It would be great if the Application spec
ignoreDifferences
could be supported at the individual resource level, perhaps as an annotation.Motivation
I am converting my set up use an ApplicationSets whenever possible to reduce boilerplate. A few Applications require specific
ignoreDifferences
config. In my case, one app has a ConfigMap resource, and another app updates it with dynamic configuration settings.Proposal
Ideally similarly to
syncOptions
can be applied to individual resources via theargocd.argoproj.io/sync-options
annotation. So there could be anargocd.argoproj.io/ignore-differences
annotation.Since the annotation is applied to a specific resource, there is no need to define the kubernetes API group in the annotation. It could be further simplified by (initially) only supporting a single
jsonPointers
type.i.e.
or it could support being parsed out as a yaml/json object similar to the existing
ignoreDifferences
spec.The text was updated successfully, but these errors were encountered: