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: rename OpenShiftPipelinesAsCodeName constant (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.yaml
config/crs/openshift/pipelinesascode/operator_v1alpha1_openshiftpipelinesascode_cr.yaml
TektonConfig integration
- Update
TektonConfigSpec references that wire PAC installation (field names in Platforms.OpenShift.PipelinesAsCode / Platforms.Kubernetes.PipelinesAsCode may stay as-is since they are not the CRD kind)
Tests
- Update unit and E2E test helpers that reference
OpenShiftPipelinesAsCode kind 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: CRDs entries 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 / oc command examples using -o openshiftpipelinesascode or
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
OpenShiftPipelinesAsCode CR and no TektonPipelinesAsCode CR, 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
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
Summary
The
OpenShiftPipelinesAsCodeCRD (kind:OpenShiftPipelinesAsCode, resource:openshiftpipelinesascodes.operator.tekton.dev) should be renamed toTektonPipelinesAsCodeto align with the project's upstream move and with thenaming convention used by every other component in this operator.
Background
Pipelines-as-Code (PAC) has moved its upstream repository from the
openshift-pipelinesGitHub organization totektoncd:https://github.com/tektoncd/pipelines-as-code
The operator's CRD name predates that move and carries an
OpenShift-specificprefix 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:TektonPipelinetektonpipelinesTektonTriggertektontriggersTektonChaintektonchainsTektonDashboardtektondashboardsTektonResulttektonresultsTektonPrunertektonprunersTektonSchedulertektonschedulersOpenShiftPipelinesAsCodeopenshiftpipelinesascodes← outlierOpenShiftPipelinesAsCodeis the only component with a platform-branded prefix.Proposed Rename
OpenShiftPipelinesAsCodeTektonPipelinesAsCodeopenshiftpipelinesascodestektonpipelinesascodesopenshiftpipelinesascodetektonpipelinesascodeopac,pactpac,pacopenshiftpipelinesascodes.operator.tekton.devtektonpipelinesascodes.operator.tekton.devThe singleton CR instance name (
pipelines-as-code) and target namespaces remainunchanged.
Scope of Changes
tekton-operator (this repo)
API types (
pkg/apis/operator/v1alpha1/)openshiftpipelinesascode_types.go→tektonpipelinesascode_types.go; update struct name, markers, and all referencesregister.go:KindOpenShiftPipelinesAsCode→KindTektonPipelinesAsCodeconst.go: renameOpenShiftPipelinesAsCodeNameconstant (value unchanged:"pipelines-as-code")openshiftpipelinesascode_lifecycle.go→tektonpipelinesascode_lifecycle.goopenshiftpipelinesascode_defaults.go→tektonpipelinesascode_defaults.goopenshiftpipelinesascode_validation.go→tektonpipelinesascode_validation.goCode generation (run after type changes)
./hack/update-codegen.shpkg/client/…/openshiftpipelinesascode/→tektonpipelinesascode/Reconcilers
pkg/reconciler/openshift/openshiftpipelinesascode/→tektonpipelinesascode/pkg/reconciler/kubernetes/pipelinesascode/→tektonpipelinesascode/(or align naming)pkg/reconciler/shared/tektonconfig/pipelinesascode/referencespkg/reconciler/platform/const.go:ControllerOpenShiftPipelinesAsCode→ControllerTektonPipelinesAsCodeConfig / manifests
config/base/generated-crds/operator.tekton.dev_openshiftpipelinesascodes.yaml→…_tektonpipelinesascodes.yamlconfig/kubernetes/base/pipelinesascode.yaml(RBAC ClusterRole names, resource list)config/crs/kubernetes/pipelinesascode/operator_v1alpha1_pipelinesascode_cr.yamlconfig/crs/openshift/pipelinesascode/operator_v1alpha1_openshiftpipelinesascode_cr.yamlTektonConfig integration
TektonConfigSpecreferences that wire PAC installation (field names inPlatforms.OpenShift.PipelinesAsCode/Platforms.Kubernetes.PipelinesAsCodemay stay as-is since they are not the CRD kind)Tests
OpenShiftPipelinesAsCodekind strings or use the old resource nametest/resources/helpersCSV / OLM bundles
operatorhub//bundle/to reference new CRD nameowned: CRDsentries in CSVTekton Website
The Tekton website documentation must be updated to reflect the rename wherever
OpenShiftPipelinesAsCodeappears:kind: OpenShiftPipelinesAsCodein YAML snippets
openshiftpipelinesascodes)kubectl/occommand examples using-o openshiftpipelinesascodeorget opacMigration / Compatibility
This is a breaking change for existing users who have a live
OpenShiftPipelinesAsCodeCR on their cluster.Suggested approach: deprecation window
Keep the old
OpenShiftPipelinesAsCodeCRD name as a deprecated alias for oneor 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.
Whichever strategy is chosen must be documented in the release notes and upgrade guide.
Acceptance Criteria
TektonPipelinesAsCodeCRD is available on the cluster after operatorinstall;
OpenShiftPipelinesAsCodeCRD is removed (or deprecated per themigration 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.tektonpipelinesascodes.operator.tekton.dev.References
pkg/apis/operator/v1alpha1/openshiftpipelinesascode_types.gopkg/apis/operator/v1alpha1/tektonpipeline_types.go