-
Notifications
You must be signed in to change notification settings - Fork 404
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 from yurtctl join/reset #697
remove k8s.io/kubernetes dependency from yurtctl join/reset #697
Conversation
@rambohe-ch: GitHub didn't allow me to assign the following users: your_reviewer. Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
13674d6
to
34fb4e6
Compare
hi @rambohe-ch
PS: can some change in node can be implantation in node-servant? to make the update to kubelet/yurthub keep same. very thanks. |
@adamzhoul Thanks for your suggestions. i
@adamzhoul Thanks for your suggestions. i have updated the pull request messages. |
} | ||
|
||
if !r.ForceReset() { | ||
fmt.Println("[reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why fmt not klog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
34fb4e6
to
b0cd9dc
Compare
/lgtm |
What type of PR is this?
/kind enhancement
What this PR does / why we need it:
Remove k8s.io/kubernetes dependency from
yurtctl join
andyurtctl reset
.1. feature update points:
yurtctl join
command and integrate with sealer, joinControlPlane
node feature is removed, soyurtctl join
can only join cloud or edge worker node. and end user should useyurtctl init
to installControlPlane
throughsealer
.yurtctl reset
can only reset worker node that joined byyurtctl join
command. if end user useyurtctl reset
to reset other kind of nodes, the result maybe unknown.2. yurtctl join command
implementation update points:
dependency on kubeadm copied from
k8s.io/kubernetes/cmd/kubeadm
togithub.com/openyurtio/openyurt/pkg/yurtctl/kubernetes
. soKubeletConfiguration
has been left.command line parameter:
kubeadmapi.JoinConfiguration
andkubeadmapi.InitConfiguration
have been removed. only command line parameters are supported inyurtctl join
.YurtJoinData
interface.apiServerAddress
andtoken
parameter foryurtctl join
commandorganizations
parameter is added for adding customizedOrganizations
info into yurthub client certificate.node-labels
parameter is added for adding customizedlabels
for worker node.prepare phase(pkg/yurtctl/cmd/join/phases/prepage.go):
EdgeKubeletUnitConfig
andCloudKubeletUnitConfig
intoKubeletUnitConfig
/etc/kubernetes/kubelet.conf
file preparation./etc/kubernetes/pki/ca.crt
file preparation.preflight phase(pkg/yurtctl/cmd/join/phases/preflight.go)
/etc/kubernetes/kubelet.conf
and/etc/kubernetes/pki/ca.crt
file existing checkpause
andyurthub
image pull checkjoinNode phase(pkg/yurtctl/cmd/join/phases/joinnode.go)
joinCloudNode/joindEdgeNode
intojoinNode
because the join routine is the same except theWorkingMode
parameter of yurthub.openyurt.io/is-edge-worker
label is added as kubelet command line parameter, so after kubelet startup, onlyCRISocket
annotation is need to patch to node.HTTP
to connect yurthub, sorotate-certificates=faluse
is added to kubelet command line parameter.templates.SubsituteTemplate
to populate yurthub yaml, so the format of fields inYurthubTemplate
are modified. for example: from__workingMode__
to{{.workingMode}}
postCheck phase(pkg/yurtctl/cmd/join/phases/postcheck.go)
3. yurtctl reset command
resetData
interfacecleanfile
phase intocleanupnode
andcleanyurtfile
phases.Which issue(s) this PR fixes:
Fixes #671
Special notes for your reviewer:
Does this PR introduce a user-facing change?
other Note