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(*): move getKubeClient to utils/kubernetes #6294

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

vadasambar
Copy link
Member

@vadasambar vadasambar commented Nov 16, 2023

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

This is a follow-up to the closed PR: #6180 (<- check this PR for more info on the current PR)

Which issue(s) this PR fixes:

No issue exists for this. Can create one if needed.

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/cluster-autoscaler labels Nov 16, 2023
@vadasambar
Copy link
Member Author

vadasambar commented Nov 16, 2023

This PR is currently WIP. I will assign @x13n here once the PR is ready for review.

@vadasambar vadasambar changed the title refactor(*): move getKubeClient to utils/kubernetes [DON'T REVIEW] refactor(*): move getKubeClient to utils/kubernetes Nov 16, 2023
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 17, 2023
@k8s-ci-robot k8s-ci-robot added the area/provider/cluster-api Issues or PRs related to Cluster API provider label Nov 20, 2023
@vadasambar vadasambar changed the title [DON'T REVIEW] refactor(*): move getKubeClient to utils/kubernetes refactor(*): move getKubeClient to utils/kubernetes Nov 21, 2023
@vadasambar vadasambar marked this pull request as ready for review November 21, 2023 17:29
@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 Nov 21, 2023
@vadasambar
Copy link
Member Author

/assign @x13n

@vadasambar
Copy link
Member Author

@x13n I think the PR is ready for review 🙏

@elmiko
Copy link
Contributor

elmiko commented Nov 22, 2023

thanks @vadasambar , i should have some time to review this on monday

Copy link
Member

@x13n x13n left a comment

Choose a reason for hiding this comment

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

Thanks for following up on this. Just a single minor comment, feel free to ignore. Putting on hold for you to decide whether to change anything (or wait for @elmiko to take a look as well).

/lgtm
/approve
/hold

cluster-autoscaler/utils/kubernetes/client.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Nov 23, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vadasambar, x13n

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 Nov 23, 2023
Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

lgtm, happy to approve for capi depending on what @vadasambar wants to do regarding the pointer reference.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2023
(cherry picked from commit b9f636d)

Signed-off-by: qianlei.qianl <qianlei.qianl@bytedance.com>

refactor: move logic to create client to utils/kubernetes pkg
- expose `CreateKubeClient` as public function
- make `GetKubeConfig` into a private `getKubeConfig` function (can be exposed as a public function in the future if needed)
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

fix: CI failing because cloudproviders were not updated to use new autoscaling option fields
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: define errors as constants
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: pass kube client options by value
Signed-off-by: vadasambar <surajrbanakar@gmail.com>
@vadasambar
Copy link
Member Author

/lgtm

@k8s-ci-robot
Copy link
Contributor

@vadasambar: you cannot LGTM your own PR.

In response to this:

/lgtm

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.

@vadasambar
Copy link
Member Author

@vadasambar: you cannot LGTM your own PR.

😆 thought so. @x13n , @elmiko I have made the change to pass by value. Need lgtm from you folks 🙏

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2023
@x13n
Copy link
Member

x13n commented Nov 29, 2023

Thanks! Un-holding as well so it actually gets merged.

/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 Nov 29, 2023
@k8s-ci-robot k8s-ci-robot merged commit 0a1d74f into kubernetes:master Nov 29, 2023
6 checks passed
@elmiko
Copy link
Contributor

elmiko commented Nov 29, 2023

oops, my bad, i thought there was an open question on the hold.

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/cluster-autoscaler 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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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