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

Add patches fields for AKS resources #4527

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Jan 31, 2024

What type of PR is this?
/kind feature

What this PR does / why we need it: This implements #4304 for AzureManagedControlPlane by adding spec.asoManagedClusterPatches and for AzureManagedMachinePool by adding spec.asoManagedClustersAgentPoolPatches to allow users to specify arbitrary patches to apply to those ASO resources.

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

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

EXPERIMENTAL: Added fields to AzureManagedControlPlane and AzureManagedMachinePool to supply arbitrary JSON merge patches to underlying ASO resources

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 31, 2024
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 19 lines in your changes are missing coverage. Please review.

Comparison is base (37d5c1a) 62.44% compared to head (8ee2f85) 62.49%.
Report is 48 commits behind head on main.

Files Patch % Lines
azure/services/aso/aso.go 66.66% 6 Missing and 6 partials ⚠️
azure/services/managedclusters/spec.go 28.57% 4 Missing and 1 partial ⚠️
azure/services/agentpools/spec.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4527      +/-   ##
==========================================
+ Coverage   62.44%   62.49%   +0.04%     
==========================================
  Files         192      192              
  Lines       15379    15453      +74     
==========================================
+ Hits         9604     9657      +53     
- Misses       5115     5129      +14     
- Partials      660      667       +7     

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

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 1, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 1, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 2, 2024
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Feb 7, 2024
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Feb 7, 2024

This is ready for review but we still need to wait for consensus on the proposal first.
/hold for #4304

@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 Feb 7, 2024
@nojnhuh nojnhuh changed the title [WIP] Add patches fields for AKS resources Add patches fields for AKS resources Feb 7, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 7, 2024
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Feb 7, 2024

/retest

Copy link
Contributor

@willie-yao willie-yao left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few minor non-blocking comments from my end.

test/e2e/aks_patches.go Outdated Show resolved Hide resolved
azure/services/aso/aso.go Show resolved Hide resolved
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Feb 7, 2024

/hold also for squash in addition to the proposal

@nojnhuh
Copy link
Contributor Author

nojnhuh commented Feb 8, 2024

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

@dtzar dtzar added this to the v1.14 milestone Feb 8, 2024
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 8, 2024
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Feb 8, 2024

/retest

@Jont828
Copy link
Contributor

Jont828 commented Feb 9, 2024

Looks like all tests are green! Feel free to remove the hold whenever you're ready to merge

/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 Feb 9, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: fcd3eabcccacc0f318d5c859c989d9e025351c1c

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 9, 2024
@Jont828
Copy link
Contributor

Jont828 commented Feb 9, 2024

Actually, please squash your commits first, LGTM otherwise.

/approve cancel

@k8s-ci-robot k8s-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 9, 2024
This was referenced Feb 12, 2024
@dtzar
Copy link
Contributor

dtzar commented Feb 20, 2024

Not blocking, but a nice to have would be some kind of addition in the docs of how to patch (e.g. use asoctl to export/compare). If not in this PR, then would be good to add a new docs issue accordingly.

@nojnhuh
Copy link
Contributor Author

nojnhuh commented Feb 20, 2024

I'll plan to document this as part of #4568.

@nawazkh
Copy link
Member

nawazkh commented Feb 20, 2024

/lgtm++

Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

// ASOManagedClusterPatches defines JSON merge patches to be applied to the generated ASO ManagedCluster resource.
// WARNING: This is meant to be used sparingly to enable features for development and testing that are not
// otherwise represented in the CAPZ API. Misconfiguration that conflicts with CAPZ's normal mode of
// operation is possible.
Copy link
Contributor

Choose a reason for hiding this comment

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

This warning is well-worded. 👍🏻

Copy link
Contributor

Choose a reason for hiding this comment

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

PR still needs squash.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mboersma

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 Feb 21, 2024
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Feb 21, 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 Feb 21, 2024
@k8s-ci-robot k8s-ci-robot merged commit 99c8219 into kubernetes-sigs:main Feb 22, 2024
20 checks passed
@nojnhuh nojnhuh deleted the aso-patch branch April 3, 2024 00:25
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Automate AKS features available in ASO
8 participants