-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
move runonce from flag to config #89128
move runonce from flag to config #89128
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. I understand the commands that are listed here. |
Welcome @vincent178! |
Hi @vincent178. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
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.
Thanks @vincent178! Left some comments.
// run those in addition to the pods specified by static pod files, and exit. | ||
// Default: false | ||
// +optional | ||
RunOnce bool |
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.
I think the test you mentioned on Slack may be failing because this doesn't have the json:"runOnce,omitempty"
tag.
// TODO(mtaufen): It is increasingly looking like nobody actually uses the | ||
// Kubelet's runonce mode anymore, so it may be a candidate | ||
// for deprecation and removal. | ||
// If runOnce is true, the Kubelet will check the API server once for pods, |
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.
Can you format this comment like the others (start with the field name, as it would appear in JSON)?
// runOnce causes the Kubelet to check the API server once for pods,
// run those in addition to the pods specified by static pod files, and exit.
// Default: false
// +optional
@@ -490,6 +490,14 @@ type KubeletConfiguration struct { | |||
// Default: "/etc/resolv.conf" | |||
// +optional | |||
ResolverConfig string `json:"resolvConf,omitempty"` | |||
// TODO(mtaufen): It is increasingly looking like nobody actually uses the |
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.
You can remove this comment :). If we ever decide to remove it, it would best be done as a v2
API in the distant future.
pkg/kubelet/apis/config/types.go
Outdated
@@ -238,6 +238,12 @@ type KubeletConfiguration struct { | |||
// ResolverConfig is the resolver configuration file used as the basis | |||
// for the container DNS resolution configuration. | |||
ResolverConfig string | |||
// TODO(mtaufen): It is increasingly looking like nobody actually uses the |
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.
Ditto for removing this TODO comment.
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.
Thanks, one additional comment.
Also, if you haven't seen it yet, there are some instructions here: https://docs.google.com/document/d/10Kz__miCWEOekC6WnsUdxYWSLrf-t1AkHHpZN57ei5c/edit#heading=h.mupqgfuyjwnm
pkg/kubelet/apis/config/types.go
Outdated
@@ -238,6 +238,9 @@ type KubeletConfiguration struct { | |||
// ResolverConfig is the resolver configuration file used as the basis | |||
// for the container DNS resolution configuration. | |||
ResolverConfig string | |||
// If runOnce is true, the Kubelet will check the API server once for pods, |
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.
Can you update this comment to match the one on the public type (just the text part, not the default or optional)?
// RunOnce causes the Kubelet to check the API server once for pods,
// run those in addition to the pods specified by static pod files, and exit.
Do you also need to update |
6ddec8b
to
343fba6
Compare
/ok-to-test |
Sorry for the delay @vincent178. I updated the PR description with some additional details and removed the [WIP] from the title, as this looks good. /lgtm |
/priority important-longterm |
/approve |
/assign @liggitt |
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
/assign @lavalamp |
go ahead and squash this to a single commit, then lgtm |
343fba6
to
745b742
Compare
/retest |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, mtaufen, vincent178 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 |
/retest |
1 similar comment
/retest |
What type of PR is this?
/kind api-change
What this PR does / why we need it:
part of Migrate Kubelet flags to config #86843
Ref #86843
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Yes. It exposes the
RunOnce
option in Kubelet's ComponentConfig API.Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: