-
Notifications
You must be signed in to change notification settings - Fork 431
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
use cluster name for managed cluster spec's name #2654
use cluster name for managed cluster spec's name #2654
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Hi @nawazkh. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
holding the PR for now to add an e2e test case to validate the change. |
/hold |
/ok-to-test |
/retest |
441affe
to
1f31307
Compare
- adds a new test case TestManagedControlPlaneScope_ManagedClusterName() to test ManagedClusterSpec.Name is independent of AzureManagedControlPlane.Name
/unhold |
Paired with @CecileRobertMichon to investigate when #2438 issue was not showing up on main branch. We found that #2438 was fixed as part of PR #2168. Thank you Cecile! |
What type of PR is this?
/kind bug
What this PR does / why we need it:
ManagedClusterSpec.name
will be set asManagedControlPlaneScope.Cluster.Name
instead ofManagedControlPlaneScope.ControlPlane.Name
.AzureManagedCluster
's Name is independent ofAzureManagedControlPlane
's Name value.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 #2438
Special notes for your reviewer:
Current Code flow
managedClusterSpec
is fetched/formed at this line.cluster-api-provider-azure/azure/services/managedclusters/managedclusters.go
Line 77 in 240f5dd
managedClusterSpec.Name
's value is set toManagedControlPlaneScope.ControlPlane.Name
which later gets passed down asmanagedClusterSpec.ResourceName()
in 2,3,4 below.cluster-api-provider-azure/azure/scope/managedcontrolplane.go
Line 389 in 240f5dd
cluster-api-provider-azure/azure/services/managedclusters/managedclusters.go
Line 97 in 240f5dd
cluster-api-provider-azure/azure/services/managedclusters/client.go
Line 66 in 240f5dd
cluster-api-provider-azure/azure/services/managedclusters/client.go
Line 70 in 240f5dd
Reasoning behind this change.
managedClusterSpec.Name
's value toManagedControlPlaneScope.ClusterName()
makesmanagedClusterSpec.Name
' independent ofManagedControlPlaneScope.ControlPlane.Name
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs:
Release note: