Skip to content

Conversation

@bryan-cox
Copy link
Member

@bryan-cox bryan-cox commented Dec 17, 2025

What this PR does / why we need it:

Adds Azure platform support to the product CLI (hcp) for self-managed Azure customers. This enables customers to create and manage Azure HostedClusters and NodePools using the productized CLI.

New commands added:

  • hcp create cluster azure - Creates a HostedCluster on Azure
  • hcp destroy cluster azure - Destroys a HostedCluster and its Azure infrastructure
  • hcp create nodepool azure - Creates an Azure NodePool
  • hcp destroy nodepool - Destroys a NodePool (platform-agnostic)

Key design decisions:

  • Added BindProductFlags functions to expose only self-managed Azure flags, excluding ARO HCP-specific flags like --managed-identities-file and --data-plane-identities-file
  • NodePool destroy is platform-agnostic since no cloud infrastructure cleanup is required
  • Follows the established AWS product CLI pattern with thin wrappers

Which issue(s) this PR fixes:

Fixes CNTRLPLANE-1988

Special notes for your reviewer:

The BindProductFlags pattern differs slightly from AWS which uses BindOptions directly. This is intentional because Azure has distinct flag sets for self-managed (workload identities) vs managed/ARO HCP (managed identities), and the product CLI targets only self-managed customers.

I tested the commands out. Everything looked good to me - https://issues.redhat.com/browse/CNTRLPLANE-1988?focusedId=28746778&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-28746778.

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 17, 2025
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 17, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 17, 2025

@bryan-cox: This pull request references CNTRLPLANE-1988 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Adds Azure platform support to the product CLI (hcp) for self-managed Azure customers. This enables customers to create and manage Azure HostedClusters and NodePools using the productized CLI.

New commands added:

  • hcp create cluster azure - Creates a HostedCluster on Azure
  • hcp destroy cluster azure - Destroys a HostedCluster and its Azure infrastructure
  • hcp create nodepool azure - Creates an Azure NodePool
  • hcp destroy nodepool - Destroys a NodePool (platform-agnostic)

Key design decisions:

  • Added BindProductFlags functions to expose only self-managed Azure flags, excluding ARO HCP-specific flags like --managed-identities-file and --data-plane-identities-file
  • NodePool destroy is platform-agnostic since no cloud infrastructure cleanup is required
  • Follows the established AWS product CLI pattern with thin wrappers

Which issue(s) this PR fixes:

Fixes CNTRLPLANE-1988

Special notes for your reviewer:

