Open jaredhancock31 opened 10 months ago
Hi,
I experiment the same trouble with the same scenario.
For information, I got the solution. Please check if you have "applicationsetcontroller.policy" parameters on your applicationset controller (or in your configmap named "argocd-cmd-params-cm").
If this parameter is set, it takes the precedences :
If the controller parameter
--policy
is set, it takes precedence on the fieldapplicationsSync
. It is possible to allow per ApplicationSet sync policy by setting variableARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_POLICY_OVERRIDE
to argocd-cmd-params-cmapplicationsetcontroller.enable.policy.override
or directly with controller parameter--enable-policy-override
(default tofalse
).
It works for me. Have a nice day
@jaredhancock31, does the solution work for you?
Checklist:
argocd version
.Describe the bug
When using a list generator in an AppSet, I wanted to exercise the
applicationsSync
policy to see if adding an element to the list out of band would be reverted by the AppSet controller. If I mutate the generator's list manually in this way, the additional elements always get deleted.From my understanding of the documentation, the
create-update
should not prune anything, correct?To Reproduce
kubectl
. The 2nd application starts coming up in the new namespace.Expected behavior
Seems like the intent of the
applicationsSync
would suggest that the 2nd element (added OOB) would not get pruned.My assumption is that this is because the
applicationsSync
policy is evaluated between syncs from source control, as opposed to diffing the actual resource in etcd. Is that correct?From my interpretation of the docs, it looks at when the generator's output has changed and in this scenario it technically has, albeit from outside source control. I understand that this is kind of an abnormal case, so just trying to better understand the behavior.
Version
argoCD version:
2.8.0
helm chart version:5.43.4
Logs