Skip to content

ACM-30521: Add Azure HCP cluster creation and control plane selection UI#6384

Open
fxiang1 wants to merge 2 commits into
stolostron:mainfrom
fxiang1:acm-30521-azure-hcp-creation-ui
Open

ACM-30521: Add Azure HCP cluster creation and control plane selection UI#6384
fxiang1 wants to merge 2 commits into
stolostron:mainfrom
fxiang1:acm-30521-azure-hcp-creation-ui

Conversation

@fxiang1

@fxiang1 fxiang1 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

ACM-30521: Azure HCP cluster creation and control plane selection UI

Summary

Adds Azure Hosted Control Plane (HCP) cluster creation UI, similar to the existing AWS HCP implementation. When users click Azure in the infrastructure provider catalog, they now see a control plane type selection page (Hosted vs Standalone) instead of going directly to the standalone wizard.

Acceptance Criteria

# Criterion Status
1 Users can select to create Azure HCP clusters from the cluster catalog (similar to AWS control plane selection at /multicloud/infrastructure/clusters/create/aws/control-plane) ✅ PASS
2 Users have a page with instructions to create an Azure HCP cluster (similar to AWS CLI page at /multicloud/infrastructure/clusters/create/aws/cli) ✅ PASS

Changes

File Action Description
NavigationPath.tsx Modified Added createAzureControlPlane and createAzureCLI paths
doc-util.tsx Modified Added HYPERSHIFT_DEPLOY_AZURE and HOSTED_ENABLE_FEATURE_AZURE placeholder doc links
CreateClusterCatalog.tsx Modified Routes Azure provider to control plane selection page
Clusters.tsx Modified Registered routes and imports for new Azure components
CreateAzureControlPlane.tsx New Azure control plane type selection page (Hosted vs Standalone cards)
CreateAzureControlPlane.test.tsx New 3 unit tests (hosted enabled/disabled, standalone click)
HypershiftAzureCLI.tsx New Azure HCP CLI instructions page with 7-step guide
HypershiftAzureCLI.test.tsx New 1 unit test (all steps render)
translation.json Modified Auto-updated i18n keys

Azure HCP CLI Steps

The CLI instructions page guides users through 7 steps:

  1. Prerequisites — Install hcp, oc, az, and ccoctl
  2. Prepare environment variables — Set cluster name, location, base domain, etc.
  3. Create Azure credentials file — Service principal credentials JSON
  4. Configure OIDC issuer — Create signing key pair and OIDC storage account
  5. Create workload identities — Azure workload identities for cluster components
  6. Create Azure infrastructure — Networking and DNS configuration
  7. Create the Hosted Control Plane — The hcp create cluster azure command

Test Results

Unit tests: 4 passed, 0 failed (new tests)
Regression: 26 passed, 0 failed (existing AWS/catalog tests)
Lint/Type check: npm run check:fix — clean
Playwright E2E: 3 passed (21.3s)

How to Test (Plugin Mode)

  1. Run npm run plugins
  2. Navigate to http://localhost:9000/multicloud/infrastructure/clusters/create
  3. Click the Azure card
  4. Verify the control plane selection page shows Hosted and Standalone cards
  5. Click Hosted (requires hypershift to be enabled) → verify 7-step CLI instructions page
  6. Click Standalone → verify it navigates to the existing Azure wizard

Out of Scope

  • Destroy instructions/modal (resolved by ACM-34514)
  • Full cluster creation wizard (explicitly out of scope per ticket)

Summary by CodeRabbit

  • New Features
    • Added an Azure control-plane selection page to the cluster creation flow, with Hosted and Standalone options.
    • Added Azure Hypershift setup guidance with step-by-step instructions and copyable command snippets.
    • Expanded help/doc links to cover Azure Hypershift deploy and hosted feature enablement.
  • Bug Fixes
    • Azure cluster creation now routes directly to the new Azure control-plane selection page.
    • Hosted Azure options now correctly enable/disable based on Hypershift feature availability.

Add Azure Hosted Control Plane (HCP) cluster creation UI, similar to
the existing AWS HCP implementation:

- Add Azure control plane type selection page (Hosted vs Standalone)
  at /multicloud/infrastructure/clusters/create/azure/control-plane
- Add Azure HCP CLI instructions page with 7-step guide at
  /multicloud/infrastructure/clusters/create/azure/cli
- Update cluster catalog to route Azure to control plane selection
- Add navigation paths, routes, placeholder doc links, and unit tests

Signed-off-by: fxiang1 <fxiang@redhat.com>
@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fxiang1

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

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bfd8e3cf-08e8-4700-af1b-c9ba89d48b7e

📥 Commits

Reviewing files that changed from the base of the PR and between ef07423 and 701364a.

⛔ Files ignored due to path filters (1)
  • frontend/public/locales/en/translation.json is excluded by !frontend/public/locales/**
📒 Files selected for processing (6)
  • frontend/src/lib/doc-util.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAzureCLI.test.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAzureCLI.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/common/DocPage.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.test.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • frontend/src/lib/doc-util.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAzureCLI.test.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.test.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAzureCLI.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.tsx

📝 Walkthrough

Walkthrough

Adds Azure control-plane route wiring, a hypershift-gated control-plane selection page, Azure Hypershift CLI instructions, documentation links, and focused behavior and accessibility tests.

Changes

Azure control-plane flow

Layer / File(s) Summary
Route and control-plane selection
frontend/src/NavigationPath.tsx, frontend/src/routes/Infrastructure/Clusters/Clusters.tsx, frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/...
Adds the Azure control-plane route and provider branch, registers the route, and renders hosted and standalone cards with Hypershift gating, documentation alerts, breadcrumbs, diagram controls, and tests.
Azure Hypershift CLI instructions
frontend/src/lib/doc-util.tsx, frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/...
Adds Azure documentation URLs, an overridable DocPage link, Azure command snippets and step-by-step Hypershift instructions, plus rendering and accessibility tests.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ProviderSelection
  participant CreateAzureControlPlane
  participant HypershiftStatus
  participant HypershiftAzureCLI
  participant DocPage
  ProviderSelection->>CreateAzureControlPlane: navigate to Azure control-plane selection
  CreateAzureControlPlane->>HypershiftStatus: load hosted control-plane status
  HypershiftStatus-->>CreateAzureControlPlane: return enabled or disabled state
  CreateAzureControlPlane->>HypershiftAzureCLI: navigate for hosted deployment
  HypershiftAzureCLI->>DocPage: provide Azure steps, commands, and documentation link
  DocPage-->>HypershiftAzureCLI: render instructional page
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the PR's main change: Azure HCP cluster creation and control-plane selection UI.
Description check ✅ Passed The description covers summary, acceptance criteria, changes, tests, and verification steps, but it omits template items like Ticket Link, Type of Change, and the checklist.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

frontend/src/lib/doc-util.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAzureCLI.test.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAzureCLI.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

  • 3 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.tsx (1)

67-73: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use a PatternFly link/button for the alert CTA.

This new alert renders a raw <a> even though the frontend TSX guidelines require PatternFly components instead of custom HTML. Wrapping the external doc CTA in a PatternFly link-style component keeps styling and behavior consistent with the rest of the catalog UI.

Suggested change
-import { Icon } from '`@patternfly/react-core`'
+import { Button, Icon } from '`@patternfly/react-core`'
...
-          return (
-            <a href={DOC_LINKS.HOSTED_ENABLE_FEATURE_AZURE} target="_blank" rel="noopener noreferrer">
-              {t('View documentation')} <ExternalLinkAltIcon />
-            </a>
-          )
+          return (
+            <Button
+              component="a"
+              variant="link"
+              isInline
+              href={DOC_LINKS.HOSTED_ENABLE_FEATURE_AZURE}
+              target="_blank"
+              rel="noopener noreferrer"
+              icon={<ExternalLinkAltIcon />}
+              iconPosition="right"
+            >
+              {t('View documentation')}
+            </Button>
+          )

As per coding guidelines, "Always use PatternFly components instead of custom HTML — import from @patternfly/react-core and @patternfly/react-icons".

🤖 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
`@frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.tsx`
around lines 67 - 73, The alert CTA in CreateAzureControlPlane currently uses a
raw anchor instead of a PatternFly component. Update the alertContent rendering
to use a PatternFly link-style component from `@patternfly/react-core` for the
external docs action, and keep the ExternalLinkAltIcon from
`@patternfly/react-icons`. Preserve the existing href, target, rel, and translated
label, and make the change in the CreateAzureControlPlane alertContent block so
it matches the catalog UI conventions.

Source: Coding guidelines

frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.test.tsx (1)

10-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Stop importing Recoil atoms directly in this test harness.

This setup reaches into ../../../../../atoms to seed managedClusterAddonsState and multiClusterEnginesState, which is the exact coupling the frontend test guidelines prohibit. Please mock the shared atoms through useSharedAtoms() instead so the test stays aligned with the production access path.

As per coding guidelines, "Mock Recoil atoms via useSharedAtoms(), not direct imports" and "Access atoms through useSharedAtoms() — never import atoms directly".

🤖 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
`@frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.test.tsx`
around lines 10 - 30, The test harness is importing Recoil atoms directly, which
violates the shared-atom access pattern. Update CreateAzureControlPlane.test.tsx
to seed managedClusterAddonsState and multiClusterEnginesState through
useSharedAtoms() instead of importing from ../../../../../atoms, keeping the
RecoilRoot setup in sync with the production access path while preserving the
existing mockManagedClusterAddOn and mockMultiClusterEngine fixtures.

Source: Coding guidelines

🤖 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
`@frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAzureCLI.test.tsx`:
- Around line 24-40: The HypershiftAzureCLI component test currently verifies
rendered content but is missing the required accessibility check. Update the
existing test in HypershiftAzureCLI.test.tsx to capture the rendered container
from render(<Component />) and add the standard jest-axe assertion, using
axe(container) and expect(...).toHaveNoViolations(), so this component test
matches the frontend accessibility testing convention.

In
`@frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAzureCLI.tsx`:
- Around line 228-234: The shared header in DocPage is still using the default
AWS “learn more” link, so the new Azure hypershift page shows the wrong docs.
Update HypershiftAzureCLI to pass an Azure-specific documentation link into
DocPage instead of relying on the default titleHelp behavior when breadcrumbs
are present. If DocPage does not already accept a doc-link override, add a prop
for it and use that in the header logic, keeping the change localized to DocPage
and its call site.

In
`@frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.test.tsx`:
- Around line 41-67: The new CreateAzureControlPlane component tests are missing
the required accessibility assertion, so update the test setup in
CreateAzureControlPlane.test.tsx to capture the rendered container and add a
jest-axe check with expect(await axe(container)).toHaveNoViolations() for the
Component render path. Make sure this is included alongside the existing Hosted
and standalone cases, using the same Component and render/test harness already
in the file.

---

Nitpick comments:
In
`@frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.test.tsx`:
- Around line 10-30: The test harness is importing Recoil atoms directly, which
violates the shared-atom access pattern. Update CreateAzureControlPlane.test.tsx
to seed managedClusterAddonsState and multiClusterEnginesState through
useSharedAtoms() instead of importing from ../../../../../atoms, keeping the
RecoilRoot setup in sync with the production access path while preserving the
existing mockManagedClusterAddOn and mockMultiClusterEngine fixtures.

In
`@frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.tsx`:
- Around line 67-73: The alert CTA in CreateAzureControlPlane currently uses a
raw anchor instead of a PatternFly component. Update the alertContent rendering
to use a PatternFly link-style component from `@patternfly/react-core` for the
external docs action, and keep the ExternalLinkAltIcon from
`@patternfly/react-icons`. Preserve the existing href, target, rel, and translated
label, and make the change in the CreateAzureControlPlane alertContent block so
it matches the catalog UI conventions.
🪄 Autofix (Beta)

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: af108205-00b3-4290-bc0f-61b5b3539135

📥 Commits

Reviewing files that changed from the base of the PR and between c776375 and ef07423.

⛔ Files ignored due to path filters (1)
  • frontend/public/locales/en/translation.json is excluded by !frontend/public/locales/**
📒 Files selected for processing (8)
  • frontend/src/NavigationPath.tsx
  • frontend/src/lib/doc-util.tsx
  • frontend/src/routes/Infrastructure/Clusters/Clusters.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAzureCLI.test.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAzureCLI.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.test.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAzureControlPlane.tsx
  • frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateClusterCatalog.tsx

Signed-off-by: fxiang1 <fxiang@redhat.com>
@sonarqubecloud

Copy link
Copy Markdown

@openshift-ci

openshift-ci Bot commented Jul 11, 2026

Copy link
Copy Markdown

PR needs rebase.

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.

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.

1 participant