cluster-api-provider-azure icon indicating copy to clipboard operation
cluster-api-provider-azure copied to clipboard

Add subnetName to AzureManagedMachinePool

Open LochanRn opened this issue 3 years ago • 10 comments

What type of PR is this? /kind feature

What this PR does / why we need it: It adds support to place a machinepool in a different subnet of users choice.

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 #1599

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • [ ] squashed commits
  • [ ] includes documentation
  • [ ] adds unit tests

Release note:

Add subnetName to AzureManagedMachinePool

LochanRn avatar Oct 02 '22 22:10 LochanRn

[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 alexeldeib for approval by writing /assign @alexeldeib in a comment. For more information see:The Kubernetes 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

k8s-ci-robot avatar Oct 02 '22 22:10 k8s-ci-robot

/test pull-cluster-api-provider-azure-e2e-optional

jackfrancis avatar Oct 03 '22 18:10 jackfrancis

This lgtm, thanks @LochanRn!

Can you update UT in azure/scope/managedmachinepool_test.go? You should be able to simply add to the getAzureMachinePool helper func like this:

$ git diff azure/scope/managedmachinepool_test.go
diff --git a/azure/scope/managedmachinepool_test.go b/azure/scope/managedmachinepool_test.go
index 8a9107870..fbb7b6701 100644
--- a/azure/scope/managedmachinepool_test.go
+++ b/azure/scope/managedmachinepool_test.go
@@ -541,9 +541,10 @@ func getAzureMachinePool(name string, mode infrav1exp.NodePoolMode) *infrav1exp.
                        },
                },
                Spec: infrav1exp.AzureManagedMachinePoolSpec{
-                       Mode: string(mode),
-                       SKU:  "Standard_D2s_v3",
-                       Name: to.StringPtr(name),
+                       Mode:       string(mode),
+                       SKU:        "Standard_D2s_v3",
+                       Name:       to.StringPtr(name),
+                       SubnetName: "my-subnet",
                },
        }
 }

And then fix UT accordingly :).

jackfrancis avatar Oct 03 '22 19:10 jackfrancis

/retitle Add subnetName to AzureManagedMachinePool

jackfrancis avatar Oct 03 '22 19:10 jackfrancis

/release-note-edit release-note Add subnetName to AzureManagedMachinePool

jackfrancis avatar Oct 03 '22 19:10 jackfrancis

Because this is adding a new property I'm going to remove the kind/bug classification so we don't cherry-pick this into previous releases.

cc @CecileRobertMichon

jackfrancis avatar Oct 04 '22 17:10 jackfrancis

Because this is adding a new property I'm going to remove the kind/bug classification so we don't cherry-pick this into previous releases.

cc @CecileRobertMichon

Whoops, nevermind, it's not classified as a bug! Nothing to see here...

jackfrancis avatar Oct 04 '22 17:10 jackfrancis

@LochanRn: 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-azure-e2e-optional 31ef4cf385b5de58899d369b6dfe69f7b38b123c link false /test pull-cluster-api-provider-azure-e2e-optional

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.

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. I understand the commands that are listed here.

k8s-ci-robot avatar Oct 04 '22 19:10 k8s-ci-robot

/release-note-edit release-note Add subnetName to AzureManagedMachinePool

TIL you can do this via comment :o

CecileRobertMichon avatar Oct 04 '22 21:10 CecileRobertMichon

@LochanRn: PR needs rebase.

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.

k8s-ci-robot avatar Oct 11 '22 08:10 k8s-ci-robot

/assign @LochanRn

LochanRn avatar Oct 22 '22 18:10 LochanRn

/assign

jackfrancis avatar Nov 03 '22 16:11 jackfrancis

@LochanRn do you plan to address review comments in the next few days? This is included in next week's v1.6 milestone, I'll remove it and push to the next milestone if we don't plan on moving this forward in the near future.

Thanks so much!

jackfrancis avatar Nov 03 '22 21:11 jackfrancis

@jackfrancis yes will address it within this week sorry for the delay

LochanRn avatar Nov 03 '22 21:11 LochanRn

@LochanRn do we expect this will be nearing completion in time for the v1.7 milestone (ETA: early Jan)?

Thanks!

jackfrancis avatar Dec 01 '22 18:12 jackfrancis

@LochanRn I will close this to keep our PR queue small so it's easier for reviewers but please feel free to reopen as soon it's ready for review again

/close

CecileRobertMichon avatar Jan 12 '23 17:01 CecileRobertMichon

@CecileRobertMichon: Closed this PR.

In response to this:

@LochanRn I will close this to keep our PR queue small so it's easier for reviewers but please feel free to reopen as soon it's ready for review again

/close

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.

k8s-ci-robot avatar Jan 12 '23 17:01 k8s-ci-robot