-
Notifications
You must be signed in to change notification settings - Fork 407
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
Yurtctl modify kube-controllersetting to close the nodelifecycle-controller #399
Conversation
@Peeknut: 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. |
- /bin/sh | ||
- -c | ||
args: | ||
- "nsenter -t 1 -m -u -n -i -- sed -i 's/--controllers=-nodelifecycle,/--controllers=/g' {{.pod_manifest_path}}/kube-controller-manager.yaml" |
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.
if no --controllers
parameter is set in kube-controller-manager.yaml
, the above command can not disable nodelifecycle
controller.
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.
Oh, yes. In the cluster installed by kubeadm, the static file of kube-controller-manager contains this parameter --controllers
by default. In order to deal with other situations, the situation without this parameter should indeed be considered.
And the method of modifying files will be optimized in the future to make string matching more accurate instead of using sed
.
if err = kubeutil.RunServantJobs(ro.clientSet, | ||
map[string]string{ | ||
"action": "enable", | ||
"yurtctl_servant_image": ro.YurtctlServantImage, |
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 use ro.YurtctlServantImage
to enable or disable nodelifecycle controller?
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.
Because the system architecture may be amd64, arm64, arm, using a unified basic image may cause problems. So the parameter of yurtctl convert --yurtctl-servant-image is reused here.
The yurtctl-servant image may be separated from yurtctl in the future for more elegant use.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Peeknut, 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
If kube-controlller-manager is deployed as a static pod,
yurtctl convert
turn offnodelifecycle controller
by modifyingkube-controller-manager.yaml
instead of deleting clusterrolebindingsystem:controller:node-controller
. So OpenYurt cluster created by yurtctl can run normally and support the high availability ofkube-controller-manager
.Which issue(s) this PR fixes:
Fixes #391
Special notes for your reviewer:
/assign @rambohe-ch
Does this PR introduce a user-facing change?
other Note