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

[CA-1.19] CAPI backports for autoscaling workload clusters #3550

Conversation

benmoss
Copy link
Member

@benmoss benmoss commented Sep 28, 2020

Backports the recent work @detiber did to enable running the autoscaler against a different cluster than the one it is running in.

cc @elmiko

[cluster-autoscaler][clusterapi] Remove internal types in favor of unstructured
[cluster-autoscaler][clusterapi] Add support for node autodiscovery to clusterapi provider
[cluster-autoscaler] Support using --cloud-config for clusterapi provider
Update group identifier to use for Cluster API annotations
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 28, 2020
@benmoss benmoss changed the title CAPI backports for 1.19 [CA-1.19] CAPI backports for autoscaling workload clusters Sep 28, 2020
Copy link
Member

@detiber detiber left a comment

Choose a reason for hiding this comment

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

vendored kubernetes commit hash for main: 3eb90c1
vendored kubernetes commit hash for cluster-autoscaler-release-1.19: 23b66ea

The new additions to vendor will likely need to be modified to match the commit hash for the branch you are targeting.

In the past I've taken the following approach:

  • find the temporary directory used for the branch you are backporting to in cluster-autoscaler/go.mod and create it locally
  • find the correct commit hash, you can generally find this by looking at the commit history for the vendor directory, it should see commit messages similar to 'Updating vendor against [email protected]:kubernetes/kubernetes.git:master (commit hash)'
  • merge/cherry-pick the changes
  • checkout cluster-autoscaler/vendor from the current upstream commit
  • run cluster-autoscaler/hack/udpate-vendor.sh -d -r -r [email protected]:kubernetes/kubernetes.git

@benmoss
Copy link
Member Author

benmoss commented Sep 29, 2020

I think the three directory additions are correct:

$ git -C /tmp/ca-update-vendor.LoV7/kubernetes/ rev-parse HEAD
23b66eaabd3a535dbee6474638c5bf51e78fbcfa

$ diff -q vendor/k8s.io/client-go/discovery/cached/memory/ /tmp/ca-update-vendor.LoV7/kubernetes/vendor/k8s.io/client-go/discovery/cached/memory/
Only in /tmp/ca-update-vendor.LoV7/kubernetes/vendor/k8s.io/client-go/discovery/cached/memory/: memcache_test.go

$ diff -q vendor/k8s.io/client-go/restmapper /tmp/ca-update-vendor.LoV7/kubernetes/staging/src/k8s.io/client-go/restmapper
Only in /tmp/ca-update-vendor.LoV7/kubernetes/staging/src/k8s.io/client-go/restmapper: category_expansion_test.go
Only in /tmp/ca-update-vendor.LoV7/kubernetes/staging/src/k8s.io/client-go/restmapper: discovery_test.go
Only in /tmp/ca-update-vendor.LoV7/kubernetes/staging/src/k8s.io/client-go/restmapper: shortcut_test.go

$ diff -q vendor/k8s.io/client-go/scale/fake/ /tmp/ca-update-vendor.LoV7/kubernetes/staging/src/k8s.io/client-go/scale/fake/

@elmiko
Copy link
Contributor

elmiko commented Sep 30, 2020

/area provider/cluster-api

@k8s-ci-robot k8s-ci-robot added the area/provider/cluster-api Issues or PRs related to Cluster API provider label Sep 30, 2020
@detiber
Copy link
Member

detiber commented Sep 30, 2020

/lgtm

Thanks for tackling this @benmoss

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

@mwielgus mwielgus 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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mwielgus

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 Oct 1, 2020
@k8s-ci-robot k8s-ci-robot merged commit 1529a20 into kubernetes:cluster-autoscaler-release-1.19 Oct 1, 2020
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. area/provider/cluster-api Issues or PRs related to Cluster API provider 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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants