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

Remove k8s.io/kubernetes dependency for yurtctl #681

Merged
merged 1 commit into from
Dec 15, 2021

Conversation

Rachel-Shao
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

Relying directly on k8s.io/kubernetes didn't seem like a good idea, which made our project difficult to upgrade and maintain. It's better that eliminate dependency on k8s.io/kubernetes.

Which issue(s) this PR fixes:

Fixes #550

Special notes for your reviewer:

I did not change the relevant code in yurt join/init/reset, because it involves a huge amount...For other parts, I unified the relevant functions in pkg/util/kubeadmapi/kubeadmapi.go

Does this PR introduce a user-facing change?

none

@openyurt-bot openyurt-bot added the kind/feature kind/feature label Dec 14, 2021
@openyurt-bot openyurt-bot added the size/L size/L: 100-499 label Dec 14, 2021
@openyurt-bot
Copy link
Collaborator

Welcome @Rachel-Shao! It looks like this is your first PR to openyurtio/openyurt 🎉

@rambohe-ch
Copy link
Member

@Rachel-Shao Very appreciate for your pull request, agree with you that eliminate dependency on k8s.io/kubernetes. please fix the comments and golang lint error.

go.mod Outdated Show resolved Hide resolved
@rambohe-ch
Copy link
Member

@Rachel-Shao please fix go vet error.

@Rachel-Shao Rachel-Shao force-pushed the removeK8Sdep branch 2 times, most recently from 2896841 to db0cc35 Compare December 15, 2021 07:08
@rambohe-ch
Copy link
Member

@Rachel-Shao we should do not import k8s.io/klog, and please use k8s.io/klog/v2 instead.

@Rachel-Shao
Copy link
Contributor Author

Rachel-Shao commented Dec 15, 2021

@Rachel-Shao we should do not import k8s.io/klog, and please use k8s.io/klog/v2 instead.

@rambohe-ch I actually use k8s.io/klog/v2 in the code, not k8s.io/klog, do I still need to delete the k8s.io/klog package in go.mod?

@rambohe-ch
Copy link
Member

@Rachel-Shao we should do not import k8s.io/klog, and please use k8s.io/klog/v2 instead.

@rambohe-ch I actually use k8s.io/klog/v2 in the code, not k8s.io/klog, do I still need to delete the k8s.io/klog package in go.mod?

@Rachel-Shao maybe you can execute go mod tidy locally, and i think the dummy import(like k8s.io/klog) will be removed automatically.

Signed-off-by: Rachel-Shao <34911960+Rachel-Shao@users.noreply.github.com>
@Rachel-Shao
Copy link
Contributor Author

Rachel-Shao commented Dec 15, 2021

@Rachel-Shao we should do not import k8s.io/klog, and please use k8s.io/klog/v2 instead.

@rambohe-ch I actually use k8s.io/klog/v2 in the code, not k8s.io/klog, do I still need to delete the k8s.io/klog package in go.mod?

@Rachel-Shao maybe you can execute go mod tidy locally, and i think the dummy import(like k8s.io/klog) will be removed automatically.

@rambohe-ch done! plz approve running workflows:)

@rambohe-ch
Copy link
Member

/lgtm
/approve

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Rachel-Shao, rambohe-ch

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

@openyurt-bot openyurt-bot added the approved approved label Dec 15, 2021
@openyurt-bot openyurt-bot merged commit a5ec100 into openyurtio:master Dec 15, 2021
@Rachel-Shao Rachel-Shao deleted the removeK8Sdep branch December 15, 2021 09:29
MrGirl pushed a commit to MrGirl/openyurt that referenced this pull request Mar 29, 2022
Signed-off-by: Rachel-Shao <34911960+Rachel-Shao@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved kind/feature kind/feature lgtm lgtm size/L size/L: 100-499
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request]Remove k8s.io/kubernetes dependency for yurtctl
3 participants