fix(chart): set preserveUnknownFields: false on CRDs - #3757
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3757 +/- ##
=======================================
Coverage 26.33% 26.33%
=======================================
Files 465 465
Lines 24951 24951
=======================================
Hits 6572 6572
Misses 17661 17661
Partials 718 718
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
4c2a2cc to
440bbf0
Compare
Kube-apiserver fills spec.preserveUnknownFields: false in server-side on v1 CRDs where omitted, causing ArgoCD server-side-apply to flag every CRD as OutOfSync. Add the field explicitly to all CRDs in config/base/generated-crds/ (kustomize path) and the Helm chart CRD bundles. controller-gen never emits the field, so re-add it in the generate-crds Makefile target right after controller-gen writes generated-crds/: a bare `make generate-crds` can no longer drop it from the kustomize source of truth, and the Helm bundles assembled by hack/sync-helm-crds.sh inherit it. Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com> Assisted-by: GLM-5.2 (via opencode)
f87e4ce to
4c676c3
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: waveywaves The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Changes
ArgoCD server-side-apply flags every CRD as
OutOfSyncbecausekube-apiserverfills inspec.preserveUnknownFields: falseserver-side on v1 CRDs where the field is omitted. Adding it explicitly in Git makes the live-vs-source diff disappear.config/base/generated-crds/(kustomize path) and all 13 CRDs in each ofkubernetes-crds.yamlandopenshift-crds.yaml(Helm chart path).generate-crdsMakefile target (right after controller-gen writesconfig/base/generated-crds/) so every regeneration preserves the field — a baremake generate-crdscan no longer drop it from the kustomize source of truth, and the Helm bundles assembled byhack/sync-helm-crds.shinherit it.Submitter Checklist
These are criteria that every PR should meet, please check them off as you review them:
make test lintbefore submitting a PRRelease Notes