Skip to content

✨ Add componentRoutes support to ROSAControlPlane - #6183

Open
reedcort wants to merge 1 commit into
kubernetes-sigs:mainfrom
reedcort:ROSAENG-60617-component-routes
Open

✨ Add componentRoutes support to ROSAControlPlane#6183
reedcort wants to merge 1 commit into
kubernetes-sigs:mainfrom
reedcort:ROSAENG-60617-component-routes

Conversation

@reedcort

Copy link
Copy Markdown

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

Adds support for customizing console and downloads route hostnames and TLS certificates on ROSA HCP clusters managed via Cluster API.

This enables ROSA HCP customers to configure custom component routes (e.g. console.company.com) through the ROSAControlPlane CRD as a day-2 operation. The feature is already supported via the OCM API, ROSA CLI, and Terraform provider.

Which issue(s) this PR fixes:

ROSA HCP clusters managed via Cluster API cannot configure custom hostnames for console and downloads routes. This PR adds componentRoutes to the ROSAControlPlane spec to enable this.

Special notes for your reviewer:

  • ComponentRoutes is an optional map field on RosaControlPlaneSpec — no impact on existing clusters
  • Only console and downloads keys are valid. OAuth is not configurable on HCP

AI Usage:

Claude Code (Claude Opus) was used to assist with code generation and test writing. I reviewed every line before committing and validated the changes compile and pass unit tests locally.

Checklist:

  • squashed commits
  • includes documentation
  • includes AI generated content
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

Add componentRoutes support to ROSAControlPlane for customizing console and downloads route hostnames and TLS certificates on ROSA HCP clusters.

@kubernetes-prow kubernetes-prow Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Aug 12, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign dlipovetsky for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 12, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: reedcort / name: Cortney Reed (8366a6c)

@kubernetes-prow

Copy link
Copy Markdown
Contributor

Welcome @reedcort!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-aws 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-aws has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@kubernetes-prow kubernetes-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 12, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Hi @reedcort. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@kubernetes-prow kubernetes-prow Bot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Aug 12, 2026
@reedcort
reedcort marked this pull request as ready for review August 12, 2026 14:22
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 12, 2026
Comment thread controlplane/rosa/api/v1beta2/rosacontrolplane_types.go Outdated
Comment thread controlplane/rosa/webhooks/rosacontrolplane_webhook.go
Comment thread controlplane/rosa/api/v1beta2/rosacontrolplane_types.go Outdated
@reedcort
reedcort force-pushed the ROSAENG-60617-component-routes branch from 8366a6c to e213b72 Compare August 12, 2026 19:26
@reedcort

Copy link
Copy Markdown
Author

@serngawy The PR is ready for review. I have made the recommended changes.

Comment thread controlplane/rosa/api/v1beta2/rosacontrolplane_types.go Outdated
Comment thread controlplane/rosa/controllers/rosacontrolplane_controller.go Outdated
@serngawy

Copy link
Copy Markdown
Contributor

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 17, 2026
@reedcort
reedcort force-pushed the ROSAENG-60617-component-routes branch from e213b72 to d54fc81 Compare August 17, 2026 13:54
@reedcort

Copy link
Copy Markdown
Author

/retest-required

@serngawy serngawy 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.

thanks @reedcort , looks good to me.

@serngawy

Copy link
Copy Markdown
Contributor

/hold

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 18, 2026
@serngawy

Copy link
Copy Markdown
Contributor

@andclt would you review as well

Comment on lines +696 to +700
desiredRoutes := rosaScope.ControlPlane.Spec.ComponentRoutes
if len(desiredRoutes) == 0 {
return nil
}

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.

Instead of returning early here should we check similarly to what findExistingLogForwarders does for reconcileLogForwarders if there's an existing ingress with component routes set and clear them?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yeah customers should be able to pass in empty strings to clear existing routes.

keys := []rosacontrolplanev1.ComponentRouteKey{rosacontrolplanev1.ComponentRouteConsole, rosacontrolplanev1.ComponentRouteDownloads}
routes := make(map[string]*cmv1.ComponentRouteBuilder, len(keys))
for _, key := range keys {
routes[string(key)] = cmv1.NewComponentRoute().Hostname("").TlsSecretRef("")

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.

just out of curiosity does the OCM API accepts empty strings for Hostname and TlsSecretRef?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes it does

@reedcort
reedcort force-pushed the ROSAENG-60617-component-routes branch from d54fc81 to 2833071 Compare August 18, 2026 19:29
@kubernetes-prow kubernetes-prow Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 18, 2026
Add support for customizing console and downloads route hostnames
and TLS certificates on ROSA HCP clusters via the ROSAControlPlane CRD.

Signed-off-by: Cortney Reed <creed@redhat.com>
@reedcort
reedcort force-pushed the ROSAENG-60617-component-routes branch from 2833071 to d6599c3 Compare August 18, 2026 19:41
@serngawy

Copy link
Copy Markdown
Contributor

/test pull-cluster-api-provider-aws-apidiff-main

@kubernetes-prow

Copy link
Copy Markdown
Contributor

@reedcort: 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
pull-cluster-api-provider-aws-apidiff-main d6599c3 link false /test pull-cluster-api-provider-aws-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@tinaafitz

Copy link
Copy Markdown
Contributor

Test Results ✅

Tested componentRoutes end-to-end on a ROSA HCP cluster (OCP 4.22.8) using this image on a Minikube hub with CAPI v1.13.4.

All cases passed:

  • Set console route → OCM updated correctly
  • Set console + downloads together → both confirmed via OCM ingresses API
  • Remove routes → OCM reverted to default hostname
  • Invalid name value → webhook rejected as expected
  • Idempotency → componentRoutesEqual() skips OCM call when unchanged

@serngawy

Copy link
Copy Markdown
Contributor

@nrb would you review/lgtm this PR, I believe the apidiff fail because of the ocmClient interface changes not API changes.Can we override the failed job ?

@serngawy

Copy link
Copy Markdown
Contributor

/unhold

@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. needs-priority ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants