fix(operatorhub): exclude TektonAddon CRD from Kubernetes bundle - #3980
Open
jkhelil wants to merge 1 commit into
Open
fix(operatorhub): exclude TektonAddon CRD from Kubernetes bundle#3980jkhelil wants to merge 1 commit into
jkhelil wants to merge 1 commit into
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:
|
Contributor
|
/approve |
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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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