Skip to content

(feat): Add Pipelines-as-Code on Kubernetes; resolve openshift-pipelines/pipelines-as-code to tektoncd repo#3337

Open
mbpavan wants to merge 1 commit intotektoncd:mainfrom
mbpavan:pbheeman-add-pac
Open

(feat): Add Pipelines-as-Code on Kubernetes; resolve openshift-pipelines/pipelines-as-code to tektoncd repo#3337
mbpavan wants to merge 1 commit intotektoncd:mainfrom
mbpavan:pbheeman-add-pac

Conversation

@mbpavan
Copy link
Copy Markdown
Contributor

@mbpavan mbpavan commented Apr 8, 2026

Changes

Enable Pipelines-as-Code (PAC) on vanilla Kubernetes in the Tekton Operator, aligned with the tektoncd/pipelines-as-code GitHub repo while keeping the canonical Go module path github.com/openshift-pipelines/pipelines-as-code.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • [ x] Run make test lint before submitting a PR
  • [ x] Includes tests (if functionality changed/added)
  • [ x] Includes docs (if user facing)
  • [ x] Commit messages follow commit message best practices

See the contribution guide for more details.

Release Notes

The Tekton Operator can now install and reconcile Pipelines-as-Code (PAC) on vanilla Kubernetes,PAC payloads are sourced from tektoncd/pipelines-as-code, while the Go module path remains github.com/openshift-pipelines/pipelines-as-code and is wired to that repo with a go.mod replace. 

@tekton-robot tekton-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Apr 8, 2026
@tekton-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from mbpavan after the PR has been reviewed.

The full list of commands accepted by this bot can be found 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-as-code
Copy link
Copy Markdown

tekton-as-code bot commented Apr 8, 2026

Caution

There are some errors in your PipelineRun template.

PipelineRun Error
release-pipeline CEL expression evaluation error: expression "has(body.created) && body.created == true && pac.target_branch.startsWith(\"refs/heads/release-v\")\n" check failed: ERROR: <input>:1:46: undeclared reference to 'pac' (in container '') | has(body.created) && body.created == true && pac.target_branch.startsWith("refs/heads/release-v") | .............................................^

@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Apr 8, 2026
@mbpavan mbpavan changed the title (WIP) Add Pipelines-as-Code on Kubernetes and resolve openshift-pipelines/p… (WIP) Add Pipelines-as-Code on Kubernetes; resolve openshift-pipelines/pipelines-as-code to tektoncd repo Apr 8, 2026
@mbpavan
Copy link
Copy Markdown
Contributor Author

mbpavan commented Apr 8, 2026

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 8, 2026
@mbpavan mbpavan changed the title (WIP) Add Pipelines-as-Code on Kubernetes; resolve openshift-pipelines/pipelines-as-code to tektoncd repo (WIP) (feat): Add Pipelines-as-Code on Kubernetes; resolve openshift-pipelines/pipelines-as-code to tektoncd repo Apr 8, 2026
@mbpavan mbpavan force-pushed the pbheeman-add-pac branch from 5551ab6 to 5cb4ff9 Compare April 8, 2026 06:30
@mbpavan mbpavan changed the title (WIP) (feat): Add Pipelines-as-Code on Kubernetes; resolve openshift-pipelines/pipelines-as-code to tektoncd repo (feat): Add Pipelines-as-Code on Kubernetes; resolve openshift-pipelines/pipelines-as-code to tektoncd repo Apr 9, 2026
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 9, 2026
@jkhelil
Copy link
Copy Markdown
Member

jkhelil commented Apr 9, 2026

@mbpavan Overall looks good

  • Please fix the helm charts too add, the pac crd to kubernetes crds yaml and probably update deployment
  • Is this PR works for initial install for openshift and kubernetes ?
  • Is this PR works with upgrade on openshift ?
  • Can you have a PR for old releases, for patch releases where we cherr-pick only required things related to migration: fetch releases, go module rewriting, lookup for release on tektoninstallerset, anything but not the kubernetes addon feature

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 9, 2026
@tekton-robot
Copy link
Copy Markdown
Contributor

@mbpavan: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mbpavan
Copy link
Copy Markdown
Contributor Author

mbpavan commented Apr 9, 2026

@mbpavan Overall looks good

  • Please fix the helm charts too add, the pac crd to kubernetes crds yaml and probably update deployment
  • Is this PR works for initial install for openshift and kubernetes ?
  • Is this PR works with upgrade on openshift ?
  • Can you have a PR for old releases, for patch releases where we cherr-pick only required things related to migration: fetch releases, go module rewriting, lookup for release on tektoninstallerset, anything but not the kubernetes addon feature

Thanks @jkhelil
Q: Does this PR work for initial installation on both OpenShift and Kubernetes?
A: Yes, it works. I have also verified this by enabling and disabling PAC.
Q: Does this PR work during upgrades on OpenShift?
A: Yes, it works for upgrades on both Kubernetes and OpenShift.
Q: Can you create a separate PR for older/patch releases that cherry-picks only the migration-related changes (fetch releases, Go module rewriting, TektonInstallerSet release lookup, etc.), excluding the Kubernetes addon feature?
A: Will create that once this PR is merged. I want to incorporate any review feedback from this PR before preparing the patch-release PR.

for helm chart, I will do, good catch

- On Kubernetes
- [TektonDashboard](./TektonDashboard.md)
- [OpenShiftPipelinesAsCode](./OpenShiftPipelinesAsCode.md) (installed via `spec.platforms.kubernetes.pipelinesAsCode`; same CRD/kind as on OpenShift)
- On OpenShift
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider revisiting this section. The content is reduntant. Please check teh doc here - https://tekton.dev/docs/operator/tektonaddon/ addon right now is intentionally opnshift only.. with this PR we are making that as well kuberenetes, which will increase the scope of work downstream and upstream.

case *v1alpha1.ManualApprovalGate:
return filepath.Join(koDataDir, "manual-approval-gate")
case *v1alpha1.OpenShiftPipelinesAsCode:
return filepath.Join(koDataDir, "tekton-addon/pipelines-as-code")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO PAC should not be a sub-directory of tekton-addon please consider fixing this

},
v1alpha1.ProfileBasic: {
Deployments: []string{
"pipelines-as-code-controller",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need PAC for Basic profile & Lite profile?

*config.Spec.Platforms.OpenShift.PipelinesAsCode.Enable {
pacEnabled = true
}
if config.Spec.Platforms.Kubernetes.PipelinesAsCode != nil &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the user attempts to do spec.openshift.PipelinesAsCode as well as spec.kubernetes.PipelinesasCode? Do we have validation to allow only either of them? Also if we set as kuberenetes, it should work on both OPenshift and kubernetes? Is there any logic that will work only if it is set to Openshift?

Copy link
Copy Markdown
Contributor

@anithapriyanatarajan anithapriyanatarajan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbpavan - This PR also enables support of tekton addons upstream. Please update PR description and commit accordingly, if that is intended.

Also, please include tests to https://github.com/mbpavan/operator/blob/main/pkg/reconciler/common/releases_test.go since we are making changes to releases.go.

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

Labels

kind/feature Categorizes issue or PR as related to a new feature. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants