Sync fails with `one or more synchronization tasks are not valid` and `the server could not find the requested resource` for a custom resource.
IntermediateTroubleshootingSync Operations, Hooks & Health
Answer
Likely causes → The CRD and its CRs are in the same sync, and the dry-run runs before the CRD exists, so the API server does not know the kind.
Diagnose → argocd app get web lists the failing CR kind; kubectl get crd | grep <group> on the target.
Fix → Add argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true to the CRs, or put the CRD in an earlier sync wave, or install CRDs from a separate app.
Prevent → Operators and their CRDs belong to a platform app that syncs before tenant apps.
More on Sync Operations, Hooks & Health
`one or more objects failed to apply, reason: Deployment.apps "web" is invalid: spec.selector: Invalid value: ...: field is immutable`.BeginnerSync of a large CRD fails with `metadata.annotations: Too long: must have at most 262144 bytes`.BeginnerAn app has been stuck at `Syncing` for an hour with `waiting for completion of hook batch/Job/db-migrate`.IntermediateA PreSync hook fails with `jobs.batch "db-migrate" already exists`.BeginnerA PostSync smoke-test hook never runs, even though the sync says succeeded.IntermediateAn Ingress stays `Progressing` forever, holding the app at Progressing.Intermediate