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

Add support for the conversion between kind and OpenYurt cluster #234

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

Peeknut
Copy link
Member

@Peeknut Peeknut commented Mar 11, 2021

Ⅰ. Describe what this PR does

1.Only one node in the cluster is installed with openyurt, and then any node in the cluster can be converted.

2.Add support for the conversion between kind and OpenYurt cluster.

Ⅱ. Does this pull request fix one issue?

fixes #230.

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅳ. Describe how to verify it

make test
make build
cp _output/bin/yurtctl /bin/
yurtctl convert
yurtctl revert

Ⅴ. Special notes for reviews

@Peeknut Peeknut force-pushed the kind branch 2 times, most recently from 399d955 to 10dff86 Compare March 11, 2021 15:39
pkg/yurtctl/constants/constants.go Show resolved Hide resolved
@@ -231,7 +231,7 @@ spec:
- /bin/sh
- -c
args:
- "nsenter -t 1 -m -u -n -i -- /bin/yurtctl revert edgenode"
- "cp /usr/local/bin/yurtctl /tmp && nsenter -t 1 -m -u -n -i -- /var/tmp/yurtctl revert edgenode && rm /tmp/yurtctl"
Copy link
Member

Choose a reason for hiding this comment

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

Same as the previous comment.

return "", err
} else if nodeName != "" {
nodeName, _ := GetSingleContentFromFile(KubeletSvcPath, KubeletHostname)
if nodeName != "" {
Copy link
Member

Choose a reason for hiding this comment

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

Can we log the error instead of ignoring it?

return "", err
} else if nodeName != "" {
nodeName, _ = GetSingleContentFromFile(ef, KubeletHostname)
if nodeName != "" {
Copy link
Member

Choose a reason for hiding this comment

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

Same as the previous comment.

pkg/yurtctl/util/kubernetes/util.go Show resolved Hide resolved
hack/lib/release-images.sh Show resolved Hide resolved
@charleszheng44
Copy link
Member

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for the conversion between kind cluster and OpenYurt cluster.
3 participants