openshift / hive

API driven OpenShift cluster provisioning and management
Apache License 2.0
249 stars 237 forks source link

Azure MachinePool: NetworkResourceGroupName, ComputSubnet, VirtualNetwork #2415

Closed 2uasimojo closed 2 months ago

2uasimojo commented 2 months ago

Add networking fields to the Azure MachinePool API:

MachinePool.Spec.Platform.Azure.NetworkResourceGroupName will end up in MachineSet.Spec.Template.Spec.ProviderSpec.Value.NetworkResourceGroupName... unless VirtualNetwork is unspecified, in which case the ResourceGroup is used. (This logic lives in the upstream installer code and is accurate at the time of this writing 😇)

MachinePool.Spec.Platform.Azure.ComputeSubnet will end up in MachineSet.Spec.Template.Spec.ProviderSpec.Value.Subnet.

MachinePool.Spec.Platform.Azure.VirtualNetwork will end up in MachineSet.Spec.Template.Spec.ProviderSpec.Value.Vnet.

The MachinePool API field names are taken from their install-config.yaml equivalents.

HIVE-2582

2uasimojo commented 2 months ago

/assign @dlom

2uasimojo commented 2 months ago

/hold for testing

dlom commented 2 months ago

/lgtm

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 45.90%. Comparing base (bf09298) to head (61ce64f). Report is 10 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/openshift/hive/pull/2415/graphs/tree.svg?width=650&height=150&src=pr&token=2md6QUue4c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift)](https://app.codecov.io/gh/openshift/hive/pull/2415?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift) ```diff @@ Coverage Diff @@ ## master #2415 +/- ## ========================================== - Coverage 46.28% 45.90% -0.38% ========================================== Files 279 279 Lines 32772 33100 +328 ========================================== + Hits 15167 15194 +27 - Misses 16332 16632 +300 - Partials 1273 1274 +1 ``` | [Files](https://app.codecov.io/gh/openshift/hive/pull/2415?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift) | Coverage Δ | | |---|---|---| | [pkg/controller/machinepool/azureactuator.go](https://app.codecov.io/gh/openshift/hive/pull/2415?src=pr&el=tree&filepath=pkg%2Fcontroller%2Fmachinepool%2Fazureactuator.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift#diff-cGtnL2NvbnRyb2xsZXIvbWFjaGluZXBvb2wvYXp1cmVhY3R1YXRvci5nbw==) | `68.64% <100.00%> (+0.81%)` | :arrow_up: | | [...m/openshift/hive/apis/hive/v1/machinepool\_types.go](https://app.codecov.io/gh/openshift/hive/pull/2415?src=pr&el=tree&filepath=vendor%2Fgithub.com%2Fopenshift%2Fhive%2Fapis%2Fhive%2Fv1%2Fmachinepool_types.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift#diff-dmVuZG9yL2dpdGh1Yi5jb20vb3BlbnNoaWZ0L2hpdmUvYXBpcy9oaXZlL3YxL21hY2hpbmVwb29sX3R5cGVzLmdv) | `0.00% <ø> (ø)` | | ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/openshift/hive/pull/2415/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift)
2uasimojo commented 2 months ago

Eh, I don't trust it.

/test e2e

2uasimojo commented 2 months ago

Oh, dangit, that was the wrong one. But okay.

2uasimojo commented 2 months ago

/hold cancel

QE checks out.

@dlom ready for re-stamping!

dlom commented 2 months ago

/lgtm

openshift-ci[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 2uasimojo, dlom

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/hive/blob/master/OWNERS)~~ [2uasimojo,dlom] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 2 months ago

@2uasimojo: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).