-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
kubelet: add --runonce flag #1534
Conversation
oops, github #fail |
Err error | ||
} | ||
|
||
// RunOnce poll from one configuratin update and run the associated 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.
configuration
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.
Done
I'm assuming you are want to use kubelet with --runonce as part of the boot process for a machine, to for example start cadvisor from a local manifest file? Is that right? Will the kubelet poll the apiserver for pods when run with --runonce, or does it only start file-based pods? I haven't traced all the code yet, but I think it talks to apiserver. Assuming the above is true, is there a race where sometimes the kubelet only starts locally configured pods, and other times, it manages to be noticed by the apiserver, get apiserver-managed pods scheduled on it, and then start those pods too? If so, that seems like it could cause problems, or at least be surprising. If it works for your use case, I wonder if it makes sense to only start containers from a local manifest when kubelet is run with --runonce. |
if kl.dockerPuller == nil { | ||
kl.dockerPuller = dockertools.NewDockerPuller(kl.dockerClient, kl.pullQPS, kl.pullBurst) | ||
} | ||
if kl.healthChecker == nil { |
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 health check if kubelet is going to exit soon? Seems like it just leads to unpredicable behavior for --runonce.
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.
Done
Looks good aside from previous comments. |
@erictune Yes, I updated the description to reflect this. |
The changes in |
Currently it only poll local file and/or an url, update the documentation to be more explicit. |
LGTM |
@erictune Thanks, I do want to add more tests before merging. |
@proppy Please squash your commits when you're done, also. |
@bgrant0607, will do I like keeping them that way during review, as it helps to review how the comments were addressed |
please hold this PR until I can review, ETA tonight or tomorrow. On Thu, Oct 2, 2014 at 3:39 PM, Johan Euphrosine notifications@github.com
|
@@ -63,6 +63,7 @@ var ( | |||
allowPrivileged = flag.Bool("allow_privileged", false, "If true, allow containers to request privileged mode. [default=false]") | |||
registryPullQPS = flag.Float64("registry_qps", 0.0, "If > 0, limit registry pull QPS to this value. If 0, unlimited. [default=0.0]") | |||
registryBurst = flag.Int("registry_burst", 10, "Maximum size of a bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registry_qps. Only used if --registry_qps > 0") | |||
runonce = flag.Bool("runonce", false, "If true, exit after spawning pod from local manifests or remote urls. Exclusive with --etcd_servers and --enable-server") |
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.
s/pod/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.
Done
feedback done, hold removed (though now there is feedback) On Thu, Oct 2, 2014 at 4:57 PM, Tim Hockin thockin@google.com wrote:
|
rebased |
Added basic tests and rebased, PTAL |
LGTM |
ok to merge in-hours |
Usage
Description
The kubelet runs the pod specified by the manifest and exits when the containers are running.
This is useful for being able to bootstrap a kubelet pod with the kubelet binary.
Related
#246, #490
TODO