-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
A dedicated field to enable or disable application syncPolicy #21647
Comments
I'd like to take this up. |
Some implementation ideas given in the contributor meeting was to change the |
Hey @nitishfy, I have already started working on a solution for this, if you don't mind I would like to work on this. |
Sure. Pleas make sure to comment under the issue that you're working on it already in order to avoid conflicts. Thanks, I am assigning this issue to you. |
I will make sure from next time. Thank you, @nitishfy |
@anandrkskd, do you have any updates or need any help? |
Hey @andrii-korotkov-verkada , I have a draft PR up, need to add tests, docs for the changes and fix the CI failures |
Thanks! Left some comments. |
Summary
Adding a dedicated field to set application sync Policy to enable or disable automated sync.
Motivation
An Application (app-of-apps pattern) which contains child Application resources only and which have autoSync with selfHeal enabled. The parent Application to force child Applications to have autoSync completely disabled. I need parent Application selfHeal to disable autoSync of child applications again when somebody enables it directly in Kubernetes.
Autosync is disabled only when spec.syncPolicy.automated is not present on resource and to write child Application resources in the way that ArgoCD forces it in Kubernetes with field spec.syncPolicy.automated absent.
Setting field
spec.syncPolicy: {}
andspec.syncPolicy.automated: null
none of them works if set in child application in ArgoCD.example scenario
$ argocd app set --sync-policy auto --sync-option CreateNamespace=true helm-guestbook-1
$ argocd app set --sync-policy auto --sync-option CreateNamespace=true helm-guestbook-2
Automatic synchronization on child Applications is supposed to be turned off, but it is turned on (didn't revert to what is present in git), even though the parent Application has selfHeal enabled.
Proposal
Expected behavior is to have a possibility to enforce autosync disabled on child Application by parent Application selfHeal by having a flag to disable autosync in automated block, like:
To make compatible,
The text was updated successfully, but these errors were encountered: