Skip to content

fix(chart): set preserveUnknownFields: false on CRDs - #3757

Open
aqeelat wants to merge 1 commit into
tektoncd:mainfrom
aqeelat:fix/chart-crd-preserve-unknown-fields
Open

fix(chart): set preserveUnknownFields: false on CRDs#3757
aqeelat wants to merge 1 commit into
tektoncd:mainfrom
aqeelat:fix/chart-crd-preserve-unknown-fields

Conversation

@aqeelat

@aqeelat aqeelat commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Changes

ArgoCD server-side-apply flags every CRD as OutOfSync because kube-apiserver fills in spec.preserveUnknownFields: false server-side on v1 CRDs where the field is omitted. Adding it explicitly in Git makes the live-vs-source diff disappear.

  • Adds the field to all 14 CRDs in config/base/generated-crds/ (kustomize path) and all 13 CRDs in each of kubernetes-crds.yaml and openshift-crds.yaml (Helm chart path).
  • Wires the injection into the generate-crds Makefile target (right after controller-gen writes config/base/generated-crds/) so every regeneration preserves the field — 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.

Submitter Checklist

These are criteria that every PR should meet, please check them off as you review them:

Release Notes

NONE

@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Jul 19, 2026
@tekton-robot
tekton-robot requested review from jkhelil and khrm July 19, 2026 13:05
@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 19, 2026
@codecov-commenter

codecov-commenter commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.33%. Comparing base (f407f97) to head (4c676c3).

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           
Flag Coverage Δ
unit-tests 26.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 3, 2026
@aqeelat
aqeelat force-pushed the fix/chart-crd-preserve-unknown-fields branch from 4c2a2cc to 440bbf0 Compare August 15, 2026 19:57
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 15, 2026
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)
@aqeelat
aqeelat force-pushed the fix/chart-crd-preserve-unknown-fields branch from f87e4ce to 4c676c3 Compare August 16, 2026 11:01
@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: waveywaves
To complete the pull request process, please assign savitaashture after the PR has been reviewed.
You can assign the PR to them by writing /assign @savitaashture in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesnt merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants