Skip to content
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

ASOAPI: aggregate agentPoolProfiles for ManagedCluster create #4794

Merged
merged 1 commit into from
May 2, 2024

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented May 1, 2024

What type of PR is this?
/kind bug

What this PR does / why we need it:

This PR leverages the mutator framework added in #4793 to aggregate the spec.agentPoolProfiles to be created alongside an ASO ManagedCluster to fulfill AKS's requirement that ManagedClusters must be created with at least one node pool. This is modeled after how CAPZ already handles this for AzureManagedControlPlanes.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #4713

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 1, 2024
Copy link

codecov bot commented May 1, 2024

Codecov Report

Attention: Patch coverage is 70.13889% with 43 lines in your changes are missing coverage. Please review.

Project coverage is 62.66%. Comparing base (abba169) to head (6af0559).
Report is 2 commits behind head on main.

Files Patch % Lines
exp/mutators/azureasomanagedcontrolplane.go 76.92% 15 Missing and 15 partials ⚠️
...trollers/azureasomanagedcontrolplane_controller.go 7.14% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4794      +/-   ##
==========================================
+ Coverage   62.62%   62.66%   +0.04%     
==========================================
  Files         198      198              
  Lines       16285    16420     +135     
==========================================
+ Hits        10198    10290      +92     
- Misses       5341     5369      +28     
- Partials      746      761      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nojnhuh
Copy link
Contributor Author

nojnhuh commented May 1, 2024

/hold for squash

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 1, 2024
return err
}

profile := asocontainerservicev1hub.ManagedClusterAgentPoolProfile{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much ongoing maintenance will this manual conversion take?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All we should need to do is add any new AKS API versions for each new ASO release to the scheme we create in main. If the hub type happens to change between ASO releases, we should get a compiler error here. When that happens, we would need to update these fields to include any new fields in the new hub version.

If Azure/azure-service-operator#2791 gets resolved, then none of that should be necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compiler error is the news I came to hear

@jackfrancis jackfrancis added this to the v1.15 milestone May 2, 2024
@jackfrancis
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 2, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 43b590ca3623a0d5c9b74815dd83253b64b19d1d

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis

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:

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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 2, 2024
@nojnhuh nojnhuh force-pushed the v2-agentpoolprofiles branch from 6fa5fcc to 6af0559 Compare May 2, 2024 18:12
@nojnhuh
Copy link
Contributor Author

nojnhuh commented May 2, 2024

squashed!
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 2, 2024
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented May 2, 2024

@nojnhuh: The following tests 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-apidiff 6af0559 link false /test pull-cluster-api-provider-azure-apidiff
pull-cluster-api-provider-azure-windows-with-ci-artifacts 6af0559 link false /test pull-cluster-api-provider-azure-windows-with-ci-artifacts

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 k8s-ci-robot merged commit daf5081 into kubernetes-sigs:main May 2, 2024
22 of 27 checks passed
@nojnhuh nojnhuh deleted the v2-agentpoolprofiles branch May 2, 2024 20:00
@mboersma mboersma mentioned this pull request Jul 11, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants