Skip to content

fix(kustomize): move platform-specific CRDs to shared base - #3878

Merged
jkhelil merged 1 commit into
tektoncd:mainfrom
jkhelil:fix/kustomize-platform-crd-cross-root
Aug 7, 2026
Merged

fix(kustomize): move platform-specific CRDs to shared base#3878
jkhelil merged 1 commit into
tektoncd:mainfrom
jkhelil:fix/kustomize-platform-crd-cross-root

Conversation

@jkhelil

@jkhelil jkhelil commented Aug 7, 2026

Copy link
Copy Markdown
Member

Changes

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).

This manifested as the koparse step failing with:

Expected images did not match: Images [...] were expected but missing.

because ko resolve received empty stdin (from the failed kustomize
pipe) and produced an empty release.yaml.

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.

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:

See the contribution guide for more details.

Release Notes

NONE

Made with Cursor

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>
@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Aug 7, 2026
@tekton-robot
tekton-robot requested review from enarha and khrm August 7, 2026 12:53
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 7, 2026
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.13%. Comparing base (818e85d) to head (e4f5c9d).
⚠️ Report is 1 commits behind head on main.

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

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.

@pratap0007

Copy link
Copy Markdown
Contributor

/approve

@tekton-robot

Copy link
Copy Markdown
Contributor

[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

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 7, 2026
@pratap0007

Copy link
Copy Markdown
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 7, 2026
@jkhelil
jkhelil merged commit e18041d into tektoncd:main Aug 7, 2026
17 checks passed
@jkhelil

jkhelil commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-v0.81.x

@jkhelil

jkhelil commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-v0.80.x

@tekton-robot

Copy link
Copy Markdown
Contributor

Cherry-pick to release-v0.81.x successful!

A new pull request has been created to cherry-pick this change to release-v0.81.x.

PR: #3879

Please review and merge the cherry-pick PR.

@tekton-robot

Copy link
Copy Markdown
Contributor

Cherry-pick to release-v0.80.x successful!

A new pull request has been created to cherry-pick this change to release-v0.80.x.

PR: #3880

Please review and merge the cherry-pick PR.

@tekton-robot

Copy link
Copy Markdown
Contributor

🔄 Cherry-pick to release-v0.81.x updated!

The existing cherry-pick PR #3879 has been updated with the latest changes.

PR: #3879

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants