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

prefer CAPI replicas-managed-by annotation for AKS autoscaler #2996

Merged

Conversation

jackfrancis
Copy link
Contributor

@jackfrancis jackfrancis commented Jan 9, 2023

What type of PR is this?

What this PR does / why we need it:

This PR changes the annotation that we add to AKS node pools to the CAPI-defined "cluster.x-k8s.io/replicas-managed-by" annotation.

See:

This PR also deprecates the CAPZ-defined "cluster.x-k8s.io/replicas-managed-by-autoscaler" annotation. We include a fallback support for this during MachinePool reconciliation, to aid forward-compatibility for existing clusters using the previous annotation.

I've decided not to worry about cleaning up the legacy annotation: upon the first reconciliation of the AKS node pool, CAPZ will assign the new, CAPI annotation. This seems simpler than worry about checking for existence of the old annotation on each reconcile loop, and deleting it if it's affected. The additional fallback code that supports the legacy annotation is not a maintenance burden, IMO.

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

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

prefer CAPI replicas-managed-by annotation for AKS autoscaler

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 9, 2023
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 9, 2023
@jackfrancis
Copy link
Contributor Author

/assign @CecileRobertMichon

@jackfrancis
Copy link
Contributor Author

/retest

1 similar comment
@jackfrancis
Copy link
Contributor Author

/retest

@kubernetes-sigs kubernetes-sigs deleted a comment from k8s-ci-robot Jan 9, 2023
@jackfrancis jackfrancis added this to the v1.7 milestone Jan 9, 2023
azure/const.go Outdated Show resolved Hide resolved
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon 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

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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 Jan 10, 2023
@jackfrancis
Copy link
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit 0584c29 into kubernetes-sigs:main Jan 10, 2023
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. 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove azure.ReplicasManagedByAutoscalerAnnotation in favor of CAPI ReplicasManagedByExternalAutoscaler()
3 participants