Skip to content

[release-controller] ARM64 support for OKD releases - #83116

Merged
openshift-merge-bot[bot] merged 3 commits into
openshift:mainfrom
bradmwilliams:origin-arm64-support
Aug 7, 2026
Merged

[release-controller] ARM64 support for OKD releases#83116
openshift-merge-bot[bot] merged 3 commits into
openshift:mainfrom
bradmwilliams:origin-arm64-support

Conversation

@bradmwilliams

@bradmwilliams bradmwilliams commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR adds a product abstraction to release controller generator and adds support for a brand new release-controller for ARM64 OKD releases.

Summary

  • Introduces a Product abstraction in the release controller generator so OCP and OKD are handled uniformly instead of OKD being a hardcoded one-off
  • Adds an arm64 release controller for OKD (origin-arm64 namespace, release-controller-okd-arm64 deployment)
  • Renames OKD deployments from release-controller / release-controller-api to release-controller-okd / release-controller-api-okd for consistency with OCP naming
  • Scales the old-named OKD deployments to replicas: 0 in the same changeset to prevent both old and new controllers operating on the same streams simultaneously
  • Extends CRT, TRT, and developer RBAC to cover origin and origin-arm64 namespaces
  • OKD now gets full RBAC (image-puller, import, prowjob, namespace, service account) through the same add_imagestream_namespace_rbac path as OCP
  • All OCP generated output is unchanged

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED

Summary by CodeRabbit

  • Adds product-aware release-controller generation for OCP and OKD.
  • Adds ARM64 support for OKD in the origin-arm64 namespace.
  • Generates OKD-specific deployments, services, routes, namespaces, service accounts, and RBAC.
  • Renames active OKD deployments to match OCP naming and scales legacy deployments to zero.
  • Extends CRT, TRT, developer, and image-stream RBAC to origin and origin-arm64.
  • Updates Job RBAC rules to use the batch API group.
  • Preserves the generated OCP output.

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 00bce074-09ad-46c8-b4a2-aee86e3092d8

📥 Commits

Reviewing files that changed from the base of the PR and between 1ca05d9 and 06f842b.

📒 Files selected for processing (2)
  • hack/generators/release-controllers/config/__init__.py
  • hack/generators/release-controllers/generate-release-controllers.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • hack/generators/release-controllers/config/init.py

Walkthrough

The release-controller generator now supports OCP and OKD products across configured architectures and privacy modes. It generates product-specific RBAC, namespaces, deployments, service accounts, ARM64 resources, and legacy compatibility deployments.

Changes

Release-controller productization

