Skip to content

Add Aro-hcp proposal #5605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

serngawy
Copy link

@serngawy serngawy commented May 1, 2025

What type of PR is this?

/kind documentation

What this PR does / why we need it:

Proposal for ARO-HCP feature

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

TODOs:

  • squashed commits
  • [ X] includes documentation
  • adds unit tests
  • cherry-pick candidate

Release note:

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 1, 2025
@k8s-ci-robot k8s-ci-robot requested review from mboersma and nojnhuh May 1, 2025 15:54
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 1, 2025
Copy link

codecov bot commented May 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.19%. Comparing base (c3f0631) to head (d9bc85b).
Report is 54 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5605      +/-   ##
==========================================
- Coverage   53.28%   53.19%   -0.10%     
==========================================
  Files         272      272              
  Lines       29537    29582      +45     
==========================================
- Hits        15739    15735       -4     
- Misses      12983    13027      +44     
- Partials      815      820       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@serngawy serngawy force-pushed the aro-proposal branch 2 times, most recently from 22ad098 to 35b0abc Compare May 2, 2025 21:01
@serngawy
Copy link
Author

serngawy commented May 5, 2025

@marek-veber


// Resource group name where the Aro-hcp will be attached to it.
ResourceGroup string `json:"resourceGroup,omitempty"`

Choose a reason for hiding this comment

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

IMHO we will also need the:

  • tenant_id,
  • subscription_id,
  • managed_resource_group_name (not only resource_group_name)
    to create a cluster, isn't it?

Copy link
Author

Choose a reason for hiding this comment

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

yes, those info are provided at the azureclusteridentity

// PlatformProfile represents the Azure platform configuration.
type PlatformProfile struct {
// Azure subnet id
Subnet string `json:"subnet,omitempty"`

Choose a reason for hiding this comment

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

Why Subnet & SubnetRef ?
subnet id or cluster id or node pool id ? I'm not sure base on: https://github.com/Azure/ARO-HCP/blob/main/cluster-service/cluster-creation.md#creating-node-pools

Replicas & autorepare will be used from capi MachinePool?

Copy link
Author

Choose a reason for hiding this comment

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

subnetRef will be referring to VirtualNetworksSubnet CR by name.
yes, replicas defined at CAPI machinePool CR

Comment on lines 186 to 196
ControlPlaneOperators map[string]string `json:"controlPlaneOperators,omitempty"`


// DataPlaneOperators ref to Microsoft.ManagedIdentity/userAssignedIdentities
DataPlaneOperators map[string]string `json:"dataPlaneOperators,omitempty"`


// ServiceManagedIdentity ref to Microsoft.ManagedIdentity/userAssignedIdentities
ServiceManagedIdentity string `json:"serviceManagedIdentity,omitempty"`

Choose a reason for hiding this comment

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

What are the keys in those maps?
What about to replace maps with structures for it?

Copy link
Author

Choose a reason for hiding this comment

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

I updated the managed Identities to include all the required identities names

ServiceManagedIdentity string `json:"serviceManagedIdentity,omitempty"`
}

type ControlPlaneOperators struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we not planning to reuse the HyperShift API for this, rather than duplicating API efforts?

Copy link
Author

Choose a reason for hiding this comment

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

no, we will re-use the Hypershift API. The naming for CRD fields is a bit different but internally with API call will set the naming as here

KmsManagedIdentities string `json:"kmsManagedIdentities,omitempty"`
}

type DataPlaneOperators struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar question as above, re: reusing HyperShift API

ServiceManagedIdentity string `json:"serviceManagedIdentity,omitempty"`
}

type ControlPlaneOperators struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also list the exact role definitions each one of these will get?

Copy link
Author

Choose a reason for hiding this comment

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

not sure if I understand, The field desc mentioning the role definition "control-plane" and similar for every UAMI

Copy link
Contributor

Choose a reason for hiding this comment

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

Every control plane and data plane are assigned a specific Azure role definition(s) - CNTRLPLANE-171.

For example, the ingress managed identity is only assigned the "Azure Red Hat OpenShift Cluster Ingress Operator" role over the resource groups containing the VNET and the DNS Zone.

Copy link
Author

Choose a reason for hiding this comment

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

okay, that is fine we will use the same role naming and keys. Would you mention the ref for it from the Hypershift repo . I don't think the Jira url above is accessible for everyone.

Copy link
Contributor

Choose a reason for hiding this comment

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

The mapping of control plane to role definition to resource group does not reside from the HyperShift repo. I am not sure if it is available in some public fashion on the ARO side 🤔

Copy link
Author

Choose a reason for hiding this comment

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

I checked the hypershift repo, I don't think we need to set the Azure role definition, In CAPZ we will set the role key name similar to the example here ex; control-plane, cluster-api-azure, ingress, ..etc then hypershift will set the role definition. Hypershift has the role ref here

Copy link
Author

Choose a reason for hiding this comment

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

it is here in the ocm-cluster-service

Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW, we do not set the role definitions in HyperShift. That is assumed to be done prior to creating the HostedCluster.

The HyperShift link you mentioned is related to the HyperShift CLI, which does set the role definitions but that is only for development and testing use.

Copy link
Author

Choose a reason for hiding this comment

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

hmm, so we need to have this defined some where yes/no ?
Also this is more like implementation details for the UserAssignedIdentity CR that will be created we will need to set the right spec info

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be nice to be defined somewhere.

Maybe it goes with the UserAssignedIdentity CR; is that defined somewhere?

@willie-yao
Copy link
Contributor

/assign

ControlPlaneManagedIdentities string `json:"controlPlaneOperatorsManagedIdentities,omitempty"`

// ClusterApiAzureManagedIdentities "cluster-api-azure" Microsoft.ManagedIdentity/userAssignedIdentities
ClusterApiAzureManagedIdentities string `json:clusterApiAzureManagedIdentities",omitempty"`

Choose a reason for hiding this comment

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

sometimes is here badly formatted json option:
json:clusterApiAzureManagedIdentities",omitempty" -> json:"clusterApiAzureManagedIdentities,omitempty"

The " should be moved after json: . There is such a typo multiple times.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks fixed

Signed-off-by: serngawy <[email protected]>
@k8s-ci-robot
Copy link
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 ask for approval from willie-yao. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

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

Copy link

@marek-veber marek-veber left a comment

Choose a reason for hiding this comment

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

identityRef - need to be *corev1.ObjectReference in go
and in yaml:

identityRef:
   kind: AzureClusterIdentity
   name: aro-identity
   namespace: default


// IdentityRef is a reference to an identity to be used when reconciling the aro control plane.
// If no identity is specified, the default identity for this controller will be used.
IdentityRef *infrav1.AzureClusterIdentity `json:"identityRef,omitempty"`

Choose a reason for hiding this comment

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

Suggested change
IdentityRef *infrav1.AzureClusterIdentity `json:"identityRef,omitempty"`
IdentityRef *corev1.ObjectReference `json:"identityRef,omitempty"`

Comment on lines +319 to +320
identityRef:
name: aro-identity

Choose a reason for hiding this comment

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

Suggested change
identityRef:
name: aro-identity
identityRef:
kind: AzureClusterIdentity
name: aro-identity
namespace: default

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/documentation Categorizes issue or PR as related to documentation. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

5 participants