The BindProductFlags pattern differs slightly from AWS which uses BindOptions directly. This is intentional because Azure has distinct flag sets for self-managed (workload identities) vs managed/ARO HCP (managed identities), and the product CLI targets only self-managed customers.

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 17, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Excluded labels (none allowed) (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 17, 2025

@bryan-cox: This pull request references CNTRLPLANE-1988 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Adds Azure platform support to the product CLI (hcp) for self-managed Azure customers. This enables customers to create and manage Azure HostedClusters and NodePools using the productized CLI.

New commands added:

  • hcp create cluster azure - Creates a HostedCluster on Azure
  • hcp destroy cluster azure - Destroys a HostedCluster and its Azure infrastructure
  • hcp create nodepool azure - Creates an Azure NodePool
  • hcp destroy nodepool - Destroys a NodePool (platform-agnostic)

Key design decisions:

  • Added BindProductFlags functions to expose only self-managed Azure flags, excluding ARO HCP-specific flags like --managed-identities-file and --data-plane-identities-file
  • NodePool destroy is platform-agnostic since no cloud infrastructure cleanup is required
  • Follows the established AWS product CLI pattern with thin wrappers

Which issue(s) this PR fixes:

Fixes CNTRLPLANE-1988

Special notes for your reviewer:

The BindProductFlags pattern differs slightly from AWS which uses BindOptions directly. This is intentional because Azure has distinct flag sets for self-managed (workload identities) vs managed/ARO HCP (managed identities), and the product CLI targets only self-managed customers.

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added area/cli Indicates the PR includes changes for CLI area/platform/azure PR/issue for Azure (AzurePlatform) platform and removed do-not-merge/needs-area labels Dec 17, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox

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 Dec 17, 2025
@bryan-cox bryan-cox force-pushed the CNTRLPLANE-1988 branch 3 times, most recently from 07acf5e to 2a79203 Compare December 17, 2025 19:26
@bryan-cox
Copy link
Member Author

/test all

@bryan-cox
Copy link
Member Author

/test e2e-aks

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 18, 2025

@bryan-cox: 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.

Add BindProductFlags functions to the Azure cluster and nodepool create
commands. These functions expose only customer-facing flags for
self-managed Azure, excluding ARO HCP-specific flags like
--managed-identities-file and --data-plane-identities-file.

This provides the foundation for the product CLI to create Azure
clusters and nodepools with a focused, self-managed-only flag set.

Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
Add Azure platform support to the product CLI for self-managed Azure
customers. This includes:

- hcp create cluster azure: Creates a HostedCluster on Azure using
  workload identities for self-managed deployments
- hcp destroy cluster azure: Destroys a HostedCluster and its
  associated Azure infrastructure

The commands use BindProductFlags to expose only self-managed Azure
flags, following the established AWS product CLI pattern.

Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
Add Azure nodepool creation support to the product CLI:

- hcp create nodepool azure: Creates a NodePool for Azure platform

Uses BindProductFlags to expose VM configuration, disk settings,
image options, and diagnostics flags for self-managed Azure customers.

Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
Add a platform-agnostic nodepool destroy command to the product CLI:

- hcp destroy nodepool: Deletes a NodePool by name and namespace

NodePool deletion does not require platform-specific infrastructure
cleanup, so this command works for all platforms including Azure.

Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
Mark --azure-creds and --pull-secret as required flags for the Azure
cluster create command, consistent with other platform commands like
agent.

Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
@bryan-cox bryan-cox force-pushed the CNTRLPLANE-1988 branch 2 times, most recently from 8b641d7 to 16a9cb9 Compare January 5, 2026 14:24
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 5, 2026

@bryan-cox: This pull request references CNTRLPLANE-1988 which is a valid jira issue.

Details

In response to this:

What this PR does / why we need it:

Adds Azure platform support to the product CLI (hcp) for self-managed Azure customers. This enables customers to create and manage Azure HostedClusters and NodePools using the productized CLI.

New commands added:

  • hcp create cluster azure - Creates a HostedCluster on Azure
  • hcp destroy cluster azure - Destroys a HostedCluster and its Azure infrastructure
  • hcp create nodepool azure - Creates an Azure NodePool
  • hcp destroy nodepool - Destroys a NodePool (platform-agnostic)

Key design decisions:

  • Added BindProductFlags functions to expose only self-managed Azure flags, excluding ARO HCP-specific flags like --managed-identities-file and --data-plane-identities-file
  • NodePool destroy is platform-agnostic since no cloud infrastructure cleanup is required
  • Follows the established AWS product CLI pattern with thin wrappers

Which issue(s) this PR fixes:

Fixes CNTRLPLANE-1988

Special notes for your reviewer:

The BindProductFlags pattern differs slightly from AWS which uses BindOptions directly. This is intentional because Azure has distinct flag sets for self-managed (workload identities) vs managed/ARO HCP (managed identities), and the product CLI targets only self-managed customers.

I tested the commands out. Everything looked good to me - https://issues.redhat.com/browse/CNTRLPLANE-1988?focusedId=28746778&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-28746778.

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 openshift-eng/jira-lifecycle-plugin repository.

@bryan-cox
Copy link
Member Author

/auto-cc

@openshift-ci openshift-ci bot requested review from csrwng and enxebre January 5, 2026 17:00
Add cmd/util/azure_flag_descriptions.go with shared flag description
constants for the Azure product CLI. This ensures consistent,
customer-friendly descriptions across cluster and nodepool commands.

Key improvements:
- Descriptions include format examples (e.g. resource IDs, regions)
- Explain the purpose/why for each flag
- Consolidate duplicate descriptions (e.g. subnet flags)

Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
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. area/cli Indicates the PR includes changes for CLI area/platform/azure PR/issue for Azure (AzurePlatform) platform do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants