However, there doesn't seem to be a way to set ServerSideApply=false on individual resources when the Application has ServerSideApply=true set.
Setting annotation to argocd.argoproj.io/sync-options: ServerSideApply=false to individual resources didn't achieve this behavior. The resource was still being applied via Server Side Apply (kubectl.kubernetes.io/last-applied-configuration annotation was not set).
Motivation
This feature would be useful if users want to enable Server Side Apply on the Application level, but want to disable it for some resources.
For example, one may have multiple large CRD resources which require SSA to apply so it would be useful to set SSA enabled on Application level, but want to disable it for other resources in the same Application for some reason.
One reason that I would like to disable SSA for specific resources in the same Application is described in the following issue:
https://github.com/argoproj/argo-rollouts/issues/3437
Argo Rollouts does not work if ArgoCD auto-heals Service resources via SSA, because while Argo Rollouts adds a field inside .spec.selector, ArgoCD overwrites the entire .spec.selector object, conflicting with Rollouts controller behavior, resulting in the issue above.
Proposal
If I have an Application with ServerSideApply=true set, individual resources inside the Application should be able to set argocd.argoproj.io/sync-options: ServerSideApply=false to disable SSA for the resources.
Summary
In the doc below, there is a way to set the sync option
ServerSideApply=true
on individual resource level, when the Application doesn't haveServerSideApply
enabled. https://argo-cd.readthedocs.io/en/latest/user-guide/sync-options/#server-side-applyHowever, there doesn't seem to be a way to set
ServerSideApply=false
on individual resources when the Application hasServerSideApply=true
set. Setting annotation toargocd.argoproj.io/sync-options: ServerSideApply=false
to individual resources didn't achieve this behavior. The resource was still being applied via Server Side Apply (kubectl.kubernetes.io/last-applied-configuration
annotation was not set).Motivation
This feature would be useful if users want to enable Server Side Apply on the Application level, but want to disable it for some resources. For example, one may have multiple large CRD resources which require SSA to apply so it would be useful to set SSA enabled on Application level, but want to disable it for other resources in the same Application for some reason.
One reason that I would like to disable SSA for specific resources in the same Application is described in the following issue: https://github.com/argoproj/argo-rollouts/issues/3437 Argo Rollouts does not work if ArgoCD auto-heals Service resources via SSA, because while Argo Rollouts adds a field inside
.spec.selector
, ArgoCD overwrites the entire.spec.selector
object, conflicting with Rollouts controller behavior, resulting in the issue above.Proposal
If I have an Application with
ServerSideApply=true
set, individual resources inside the Application should be able to setargocd.argoproj.io/sync-options: ServerSideApply=false
to disable SSA for the resources.