fix(kustomize): move platform-specific CRDs to shared base - #3878
Conversation
Newer kustomize versions enforce a security restriction that rejects direct file references pointing outside the kustomization root. config/kubernetes/base and config/openshift/base both referenced CRD files via ../../base/generated-crds/..., which violates that restriction and caused kustomize build to silently fail during releases (the error was swallowed because the pipeline does not set pipefail). Move tektondashboards and tektonaddons CRDs from their platform- specific kustomization.yaml files into config/base/kustomization.yaml where controller-gen already writes all generated CRDs. The extra CRDs on each platform are harmless — their reconcilers are platform-gated. Signed-off-by: Jawed khelil <jkhelil@redhat.com> Assisted-by: Claude Sonnet 4.6 (via Cursor) Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3878 +/- ##
=======================================
Coverage 26.13% 26.13%
=======================================
Files 465 465
Lines 24930 24930
=======================================
Hits 6516 6516
Misses 17694 17694
Partials 720 720
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:
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pratap0007 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
/cherry-pick release-v0.81.x |
|
/cherry-pick release-v0.80.x |
|
✅ Cherry-pick to A new pull request has been created to cherry-pick this change to PR: #3879 Please review and merge the cherry-pick PR. |
|
✅ Cherry-pick to A new pull request has been created to cherry-pick this change to PR: #3880 Please review and merge the cherry-pick PR. |
Changes
Newer kustomize versions enforce a security restriction that rejects
direct file references pointing outside the kustomization root.
config/kubernetes/baseandconfig/openshift/baseboth referencedCRD files via
../../base/generated-crds/..., which violates thatrestriction and caused
kustomize buildto silently fail duringreleases (the error was swallowed because the pipeline does not set
pipefail).This manifested as the
koparsestep failing with:because
ko resolvereceived empty stdin (from the failed kustomizepipe) and produced an empty
release.yaml.Move
tektondashboardsandtektonaddonsCRDs from their platform-specifickustomization.yamlfiles intoconfig/base/kustomization.yamlwherecontroller-genalready writes all generated CRDs. The extra CRDs oneach platform are harmless — their reconcilers are platform-gated.
Root cause introduced by: 1ae0906 (Cleanup manual CRDs and use generated
CRDs in kustomize)
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lintbefore submitting a PRSee the contribution guide for more details.
Release Notes
Made with Cursor