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

update the node labels for existing AKS nodepools #2559

Merged

Conversation

zmalik
Copy link
Member

@zmalik zmalik commented Aug 12, 2022

What type of PR is this?
/kind bug

What this PR does / why we need it:

AKS allows updating the node labels for its nodepools, this PR fixes the normalized diff for agentpool of AKS to include the nodelabels.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

fix the bug that doesn't allow updating labels on existing nodepools in AKS

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 12, 2022
@jackfrancis
Copy link
Contributor

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

@jackfrancis
Copy link
Contributor

/retest

@@ -122,6 +123,7 @@ func (s *Service) Reconcile(ctx context.Context) error {
EnableAutoScaling: profile.EnableAutoScaling,
MinCount: profile.MinCount,
MaxCount: profile.MaxCount,
NodeLabels: profile.NodeLabels,
Copy link
Contributor

Choose a reason for hiding this comment

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

are there any existing unit tests that can be modified to test the behavior this PR fixes?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the agentpool reconcile test could be modified for this. I will update the PR

Copy link
Member Author

Choose a reason for hiding this comment

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

added a separate test for normalized diff, as I expect that test to grow when we keep adding more changes with few immutable and some mutable properties to the agentpool

@zmalik zmalik force-pushed the zm/fix-node-labels-reconcile branch from 2d21457 to e32d7ea Compare August 15, 2022 14:41
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 15, 2022
@CecileRobertMichon
Copy link
Contributor

Linter is unhappy https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-azure/2559/pull-cluster-api-provider-azure-test/1559188688703852544

You might need to rebase since #2529 merged and changed some import names

@zmalik zmalik force-pushed the zm/fix-node-labels-reconcile branch from e32d7ea to 9571531 Compare August 16, 2022 07:49
@zmalik
Copy link
Member Author

zmalik commented Aug 16, 2022

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

@CecileRobertMichon
Copy link
Contributor

/lgtm
/assign @jackfrancis

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

@jackfrancis jackfrancis left a comment

Choose a reason for hiding this comment

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

/lgtm

@jackfrancis
Copy link
Contributor

/approve

@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 Aug 17, 2022
@jackfrancis
Copy link
Contributor

/cherry-pick release-1.4

@k8s-infra-cherrypick-robot

@jackfrancis: once the present PR merges, I will cherry-pick it on top of release-1.4 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.4

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.

@k8s-infra-cherrypick-robot

@jackfrancis: new pull request created: #2569

In response to this:

/cherry-pick release-1.4

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.

@zmalik zmalik deleted the zm/fix-node-labels-reconcile branch August 18, 2022 08:58
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 Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants