Skip to content

🌱 Update registry+v1 revision phases - #2520

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
perdasilva:regv1-phase-deployment
Feb 24, 2026
Merged

🌱 Update registry+v1 revision phases#2520
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
perdasilva:regv1-phase-deployment

Conversation

@perdasilva

@perdasilvaperdasilva commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

Description

Restructures the registry+v1 revision phase definitions to provide more granular control over the order in which Kubernetes resources are applied during extension installation. The phase definition is described in the this RFC.

The previous coarse-grained phases (rbac, deploy, publish) are replaced with finer-grained phases that better reflect resource dependency chains and operational best practices.

Note:

OLMv1 currently only supports registry+v1 content. The registry+v1 format only supports a limited
set of object kinds defined here.
The phase mapping considers all allowable registry+v1 bundle format resource with the following changes:

  • ClusterServiceVersion is replaced by the resources it describes: Deployment, Cluster/Role/Binding, ServiceAccount, ValidatingWebhookConfiguration, etc.
  • Certificate and Issuer from cert-manager are added since OLMv1 uses cert-manager for webhook service certificate by default

This PR has resulted in the removal of some kinds that were previously defined (e.g. HorizontalPodAutoscaler, ResourceQuota, and LimitRange) that are not expected to be present in registry+v1 bundles. Adding new kinds to existing, or new, phases later on should not constitute a breaking change since existing revisions would not have their phase composition changed

Phase changes

PreviousNewResources
rbacidentityServiceAccount
rbacrolesClusterRole, Role
rbac-bindingsbindingsClusterRoleBinding, RoleBinding
deploy (partial)configurationSecret, ConfigMap
deploy (partial)infrastructureService, Issuer
(new)scalingVerticalPodAutoscaler
publish (partial)admissionValidatingWebhookConfiguration, MutatingWebhookConfiguration

New phase order

namespaces → policies → identity → configuration → storage → crds →
roles → bindings → infrastructure → deploy → scaling → publish → admission

Key design decisions

  • RBAC split into identity/roles/bindings: ServiceAccounts are created first (identity), then role definitions (roles), then bindings (bindings), ensuring prerequisites exist before being referenced
  • Configuration before workloads: Secrets and ConfigMaps are deployed in configuration before deploy, so Pods can mount them immediately
  • Infrastructure before workloads: Services and cert-manager Issuers are deployed in infrastructure before deploy, so workloads can reference them
  • CRDs before RBAC roles: CRDs are deployed before roles/bindings so RBAC rules referencing custom resources can be validated
  • Admission last: Webhook configurations are registered only after their backing services and deployments are fully ready, preventing premature admission enforcement
  • Scaling after deploy: Autoscaling policies (VPA) target running workloads
  • Monitoring and OpenShift console resources in publish: PrometheusRule, ServiceMonitor, PodMonitor, and OpenShift Console resources are deployed in the publish phase
  • Implicit defaults preserved: Workload kinds not explicitly mapped (DaemonSet, StatefulSet, Pod, Job, etc.) still default to the deploy phase

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

CopilotAI review requested due to automatic review settings February 23, 2026 15:28
@openshift-ciopenshift-ciBot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 23, 2026
@netlify

netlifyBot commented Feb 23, 2026

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commit0ee177b
🔍 Latest deploy loghttps://app.netlify.com/projects/olmv1/deploys/699dc2921da0dc0008092eed
😎 Deploy Previewhttps://deploy-preview-2520--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

CopilotAI left a comment

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.

Pull request overview

Updates the operator-controller “revision phases” model to a more granular set of phases and refreshes phase sorting expectations accordingly.

Changes:

  • Replaces RBAC/RBACBindings with Identity/Roles/Bindings and adds new phases (Configuration/Infrastructure/Scaling/Admission).
  • Updates the GroupKind→Phase mapping to reflect the new phase taxonomy and ordering.
  • Adjusts unit tests for phase sorting and revision generation to match the new phase outputs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

FileDescription
internal/operator-controller/applier/phase.goIntroduces new phases and updates default ordering + GroupKind phase mappings.
internal/operator-controller/applier/phase_test.goUpdates phase sort test cases and expectations for the new phase breakdown.
internal/operator-controller/applier/boxcutter_test.goUpdates revision generator tests to expect objects split across the new phases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadinternal/operator-controller/applier/phase.go
Comment threadinternal/operator-controller/applier/phase.go
Comment threadinternal/operator-controller/applier/phase.go
Comment threadinternal/operator-controller/applier/boxcutter_test.go
@codecov

codecovBot commented Feb 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.03%. Comparing base (1ef820f) to head (0ee177b).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #2520 +/- ##
==========================================
- Coverage 73.27% 72.03% -1.24% 
==========================================
Files 103 103 Lines 8516 8686 +170 ==========================================
+ Hits 6240 6257 +17 - Misses 1801 1946 +145 - Partials 475 483 +8 
FlagCoverage Δ
e2e45.68% <ø> (-0.14%)⬇️
experimental-e2e53.56% <ø> (+0.10%)⬆️
unit57.12% <ø> (-0.83%)⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

CopilotAI review requested due to automatic review settings February 24, 2026 13:42
@perdasilva
perdasilvaforce-pushed the regv1-phase-deployment branch from 110babe to fe7852dCompareFebruary 24, 2026 13:42

CopilotAI left a comment

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@perdasilva
perdasilvaforce-pushed the regv1-phase-deployment branch from fe7852d to b6db8c1CompareFebruary 24, 2026 15:20
…rdering
Restructure the phase definitions to provide more granular control over
the order in which Kubernetes resources are applied during extension
installation. The previous coarse-grained phases (rbac, deploy, publish)
are replaced with finer-grained phases that better reflect resource
dependency chains and operational best practices.
Phase changes:
- Split "rbac" into "identity" (ServiceAccount), "roles" (ClusterRole,
Role), and "bindings" (ClusterRoleBinding, RoleBinding) for explicit
ordering of RBAC prerequisites before their bindings
- Extract "configuration" phase (Secret, ConfigMap) from "deploy" so
config resources are available before workloads that mount them
- Extract "infrastructure" phase (Service, Issuer) from "deploy" so
services and cert-manager issuers exist before workloads reference them
- Add "scaling" phase (VerticalPodAutoscaler) after deploy for
autoscaling policies to target running workloads
- Add "admission" phase (ValidatingWebhookConfiguration,
MutatingWebhookConfiguration) as the final phase so webhooks are
registered only after their backing services are ready
- Move CRDs before roles/bindings so RBAC rules referencing custom
resources can be validated
- Add cert-manager Certificate to "deploy" phase alongside Deployment
- Add monitoring resources (PrometheusRule, ServiceMonitor, PodMonitor)
and OpenShift console resources to "publish" phase
- Remove explicit mappings for workload kinds that already default to
"deploy" (DaemonSet, StatefulSet, ReplicaSet, Pod, Job, CronJob)
New phase order: namespaces → policies → identity → configuration →
storage → crds → roles → bindings → infrastructure → deploy →
scaling → publish → admission
Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
@perdasilva
perdasilvaforce-pushed the regv1-phase-deployment branch from b6db8c1 to 0ee177bCompareFebruary 24, 2026 15:23
CopilotAI review requested due to automatic review settings February 24, 2026 15:23

CopilotAI left a comment

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadinternal/operator-controller/applier/phase.go
@perdasilva
perdasilva marked this pull request as ready for review February 24, 2026 15:55
@openshift-ciopenshift-ciBot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 24, 2026

@pedjakpedjak left a comment

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.

/lgtm

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Feb 24, 2026
@tmshort

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmshort

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

@openshift-ciopenshift-ciBot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 24, 2026
@openshift-merge-bot
openshift-merge-botBot merged commit 662ecf2 into operator-framework:mainFeb 24, 2026
33 checks passed

@rashmigottipatirashmigottipati left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

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

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.lgtmIndicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@perdasilva@tmshort@pedjak@rashmigottipati