Skip to content

fix(operatorhub): exclude TektonAddon CRD from Kubernetes bundle - #3980

Open
jkhelil wants to merge 1 commit into
tektoncd:mainfrom
jkhelil:fix/hide-tektonaddon-kubernetes-bundle
Open

fix(operatorhub): exclude TektonAddon CRD from Kubernetes bundle#3980
jkhelil wants to merge 1 commit into
tektoncd:mainfrom
jkhelil:fix/hide-tektonaddon-kubernetes-bundle

Conversation

@jkhelil

@jkhelil jkhelil commented Aug 25, 2026

Copy link
Copy Markdown
Member

Changes

TektonAddon is OpenShift-only. Commit e4f5c9d moved the tektonaddons CRD into the shared config/base to 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.yaml that sets config.kubernetes.io/local-config: "true" on the tektonaddons CRD, causing kustomize to drop it from the Kubernetes build output entirely.

Verified:

  • kustomize build config/kubernetes/overlays/operatorhubtektonaddons appears in RBAC rules only, no CRD object emitted
  • kustomize build config/openshift/overlays/operatorhubtektonaddons CRD still present (correct)

Submitter Checklist

Release Notes

Fix TektonAddon appearing as a Provided API in the Kubernetes OperatorHub console. The CRD is now excluded from the Kubernetes bundle via a kustomize patch (TektonAddon is OpenShift-only).

Made with Cursor

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>
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 25, 2026
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 25, 2026
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.33%. Comparing base (8e513af) to head (24724a0).

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

@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 25, 2026
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. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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