chore: remove deprecated preserveUnknownFields from CRDs #3487
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.
Which issue does this PR fix?
Fixes #3358
What does this PR do / Why do we need it?
Removes the deprecated
spec.preserveUnknownFieldsfield from all CRD definitions. This field was deprecated in Kubernetes 1.22 and causes resources to constantly fall out of sync when deploying via ArgoCD 3.0+, which removed default ignoring of this field.The modern replacement
x-kubernetes-preserve-unknown-fields: trueis already present in the schema sections and will continue to function correctly.Testing done on this change
preserveUnknownFieldshave been removed (0 remaining)x-kubernetes-preserve-unknown-fields: trueis still present in all CRD schemasWill this PR introduce any new dependencies?
No
Will this break upgrades or downgrades?
No - this only removes a deprecated field that was removed from Kubernetes 1.22+. Given K8s versions before 1.22 have been EOL for several years, this should not impact any supported clusters. The functionality is preserved through
x-kubernetes-preserve-unknown-fields: truein the schema.Does this change require updates to the CNI daemonset config files?
No
Does this PR introduce any user-facing change?