fix(operatorhub): exclude TektonAddon CRD from Kubernetes bundle - #3980
Conversation
TektonAddon is OpenShift-only. Commit e4f5c9d moved the tektonaddons CRD into the shared config/base to satisfy kustomize path restrictions, which caused the Kubernetes bundle to start shipping it. OLM would then advertise it as a Provided API in the Kubernetes OperatorHub console. Add a kustomize patch in config/kubernetes/base that marks tektonaddons CRD with config.kubernetes.io/local-config, causing kustomize to drop it from the Kubernetes build output entirely. Verified: kustomize build config/kubernetes/overlays/operatorhub produces no CRD object for tektonaddons (RBAC rules only), while tektonaddons CRD remains present in the OpenShift build. This is the symmetric counterpart to the OpenShift fix in tektoncd#3978, which excluded tektondashboards (Kubernetes-only) from the OpenShift bundle. 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 #3980 +/- ##
=======================================
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:
|
|
/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 |
1 similar comment
|
/cherry-pick release-v0.81.x |
|
✅ Cherry-pick to A new pull request has been created to cherry-pick this change to PR: #3993 Please review and merge the cherry-pick PR. |
Changes
TektonAddonis OpenShift-only. Commit e4f5c9d moved thetektonaddonsCRD into the sharedconfig/baseto satisfy kustomize's path restrictions, which caused the Kubernetes bundle to start shipping it. OLM would then advertise it as a Provided API in the Kubernetes OperatorHub console.This is the symmetric counterpart to #3978, which excluded
tektondashboards(Kubernetes-only) from the OpenShift bundle. Both issues were introduced by the same commit.Fix: Add a kustomize patch in
config/kubernetes/base/kustomization.yamlthat setsconfig.kubernetes.io/local-config: "true"on thetektonaddonsCRD, causing kustomize to drop it from the Kubernetes build output entirely.Verified:
kustomize build config/kubernetes/overlays/operatorhub→tektonaddonsappears in RBAC rules only, no CRD object emittedkustomize build config/openshift/overlays/operatorhub→tektonaddonsCRD still present (correct)Submitter Checklist
make test lintbefore submitting a PRRelease Notes
Made with Cursor