kubernetes-sigs / cluster-api-provider-azure

Cluster API implementation for Microsoft Azure
https://capz.sigs.k8s.io/
Apache License 2.0
287 stars 414 forks source link

🌱 Decouple MachinePool reconciler from Kubeadm #4931

Closed Danil-Grigorev closed 3 days ago

Danil-Grigorev commented 1 week ago

What type of PR is this?

What this PR does / why we need it:

This change removes static dependency on kubeadm to establish watches for MachinePool reconciler, allowing to specify a different <Bootstrap>Config GVK on user demand.

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: #4854

Special notes for your reviewer:

TODOs:

Release note:

- Decoupled kubeadm dependency from MachinePool reconciler by supplying alternative GVK for reconciler.
- Provided CLI flag: `--bootstrap-config-gvk` allowing to optionally supply alternative to Kubeadm bootstrap config group in the form of `<Kind>.<version>.<group>`. Example: `KubeadmConfig.v1beta1.bootstrap.cluster.x-k8s.io`
codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 61.90476% with 8 lines in your changes missing coverage. Please review.

Project coverage is 62.21%. Comparing base (a52056d) to head (c1472a8). Report is 19 commits behind head on main.

Files Patch % Lines
exp/controllers/helpers.go 14.28% 6 Missing :warning:
exp/controllers/azuremachinepool_controller.go 85.71% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4931 +/- ## ========================================== + Coverage 62.19% 62.21% +0.02% ========================================== Files 201 201 Lines 16878 16879 +1 ========================================== + Hits 10497 10502 +5 + Misses 5591 5586 -5 - Partials 790 791 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Danil-Grigorev commented 1 week ago

/retest codecov

k8s-ci-robot commented 1 week ago

@Danil-Grigorev: The /retest command does not accept any targets. The following commands are available to trigger required jobs:

The following commands are available to trigger optional jobs:

Use /test all to run the following jobs that were automatically triggered:

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/4931#issuecomment-2182555101): >/retest codecov 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.
k8s-ci-robot commented 1 week ago

@Danil-Grigorev: The specified target(s) for /test were not found. The following commands are available to trigger required jobs:

The following commands are available to trigger optional jobs:

Use /test all to run the following jobs that were automatically triggered:

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/4931#issuecomment-2182692592): >/test codecov 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.
Danil-Grigorev commented 1 week ago

/retest

Danil-Grigorev commented 1 week ago

/retest

k8s-ci-robot commented 4 days ago

LGTM label has been added.

Git tree hash: 54dff72ba9ac1feced41848a23c424779d2b9be6

nojnhuh commented 3 days ago

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

k8s-ci-robot commented 3 days ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nojnhuh

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/kubernetes-sigs/cluster-api-provider-azure/blob/main/OWNERS)~~ [nojnhuh] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
nojnhuh commented 3 days ago

tests are green! /hold cancel

nojnhuh commented 3 days ago

CI should be healthier now. /retest

nojnhuh commented 3 days ago

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