Skip to content

backend: Add controllers for dispatching credential requests#4891

Open
mbarnes wants to merge 3 commits intomainfrom
1p/dispatch-credential-operations
Open

backend: Add controllers for dispatching credential requests#4891
mbarnes wants to merge 3 commits intomainfrom
1p/dispatch-credential-operations

Conversation

@mbarnes
Copy link
Copy Markdown
Collaborator

@mbarnes mbarnes commented Apr 15, 2026

ARO-24384 - Move Cluster Service CRUD calls to ARO-HCP backend

What

This is part one of a two-phase rollout to move the Cluster Service calls for requesting and revoking break-glass credentials to the RP backend.

This pull request introduces two new backend controllers – DispatchRequestCredential and DispatchRevokeCredentials – but they are inert for now because the RP frontend is still making the Cluster Service calls.

Once this pull request reaches production, a follow-up pull request will remove these two Cluster Service calls from the RP frontend, at which point the new backend controllers will take over.

Why

This is part of a plan to move all Cluster Service calls to the RP backend, but I'm starting with break-glass credentials because I believe it will have the largest impact in meeting the Control Plane Latency KPI.

Testing

Relevant unit tests have been updated and I have performed manual testing in a personal dev environment (with frontend calls disabled) to verify the new backend controllers. The new controllers probably warrant new integration tests for the backend, but in the interest of expediency and because the new controllers are currently inert, I'm going to defer the integration tests to the follow-up pull request.

This change should be fully transparent to E2E tests, so no changes are needed there.

Special notes for your reviewer

Holding until @deads2k has a chance to look at this. Not sure where in the source code he'd prefer these controllers to live. I put them where I thought it made sense.

Matthew Barnes added 3 commits April 15, 2026 08:52
The operation helper functions have been duplicated the backend's
"operationcontrollers" package. The "database" package functions
are no longer used.
Backend will soon need to call this.

Putting this function in the database package is transitional.
I expect to move this function to the backend once porting of
Cluster Service calls is complete.

At the same time, change the function to also return a list of
operation IDs staged for cancellation in the transaction. This
allows for logging the operation IDs being cancelled, but also
potentially skipping the transaction if there are no operations
to cancel.
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 15, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mbarnes

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

@@ -0,0 +1,147 @@
// Copyright 2025 Microsoft Corporation
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

2026

@@ -0,0 +1,96 @@
// Copyright 2025 Microsoft Corporation
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

2026

@machi1990
Copy link
Copy Markdown
Collaborator

.. but they are inert for now because the RP frontend is still making the Cluster Service calls.

I am trying to think of a reason we'd prefer to do a 2 phased rollout: Is that if we do a one phased, during the rollout to a region, it could be that the frontend is rolled out but not the backend in which case we'll have issues?

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 16, 2026

@mbarnes: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/cspr 8f46f0b link true /test cspr

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants