make triggers install optional
Changes
This PR introduces an optional installation flag for the Tekton Triggers component in the Tekton Operator. Users can now disable or enable Trigger installation via the TektonConfig CR by setting spec.trigger.disabled: true. When enabled, the operator will skip creating any Trigger-related InstallerSets and Deployments.
fixes https://github.com/tektoncd/operator/issues/2756
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
- [x ] Run
make test lintbefore submitting a PR - [x ] Includes tests (if functionality changed/added)
- [x ] Includes docs (if user facing)
- [ ] Commit messages follow commit message best practices
See the contribution guide for more details.
Testing
Verification
Unit tests and e2e suite pass, including new coverage for disabling Triggers.
Manually tested: creating TektonConfig with spec.trigger.disabled=true results in no TektonTrigger-related resources on the cluster.
Release Notes
Feature: Make Tekton Triggers installation optional
A new field spec.trigger.disabled (default: false) is introduced in the TektonConfig CR. When set to true, the operator will not install or reconcile any Tekton Triggers components (CRDs, Deployments, ServiceAccounts, etc.).
Backwards compatible default(disable: false) ensures existing installations continue unchanged.
apiVersion: operator.tekton.dev/v1alpha1
kind: TektonConfig
metadata:
name: config
spec:
trigger:
disabled: true # disable Triggers installation
Fixes #2756
@mbpavan is this working towards upgrade ? please do an upgrade check
@mbpavan is this working towards upgrade ? please do an upgrade check
@jkhelil did an upgrade test and works fine. thank you!
LGTM
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: jkhelil, pramodbindal, vdemeester
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [jkhelil,vdemeester]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/lgtm