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

feat: kubeadm cluster import #261

Merged
merged 3 commits into from
Oct 17, 2022
Merged

feat: kubeadm cluster import #261

merged 3 commits into from
Oct 17, 2022

Conversation

zhuzhenfan
Copy link
Contributor

Signed-off-by: zhuzhenfan 981189503@qq.com

What type of PR is this?

/kind feature

What this PR does / why we need it:

nerf clusters created by external kubeadm to the platform

Which issue(s) this PR fixes:

Fixes #169

Special notes for reviewers:

@x893675 @lixd 

Does this PR introduced a user-facing change?

None

Additional documentation, usage docs, etc.:


@x893675 @lixd

Signed-off-by: zhuzhenfan <981189503@qq.com>
@kubeclipper-bot kubeclipper-bot added release-note-none kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 16, 2022
Signed-off-by: zhuzhenfan <981189503@qq.com>

// get kubeconfig from provider
providerName := c.Labels[common.LabelClusterProviderName]
// get kubeconfig from rancher provider
Copy link
Contributor

Choose a reason for hiding this comment

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

remove rancher form comment

if strings.Contains(err.Error(), "ssh: handshake failed") {
return "ssh connect failed,please check your ssh user、password or privateKey"
}
if strings.Contains(err.Error(), `"status":"401","message":"must authenticate"`) {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove rancher api err check form kubeadm

url := fmt.Sprintf("http://%s:%v/kc/kubeclipper-agent", deployConfig.ServerIPs[0], deployConfig.StaticServerPort)
cmdList := []string{
"systemctl stop kc-agent || true",
fmt.Sprintf("wget %s -O /usr/local/bin/kubeclipper-agent", url),
Copy link
Contributor

Choose a reason for hiding this comment

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

replace wegt to curl

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

Signed-off-by: zhuzhenfan <981189503@qq.com>
@codecov-commenter
Copy link

Codecov Report

Merging #261 (15f816a) into master (c7f612e) will decrease coverage by 0.02%.
The diff coverage is 5.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #261      +/-   ##
==========================================
- Coverage   13.11%   13.08%   -0.03%     
==========================================
  Files          98       98              
  Lines       15364    15387      +23     
==========================================
- Hits         2015     2014       -1     
- Misses      13110    13133      +23     
- Partials      239      240       +1     
Impacted Files Coverage Δ
pkg/apis/core/v1/handler.go 0.33% <0.00%> (-0.01%) ⬇️
pkg/apis/core/v1/utils.go 54.12% <0.00%> (-1.85%) ⬇️
pkg/scheme/core/v1/k8s/kubeadm_step.go 0.00% <0.00%> (ø)
pkg/apis/core/v1/schema.go 69.72% <40.00%> (-2.11%) ⬇️

Copy link
Contributor

@lixd lixd left a comment

Choose a reason for hiding this comment

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

/lgtm

@kubeclipper-bot kubeclipper-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 17, 2022
@kubeclipper-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: 43959a28b9179e0ec5faf5078ee9610dfd635839

@x893675
Copy link
Collaborator

x893675 commented Oct 17, 2022

/approve

@kubeclipper-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lixd, x893675, zhuzhenfan

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

@kubeclipper-bot kubeclipper-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 17, 2022
@kubeclipper-bot kubeclipper-bot merged commit b86e1f4 into kubeclipper:master Oct 17, 2022
@zhuzhenfan zhuzhenfan deleted the kubeadm branch October 19, 2022 00:05
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. dco-signoff: yes kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note-none 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.

feature: support import cluster
5 participants