Rename `OpenShiftPipelinesAsCode` CRD to `TektonPipelinesAsCode`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 608
- Forks
- 263
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 125
Description
Summary
The OpenShiftPipelinesAsCode CRD (kind: OpenShiftPipelinesAsCode, resource:
openshiftpipelinesascodes.operator.tekton.dev) should be renamed to
TektonPipelinesAsCode to align with the project's upstream move and with the
naming convention used by every other component in this operator.
Background
Pipelines-as-Code (PAC) has moved its upstream repository from the
openshift-pipelines GitHub organization to tektoncd:
https://github.com/tektoncd/pipelines-as-code
The operator's CRD name predates that move and carries an OpenShift-specific
prefix that is now misleading — PAC runs on vanilla Kubernetes as well and the
operator already installs it on both platforms via the same CRD. Every other
component managed by this operator follows a Tekton-prefixed naming scheme:
| Kind | Resource |
|---|---|
TektonPipeline |
tektonpipelines |
TektonTrigger |
tektontriggers |
TektonChain |
tektonchains |
TektonDashboard |
tektondashboards |
TektonResult |
tektonresults |
TektonPruner |
tektonpruners |
TektonScheduler |
tektonschedulers |
OpenShiftPipelinesAsCode |
openshiftpipelinesascodes ← outlier |
OpenShiftPipelinesAsCode is the only component with a platform-branded prefix.
Proposed Rename
| Before | After | |
|---|---|---|
| Kind | OpenShiftPipelinesAsCode |
TektonPipelinesAsCode |
| Plural resource | openshiftpipelinesascodes |
tektonpipelinesascodes |
| Singular | openshiftpipelinesascode |
tektonpipelinesascode |
| Short names | opac, pac |
tpac, pac |
| CRD name | openshiftpipelinesascodes.operator.tekton.dev |
tektonpipelinesascodes.operator.tekton.dev |
The singleton CR instance name (pipelines-as-code) and target namespaces remain
unchanged.
Scope of Changes
tekton-operator (this repo)
API types (pkg/apis/operator/v1alpha1/)
- Rename
openshiftpipelinesascode_types.go→tektonpipelinesascode_types.go; update struct name, markers, and all references - Update
register.go:KindOpenShiftPipelinesAsCode→KindTektonPipelinesAsCode - Update
const.go: renameOpenShiftPipelinesAsCodeNameconstant (value unchanged:"pipelines-as-code") - Rename
openshiftpipelinesascode_lifecycle.go→tektonpipelinesascode_lifecycle.go - Rename
openshiftpipelinesascode_defaults.go→tektonpipelinesascode_defaults.go - Rename
openshiftpipelinesascode_validation.go→tektonpipelinesascode_validation.go
Code generation (run after type changes)
- Re-run
./hack/update-codegen.sh - Generated client package
pkg/client/…/openshiftpipelinesascode/→tektonpipelinesascode/ - Generated informer / lister packages updated accordingly
Reconcilers
- Rename package
pkg/reconciler/openshift/openshiftpipelinesascode/→tektonpipelinesascode/ - Rename package
pkg/reconciler/kubernetes/pipelinesascode/→tektonpipelinesascode/(or align naming) - Update
pkg/reconciler/shared/tektonconfig/pipelinesascode/references - Update
pkg/reconciler/platform/const.go:ControllerOpenShiftPipelinesAsCode→ControllerTektonPipelinesAsCode
Config / manifests
- Rename
config/base/generated-crds/operator.tekton.dev_openshiftpipelinesascodes.yaml→…_tektonpipelinesascodes.yaml - Update
config/kubernetes/base/pipelinesascode.yaml(RBAC ClusterRole names, resource list) - Update CR samples:
config/crs/kubernetes/pipelinesascode/operator_v1alpha1_pipelinesascode_cr.yamlconfig/crs/openshift/pipelinesascode/operator_v1alpha1_openshiftpipelinesascode_cr.yaml
TektonConfig integration
- Update
TektonConfigSpecreferences that wire PAC installation (field names inPlatforms.OpenShift.PipelinesAsCode/Platforms.Kubernetes.PipelinesAsCodemay stay as-is since they are not the CRD kind)
Tests
- Update unit and E2E test helpers that reference
OpenShiftPipelinesAsCodekind strings or use the old resource name - Update any
test/resources/helpers
CSV / OLM bundles
- Update bundle CSVs under
operatorhub//bundle/to reference new CRD name - Update
owned: CRDsentries in CSV
Tekton Website
The Tekton website documentation must be updated to reflect the rename wherever
OpenShiftPipelinesAsCode appears:
- Install / getting-started guides that show
kind: OpenShiftPipelinesAsCode
in YAML snippets - API reference pages for the operator CRD (
openshiftpipelinesascodes) - Operator component overview / architecture pages that list managed CRDs
kubectl/occommand examples using-o openshiftpipelinesascodeor
get opac
Migration / Compatibility
This is a breaking change for existing users who have a live
OpenShiftPipelinesAsCode CR on their cluster.
Suggested approach: deprecation window
Keep the old OpenShiftPipelinesAsCode CRD name as a deprecated alias for one
or two minor releases — emit a warning event on reconcile, document the rename
prominently in release notes, and remove the old CRD in a later release. This
gives users time to update their manifests and automation without forcing an
immediate migration.
Open for discussion — other approaches worth considering:
- Conversion webhook — serve both CRD versions via a webhook, allowing
in-place migration without users touching their CRs.- Operator-managed migration — on startup, if the operator detects an
OpenShiftPipelinesAsCodeCR and noTektonPipelinesAsCodeCR, create
the new CR from the existing spec and mark the old one for deletion.Feedback on the preferred approach is welcome before implementation begins.
Whichever strategy is chosen must be documented in the release notes and upgrade guide.
Acceptance Criteria
-
TektonPipelinesAsCodeCRD is available on the cluster after operator
install;OpenShiftPipelinesAsCodeCRD is removed (or deprecated per the
migration plan). -
kubectl get tektonpipelinesascodeand short formkubectl get pacwork. -
make lintandmake testpass with zero failures. -
./hack/update-codegen.shhas been re-run and generated files are committed. - OLM/CSV bundles reference only
tektonpipelinesascodes.operator.tekton.dev. - Tekton website pages updated with new kind/resource names.
- Upgrade path documented (migration guide or release note).
References
- Pipelines-as-Code upstream repo: https://github.com/tektoncd/pipelines-as-code
- Current CRD type:
pkg/apis/operator/v1alpha1/openshiftpipelinesascode_types.go - Naming convention reference:
pkg/apis/operator/v1alpha1/tektonpipeline_types.go
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing pkg/apis/operator/v1alpha1/openshiftpipelinesascode_types.go with tektonpipeline_types.go, then map references with the requested codegen and manifest changes. Before implementation, resolve the migration strategy for existing CRs and the separate Tekton website work. Done means the chosen compatibility path, generated clients, CRDs, bundles, tests, and upgrade documentation all satisfy the acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- api, devops, infrastructure
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100