Layer / File(s) Summary
Product-aware generation
hack/generators/release-controllers/config/__init__.py, hack/generators/release-controllers/generate-release-controllers.py, hack/generators/release-controllers/content/*
Adds OCP and OKD product metadata. Generation derives names and namespaces from product context and emits product-specific RBAC and deployments.
OKD deployment resources
clusters/app.ci/release-controller/deploy-origin-controller.yaml, clusters/app.ci/release-controller/deploy-origin-arm64-controller.yaml
Renames active OKD resources, preserves legacy zero-replica resources, and adds ARM64 controller and API workloads.
Controller and administrator RBAC
clusters/app.ci/release-controller/admin_deploy-origin-controller.yaml, clusters/app.ci/release-controller/admin_deploy-origin-arm64-controller.yaml, clusters/app.ci/release-controller/admin-origin-rbac.yaml, clusters/app.ci/release-controller/admin-origin-arm64-rbac.yaml, clusters/app.ci/crt/admin_generated_rbac.yaml, clusters/app.ci/trt/admin_generated_rbac.yaml
Adds controller, builder, payload-modifier, developer, release-admin, and TRT-admin permissions.
Batch API group updates
clusters/app.ci/release-controller/admin-ocp-*-rbac.yaml, hack/generators/release-controllers/content/development_rbac.py
Changes Job permissions from batch/v1 to batch.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: danilo-gemoli, jupierce

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding ARM64 support for OKD release-controller deployments.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR changes only Python generators and YAML manifests; no test files or Ginkgo dependencies/title calls were found in the PR diff or repository.
Test Structure And Quality ✅ Passed PASS: The PR changes manifests and Python generator code only; no Ginkgo test files, Ginkgo constructs, cluster waits, or test setup/cleanup were added or modified.
Microshift Test Compatibility ✅ Passed The pull request changes only release-controller generator Python files in the inspected diff; no new Ginkgo tests or test declarations were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The full PR changes only Python generator code and YAML manifests; no new Go files or Ginkgo test declarations were added, so SNO compatibility checks do not apply.
Topology-Aware Scheduling Compatibility ✅ Passed Changed release-controller Deployments and generator additions contain no node selectors, affinity, topology spread, tolerations, PDBs, or topology-derived replica logic; they use ordinary fixed re...
Ote Binary Stdout Contract ✅ Passed The PR changes only 8 Python and 18 YAML files, with no Go or OTE identifiers; no OTE process-level stdout contract is affected.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR adds no Ginkgo e2e tests or test-like files; changes are YAML and Python generator code, so the IPv6/disconnected test check is not applicable.
No-Weak-Crypto ✅ Passed The complete three-commit diff contains no MD5, SHA-1, DES, 3DES, RC4, Blowfish, or ECB usage, crypto APIs, custom crypto, or secret/token comparisons.
Container-Privileges ✅ Passed Changed manifests and generator output contain no privileged:true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation:true, or explicit root settings.
No-Sensitive-Data-In-Logs ✅ Passed The PR adds no logging statements or log payloads; the only generator print remains an unchanged annotation-path output, and manifests contain references rather than secret values.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
hack/generators/release-controllers/content/art_namespaces_rbac.py (1)

229-231: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

The prowjob Role name stays product-independent and now collides across products.

Line 229 builds the name from context.suffix only. Line 230 places the Role in the shared ci deployment namespace. OCP and OKD now run for the same architectures, so both products emit a Role named release-controller-prowjob in ci for x86_64 and release-controller-arm64-prowjob in ci for arm64. The generated file clusters/app.ci/release-controller/admin_deploy-origin-controller.yaml at lines 125-142 shows the OKD copy. Two applied files then own one cluster object.

The rules are identical today, so behavior does not change. The ownership is still ambiguous. Add the product prefix, as done for the sibling names on lines 211 and 249. Update the roleRef on line 333 in the same change.

🔧 Proposed fix
-            'name': f'release-controller{context.suffix}-prowjob',
+            'name': f'release-controller-{context.product.deployment_prefix}{context.suffix}-prowjob',
             'namespace': context.config.rc_deployment_namespace,

Apply the matching change to the roleRef at line 333:

-            'name': f'release-controller{context.suffix}-prowjob'
+            'name': f'release-controller-{context.product.deployment_prefix}{context.suffix}-prowjob'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/generators/release-controllers/content/art_namespaces_rbac.py` around
lines 229 - 231, Update the prowjob Role name in the relevant generator block to
include the product prefix, matching the sibling naming patterns near lines 211
and 249, while preserving the existing suffix and namespace. Update the
corresponding roleRef target near line 333 to reference the exact same
product-qualified Role name.
clusters/app.ci/release-controller/deploy-origin-controller.yaml (1)

14-23: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

Delete the old Route during the cutover.

The previous manifest defines Route/release-controller with the same host. A normal apply does not delete it. Delete the old Route, or use an applier that prunes removed objects, before applying Route/release-controller-okd. Otherwise, OpenShift rejects the new Route with HostAlreadyClaimed, and the old Route targets the zero-replica release-controller-api.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@clusters/app.ci/release-controller/deploy-origin-controller.yaml` around
lines 14 - 23, Remove the legacy Route/release-controller as part of the cutover
before applying Route/release-controller-okd, or configure the deployment
applier to prune removed objects. Ensure the old Route no longer claims the
shared host and does not continue targeting release-controller-api.
🧹 Nitpick comments (3)
hack/generators/release-controllers/generate-release-controllers.py (1)

44-53: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Optional: move the per-product generator selection onto Product.

The loop dispatches on product.name with string comparison. A third product requires a new elif branch here and in each RBAC generator. Consider storing the deployment generator callables on the Product instance instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/generators/release-controllers/generate-release-controllers.py` around
lines 44 - 53, Optionally refactor the per-product deployment dispatch in the
generator loop to use generator callables stored on the Product instance instead
of comparing product.name. Add the appropriate deployment generator selection to
Product and invoke it from this flow, preserving the existing OCP and OKD
generation behavior and enabling additional products without new branches.
hack/generators/release-controllers/content/development_rbac.py (1)

139-142: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Emit the ci monitoring RBAC explicitly instead of attaching it to the first OKD file.

The ci_monitoring_generated flag places the ci namespace monitoring Role and binding in whichever file the first okd context produces. That file is clusters/app.ci/release-controller/admin-origin-rbac.yaml today. If the okd product is renamed or removed, the ci monitoring RBAC disappears from all generated output and no error is raised.

Generate the ci monitoring resources in a dedicated one-off document, in the same way generate_app_ci_content handles other cluster-wide resources.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/generators/release-controllers/content/development_rbac.py` around lines
139 - 142, Replace the ci_monitoring_generated condition in the
release-controller generation flow with a dedicated one-off document for the ci
monitoring Role and binding. Follow the generate_app_ci_content pattern for
emitting cluster-wide resources, and remove the dependency on product.name ==
'okd' so the ci monitoring RBAC is generated explicitly even when OKD contexts
are renamed or absent.
hack/generators/release-controllers/content/origin_resources.py (1)

4-84: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Plan the removal of the legacy scaled-down Deployments.

These two Deployments exist only to drain the pre-rename workloads. After the rollout completes, they become permanent dead objects in the generated output. Add a tracking issue or a TODO with the removal condition.

The Keel annotations also have no effect while replicas is 0. Keel continues to poll and patch the image on objects that never run pods. Consider dropping the four keel.sh/* annotations from these two objects.

♻️ Proposed simplification of the legacy objects
     gendoc.append({
         "apiVersion": "apps/v1",
         "kind": "Deployment",
         "metadata": {
-            "annotations": {
-                'keel.sh/policy': 'force',
-                'keel.sh/matchTag': 'true',
-                'keel.sh/trigger': 'poll',
-                'keel.sh/pollSchedule': '`@every` 5m'
-            },
             "name": "release-controller",
             "namespace": context.config.rc_deployment_namespace,
         },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/generators/release-controllers/content/origin_resources.py` around lines
4 - 84, Update add_legacy_origin_deployments_scaled_down to document a removal
condition with a TODO or tracking issue, and remove the four keel.sh annotations
from both legacy scaled-down Deployment metadata blocks while preserving their
drain-only replicas: 0 behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@clusters/app.ci/release-controller/admin_deploy-origin-arm64-controller.yaml`:
- Around line 202-205: Add a Kubernetes NetworkPolicy resource targeting the
ci-release-arm64 namespace, alongside the existing Namespace manifest. Configure
it according to the repository’s established NetworkPolicy conventions so the
namespace is covered without changing the existing Namespace definition.

In `@clusters/app.ci/release-controller/admin-origin-arm64-rbac.yaml`:
- Around line 65-72: Update the Jobs RBAC rule in development_rbac.py to use the
batch API group instead of batch/v1, then regenerate the affected
release-controller RBAC manifests so the generated files grant the intended Jobs
permissions.

In `@clusters/app.ci/release-controller/deploy-origin-arm64-controller.yaml`:
- Around line 61-206: Update add_okd_deployments in origin_resources.py to add
pod-level runAsNonRoot: true, container securityContext settings, and CPU and
memory limits for every generated container, then regenerate the manifests.
Apply the changes to deploy-origin-arm64-controller.yaml lines 61-206 for
git-sync-init, git-sync, and controller, and lines 211-307 for controller; both
sites require the same updates.

In `@hack/generators/release-controllers/config/__init__.py`:
- Around line 136-151: Make release-controller resource names unique per
product: in hack/generators/release-controllers/config/__init__.py:136-151,
include product.deployment_prefix in jobs_namespace, secret_name_tls, and
secret_name_tls_api. In
hack/generators/release-controllers/content/art_namespaces_rbac.py:229-231,
apply the same product prefix to the prowjob Role name and matching roleRef.
Regenerate clusters/app.ci/release-controller/admin-origin-rbac.yaml:99-158 from
the updated generator so the resulting resources no longer overlap.

---

Outside diff comments:
In `@clusters/app.ci/release-controller/deploy-origin-controller.yaml`:
- Around line 14-23: Remove the legacy Route/release-controller as part of the
cutover before applying Route/release-controller-okd, or configure the
deployment applier to prune removed objects. Ensure the old Route no longer
claims the shared host and does not continue targeting release-controller-api.

In `@hack/generators/release-controllers/content/art_namespaces_rbac.py`:
- Around line 229-231: Update the prowjob Role name in the relevant generator
block to include the product prefix, matching the sibling naming patterns near
lines 211 and 249, while preserving the existing suffix and namespace. Update
the corresponding roleRef target near line 333 to reference the exact same
product-qualified Role name.

---

Nitpick comments:
In `@hack/generators/release-controllers/content/development_rbac.py`:
- Around line 139-142: Replace the ci_monitoring_generated condition in the
release-controller generation flow with a dedicated one-off document for the ci
monitoring Role and binding. Follow the generate_app_ci_content pattern for
emitting cluster-wide resources, and remove the dependency on product.name ==
'okd' so the ci monitoring RBAC is generated explicitly even when OKD contexts
are renamed or absent.

In `@hack/generators/release-controllers/content/origin_resources.py`:
- Around line 4-84: Update add_legacy_origin_deployments_scaled_down to document
a removal condition with a TODO or tracking issue, and remove the four keel.sh
annotations from both legacy scaled-down Deployment metadata blocks while
preserving their drain-only replicas: 0 behavior.

In `@hack/generators/release-controllers/generate-release-controllers.py`:
- Around line 44-53: Optionally refactor the per-product deployment dispatch in
the generator loop to use generator callables stored on the Product instance
instead of comparing product.name. Add the appropriate deployment generator
selection to Product and invoke it from this flow, preserving the existing OCP
and OKD generation behavior and enabling additional products without new
branches.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 0e84363c-86fa-4908-96a7-d76e404f58df

📥 Commits

Reviewing files that changed from the base of the PR and between 88ce08f and 844cfad.

📒 Files selected for processing (16)
  • clusters/app.ci/crt/admin_generated_rbac.yaml
  • clusters/app.ci/release-controller/admin-origin-arm64-rbac.yaml
  • clusters/app.ci/release-controller/admin-origin-rbac.yaml
  • clusters/app.ci/release-controller/admin_deploy-origin-arm64-controller.yaml
  • clusters/app.ci/release-controller/admin_deploy-origin-controller.yaml
  • clusters/app.ci/release-controller/deploy-origin-arm64-controller.yaml
  • clusters/app.ci/release-controller/deploy-origin-controller.yaml
  • clusters/app.ci/trt/admin_generated_rbac.yaml
  • hack/generators/release-controllers/config/__init__.py
  • hack/generators/release-controllers/content/__init__.py
  • hack/generators/release-controllers/content/art_namespaces_rbac.py
  • hack/generators/release-controllers/content/development_rbac.py
  • hack/generators/release-controllers/content/origin_resources.py
  • hack/generators/release-controllers/content/rbac_resources.py
  • hack/generators/release-controllers/content/trt_rbac.py
  • hack/generators/release-controllers/generate-release-controllers.py

Comment thread clusters/app.ci/release-controller/admin-origin-arm64-rbac.yaml
Comment thread hack/generators/release-controllers/config/__init__.py
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
@bradmwilliams

Copy link
Copy Markdown
Contributor Author

/label tide/merge-method-squash

@openshift-ci openshift-ci Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 7, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@bradmwilliams: no rehearsable tests are affected by this change

Note: If this PR includes changes to step registry files (ci-operator/step-registry/) and you expected jobs to be found, try rebasing your PR onto the base branch. This helps pj-rehearse accurately detect changes when the base branch has moved forward.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@bradmwilliams

Copy link
Copy Markdown
Contributor Author

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 7, 2026
@jupierce

jupierce commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 7, 2026
@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bradmwilliams, jupierce

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-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 7, 2026
@bradmwilliams

Copy link
Copy Markdown
Contributor Author

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 7, 2026
@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@bradmwilliams: all tests passed!

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit f031e0a into openshift:main Aug 7, 2026
10 checks passed
@bradmwilliams
bradmwilliams deleted the origin-arm64-support branch August 7, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants