remove preserveUnknownFields from CRDs - #10
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Removes the explicit spec.preserveUnknownFields: false setting from Calico CRD manifests to eliminate Argo CD sync diffs caused by that field being defaulted/ignored during newer Argo CD upgrade behavior.
Changes:
- Removed
spec.preserveUnknownFields: falsefrom all Calicoapiextensions.k8s.io/v1CRDs incrds/.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crds/crd.projectcalico.org_tiers.yaml | Drops preserveUnknownFields from Tier CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_stagednetworkpolicies.yaml | Drops preserveUnknownFields from StagedNetworkPolicy CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_stagedkubernetesnetworkpolicies.yaml | Drops preserveUnknownFields from StagedKubernetesNetworkPolicy CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_stagedglobalnetworkpolicies.yaml | Drops preserveUnknownFields from StagedGlobalNetworkPolicy CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_networksets.yaml | Drops preserveUnknownFields from NetworkSet CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_networkpolicies.yaml | Drops preserveUnknownFields from NetworkPolicy CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_kubecontrollersconfigurations.yaml | Drops preserveUnknownFields from KubeControllersConfiguration CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_ipreservations.yaml | Drops preserveUnknownFields from IPReservation CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_ippools.yaml | Drops preserveUnknownFields from IPPool CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_ipamhandles.yaml | Drops preserveUnknownFields from IPAMHandle CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_ipamconfigs.yaml | Drops preserveUnknownFields from IPAMConfig CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_ipamblocks.yaml | Drops preserveUnknownFields from IPAMBlock CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_hostendpoints.yaml | Drops preserveUnknownFields from HostEndpoint CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_globalnetworksets.yaml | Drops preserveUnknownFields from GlobalNetworkSet CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_globalnetworkpolicies.yaml | Drops preserveUnknownFields from GlobalNetworkPolicy CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_felixconfigurations.yaml | Drops preserveUnknownFields from FelixConfiguration CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_clusterinformations.yaml | Drops preserveUnknownFields from ClusterInformation CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_caliconodestatuses.yaml | Drops preserveUnknownFields from CalicoNodeStatus CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_blockaffinities.yaml | Drops preserveUnknownFields from BlockAffinity CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_bgppeers.yaml | Drops preserveUnknownFields from BGPPeer CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_bgpfilters.yaml | Drops preserveUnknownFields from BGPFilter CRD spec to avoid Argo CD diff. |
| crds/crd.projectcalico.org_bgpconfigurations.yaml | Drops preserveUnknownFields from BGPConfiguration CRD spec to avoid Argo CD diff. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
james-callahan
approved these changes
Jul 27, 2026
james-callahan
left a comment
Collaborator
There was a problem hiding this comment.
This is essentially a backport of projectcalico/calico#13081
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As detailed in ArgoCD docs, we're seeing the calico app showing a sync diff for the
preserveUnknownFieldsfieldThis PR removes the field from the CRDs. Another option is adding an ignore in ArgoCD (see the link).
https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/2.14-3.0/#removing-default-ignores-of-preserveunknownfields-for-crd