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

refactor: upstream most of Azure managed CAS changes in cloudprovider/azure #7003

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

comtalyst
Copy link

@comtalyst comtalyst commented Jul 4, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Refactor as a part of fork-upstream (managed-selfhosted) realignment. Should not have any breaking changes.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

All are in cloudprovider/azure except go.mod, go.sum, and vendor.
Overall:

  • Bump cloud-provider-azure library version
  • Trivial code improvements (e.g., using constants for reused string literals, method interfaces, etc.)
  • Support cloud provider AAD certificate authentication
  • Add a new GPU label, with the old one being deprecated/switch out soon
  • Temporarily adding new configuration options; primarily for managed offering, not being supported for self-hosted yet so don't rely on them until documented: EnableDetailedCSEMessage, GetVmssSizeRefreshPeriod

Does this PR introduce a user-facing change?

Azure: support cloud provider AAD certificate authentication

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 4, 2024
@k8s-ci-robot k8s-ci-robot requested a review from nilo19 July 4, 2024 02:03
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: comtalyst
Once this PR has been reviewed and has the lgtm label, please assign bigdarkclown for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 area/provider/azure Issues or PRs related to azure provider needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 4, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @comtalyst. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 4, 2024

if vmssInfo.ExtendedLocation != nil {
Copy link
Author

Choose a reason for hiding this comment

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

Not present on older versions due to #6447. But seemingly justified(?) due to fork code differences, see createOrUpdateInstances() for after-fork location.

This feature itself and the after-fork location is already in the fork from past versions, but #6447 upstream it in master.


if scaleSet.enableForceDelete && isOperationNotAllowed(rerr) {
Copy link
Author

Choose a reason for hiding this comment

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

Not present on older versions due to #6447. But seemingly justified(?) due to fork code differences, see createOrUpdateInstances() for after-fork location.

This feature itself and the after-fork location is already in the fork from past versions, but #6447 upstream it in master.

if rerr != nil {
klog.Errorf("virtualMachineScaleSetsClient.DeleteInstancesAsync for instances %v failed: %v", requiredIds.InstanceIds, rerr)
Copy link
Author

Choose a reason for hiding this comment

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

Not present on older versions due to fork 1.30 have this white space for unknown reason... No commit differences. Probably a merge mistake.

@@ -767,6 +837,42 @@ func (scaleSet *ScaleSet) getOrchestrationMode() (compute.OrchestrationMode, err
return vmss.OrchestrationMode, nil
}

func isOperationNotAllowed(rerr *retry.Error) bool {
Copy link
Author

Choose a reason for hiding this comment

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

Not present on older versions due to #6447. But seemingly justified(?) due to fork code differences, see azure_force_delete_scale_set.go for after-fork location.

This feature itself and the after-fork location is already in the fork from past versions, but #6447 upstream it in master.

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler area/provider/azure Issues or PRs related to azure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants