chore: backport latest VMs pool, HasInstance(), cloud-provider-azure defork, misc inconsistencies, for 1.28 #7217
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
These differences have effectively disabled cherry-pick automation in these areas. Upcoming changes (e.g., more VMs pool implementation, cloud-provider-azure integration rework, more fixes that need to be done in all versions) will be agonizing experiences, not to mention the past ones.
This PR will amend some of those differences, which is mostly VMs pool and HasInstance() implementations. They cannot be cherry-picked in normal means easily due to conflict with Azure defork operations, which have to resolve these conflicts at some point anyway. In addition, VMs pool and cloud-provider-azure are required to be cherry-picked.
Some of the inconsistencies are that older versions (1.27, 1.28) have went through linter. This PR might undo that and result in a temporary decrement in quality. However, the trade-off we get is consistency, and has been decided to be worth it. Then all branches will go through linter at the same time later on.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Original
HasInstance()
implementation PR: #6956Original cloud-provider-azure defork PR: #6947
The first half of the commits are basically copy-pasting code from 1.29 while trying to keep differences in features (e.g.,
vmTypeAKS
support that is deprecated from 1.29 and beyond). Given that 1.29 is already matured, it is reliable enough.The second half of the commits are cherry-pick of cloud-provider-azure defork, with some modifications to support this version (e.g., use cloud-provider-azure v1.28, replacement for nonexistent MaxDeploymentsCount and KubernetesRateLimit for VMAS and AKS pools respectively). Verified that this cloud-provider-azure version has support for AADClientCert.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: