github.com/argoproj/argo-cd@v1.8.7/docs/user-guide/sync-options.md (about) 1 # Sync Options 2 3 ## No Prune Resources 4 5 >v1.1 6 7 You may wish to prevent an object from being pruned: 8 9 ```yaml 10 metadata: 11 annotations: 12 argocd.argoproj.io/sync-options: Prune=false 13 ``` 14 15 In the UI, the pod will simply appear as out-of-sync: 16 17 ![sync option no prune](../assets/sync-option-no-prune.png) 18 19 20 The sync-status panel shows that pruning was skipped, and why: 21 22 ![sync option no prune](../assets/sync-option-no-prune-sync-status.png) 23 24 The app will be out of sync if Argo CD expects a resource to be pruned. You may wish to use this along with [compare options](compare-options.md). 25 26 ## Disable Kubectl Validation 27 28 >v1.2 29 30 For a certain class of objects, it is necessary to `kubectl apply` them using the `--validate=false` flag. Examples of this are kubernetes types which uses `RawExtension`, such as [ServiceCatalog](https://github.com/kubernetes-incubator/service-catalog/blob/master/pkg/apis/servicecatalog/v1beta1/types.go#L497). You can do using this annotations: 31 32 33 ```yaml 34 metadata: 35 annotations: 36 argocd.argoproj.io/sync-options: Validate=false 37 ``` 38 39 If you want to exclude a whole class of objects globally, consider setting `resource.customizations` in [system level configuration](../user-guide/diffing.md#system-level-configuration). 40 41 ## Skip Dry Run for new custom resources types 42 43 >v1.6 44 45 When syncing a custom resource which is not yet known to the cluster, there are generally two options: 46 47 1) The CRD manifest is part of the same sync. Then ArgoCD will automatically skip the dry run, the CRD will be applied and the resource can be created. 48 2) In some cases the CRD is not part of the sync, but it could be created in another way, e.g. by a controller in the cluster. An example is [gatekeeper](https://github.com/open-policy-agent/gatekeeper), 49 which creates CRDs in response to user defined `ConstraintTemplates`. ArgoCD cannot find the CRD in the sync and will fail with the error `the server could not find the requested resource`. 50 51 To skip the dry run for missing resource types, use the following annotation: 52 53 ```yaml 54 metadata: 55 annotations: 56 argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true 57 ``` 58 59 The dry run will still be executed if the CRD is already present in the cluster.