App of Apps: allow setting an child app to have no automatic sync #16866
Labels
bug
Something isn't working
component:core
Syncing, diffing, cluster state cache
type:bug
version:2.12
Latest confirmed affected version is 2.12
Checklist:
argocd version
.Describe the bug
When deploying an app-of-apps pattern, I'd like to enforce the automatic sync policy on the child apps, even when that sync policy is 'no automatic sync'. Right now the only way to describe no sync is to leave out the
.spec.syncPolicy
setting, which resolves to an app without.spec.syncPolicy
due to defaults, which means the sync policy can be manually changed to something else and ArgoCD will still consider the child app to be Synced.Note: this is likely caused by #16092.
To Reproduce
.spec.syncPolicy
set to{}
(or that does not have it at all).spec.syncPolicy
field compared to Git.Example apps:
Expected behavior
I expect to be able to set a sync policy for a child app and that argocd will show the app as OutOfSync when the child app syncPolicy deviates from the git-defined syncPolicy.
Screenshots
Version
argocd: v2.9.3+6eba5be BuildDate: 2023-12-01T23:24:09Z GitCommit: 6eba5be864b7e031871ed7698f5233336dfe75c7 GitTreeState: clean GoVersion: go1.21.4 Compiler: gc Platform: linux/amd64 WARN[0000] Failed to invoke grpc call. Use flag --grpc-web in grpc calls. To avoid this warning message, use flag --grpc-web. argocd-server: v2.9.3+6eba5be BuildDate: 2023-12-01T23:05:50Z GitCommit: 6eba5be864b7e031871ed7698f5233336dfe75c7 GitTreeState: clean GoVersion: go1.21.3 Compiler: gc Platform: linux/amd64 Kustomize Version: v5.2.1 2023-10-19T20:13:51Z Helm Version: v3.13.2+g2a2fb3b Kubectl Version: v0.24.2 Jsonnet Version: v0.20.0
Logs
** Potential fixes **
If it is not possible to fix #16092 (with a sync option enforcing that the live manifest matches the desired manifest exactly or something), I think an added field like
.spec.syncPolicy.automated.enabled
may be needed, to allow disabling automatic sync without leaving.spec.syncPolicy
as a whole empty.The text was updated successfully, but these errors were encountered: