Commit Graph

605 Commits (de59ede6b2f4c2b41b0b66909a7409983244e52a)

Author SHA1 Message Date
Justin Santa Barbara df87470ecf Allow cloud providers to return a node identifier different from the hostname 2015-06-18 12:40:05 -07:00
Justin Santa Barbara dee8d4b90b For kubelet, differentiate between the nodeName and the hostname
This will allow us to use a nodeName that is not the hostname,
for example on clouds where the hostname is not the natural identifier
for a node.
2015-06-18 12:40:01 -07:00
Satnam Singh e4f5529a2d Revert "Allow nodename to be != hostname, use AWS instance ID on AWS" 2015-06-18 11:27:55 -07:00
Justin Santa Barbara efaead81dc Allow cloud providers to return a node identifier different from the hostname 2015-06-17 00:40:43 -04:00
Justin Santa Barbara c28cdfbd43 For kubelet, differentiate between the nodeName and the hostname
This will allow us to use a nodeName that is not the hostname,
for example on clouds where the hostname is not the natural identifier
for a node.
2015-06-17 00:40:43 -04:00
Mike Danese 5896ac9e07 skip GetHostIP call on standalone mode kubelet to fix spammy log statement 2015-06-12 11:37:53 -07:00
Abhi Shah 52db576617 Merge pull request #8882 from mesosphere/upstream_k8sm
Upstream Kubernetes-Mesos framework
2015-06-12 06:36:20 -07:00
Abhi Shah 0f4f2eb05a Merge pull request #9617 from davidopp/master
Add a warning that setting --port flag to Kubelet breaks "kubectl log…
2015-06-11 10:18:41 -07:00
David Oppenheimer b83a32955b Add a warning that setting --port flag to Kubelet breaks "kubectl logs." Temporary
fix for #9325.
2015-06-10 17:24:49 -07:00
James DeFelice 7d66559725 added comments at the top of native k8s files which, if changed, might affect some of the k8sm code 2015-06-10 20:31:22 +00:00
Abhi Shah 0fbd4900d1 Merge pull request #9423 from mesosphere/create-api-server-client
refactor createAPIServerClient for easier integration with 3rd party …
2015-06-10 12:54:17 -07:00
James DeFelice f54eeeb8d6 refactor createAPIServerClient for easier integration with 3rd party kubelet extensions, e.g. kubernetes-mesos 2015-06-10 02:13:58 +00:00
CJ Cullen 2d85e4a094 Use Node IP Address instead of Node.Name in minion.ResourceLocation.
Refactor GetNodeHostIP into pkg/util/node (instead of pkg/util to break import cycle).

Include internalIP in gce NodeAddresses.
2015-06-08 16:58:00 -07:00
James DeFelice b3c8f71aca refactor tls init for reuse 2015-06-05 11:45:40 +00:00
Brian Grant f72fa67924 Revert "Use Node IP Address instead of Node.Name in minion.ResourceLocation." 2015-06-03 18:19:22 -07:00
Brian Grant d4acb1d676 Merge pull request #9155 from cjcullen/mig
Use Node IP Address instead of Node.Name in minion.ResourceLocation.
2015-06-02 22:51:20 -07:00
CJ Cullen 4e5d0da839 Use Node IP Address instead of Node.Name in minion.ResourceLocation.
Refactor GetNodeHostIP into pkg/util/node (instead of pkg/util to break import cycle).

Include internalIP in gce NodeAddresses. Remove NodeLegacyHostIP
2015-06-02 20:01:49 -07:00
Andy Goldstein 2a0d7ebb11 Add support for pluggable Docker exec handlers
Add support for pluggable Docker exec handlers. The default handler is
now Docker's native exec API call. The previous default, nsenter, can be
selected by passing --docker-exec-handler=nsenter when starting the
kubelet.
2015-06-01 16:59:59 -04:00
Victor Marmol 9a2630ac6e Make system container name configurable. 2015-05-26 20:49:55 -07:00
Dawn Chen 677a4aa1a7 Merge pull request #8164 from cjcullen/cloudprovider
Route creation reconciler loop.
2015-05-22 12:27:50 -07:00
Huamin Chen 4a800fd10e add rados block device(rbd) volume plugin
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-05-21 14:51:31 -04:00
Dawn Chen 3c38abe6b0 Merge pull request #8545 from dchen1107/cleanup
Change the default value of maximum-dead-containers-per-container to 2
2015-05-21 09:26:14 -07:00
CJ Cullen bf646abf8d Revert "Revert "Modify nodes to register directly with the master.""
This reverts commit c53786ab31.
2015-05-20 14:21:03 -07:00
Quinton Hoole c53786ab31 Revert "Modify nodes to register directly with the master." 2015-05-20 13:47:51 -07:00
Dawn Chen d46bb117af Change the default value of maximum-dead-containers-per-container to 2 2015-05-19 17:30:16 -07:00
Robert Bailey 01467e0bb8 Modify nodes to register directly with the master.
- Delete nodes when they are no longer ready and don't exist in the
cloud provider.
 - Label each node with it's hostname.
 - Add flag to skip node registration.
 - Add a test for registering an existing node.
2015-05-19 09:55:07 -07:00
David Oppenheimer 44b1e1ca0c Fix stylistic isues with #5547. Closes #4910. 2015-05-18 23:32:06 -07:00
Victor Marmol a7341cfb77 Merge pull request #8386 from smarterclayton/make_kubelet_consumable
Make it easier to reuse kubelet server code
2015-05-18 11:26:55 -07:00
Clayton Coleman dc0e3dd0a4 Make it easier to reuse kubelet server code
Ensure that RunKubelet() returns errors consistently,
and make info output match Kube conventions.

Allows OpenShift to more easily reuse the Kubelet.
2015-05-18 13:38:23 -04:00
gmarek 27d660d0ac Add a resource specifying number of Pods that are allowed to run on Kubelet. 2015-05-15 10:57:46 +02:00
David Oppenheimer 7a21d7ab1f Merge pull request #8053 from jdef/upstream_mesos_cloud
integrate mesos cloud provider with k8s proper
2015-05-14 13:57:39 -07:00
Dawn Chen 309a157665 Merge pull request #7984 from cjcullen/kubelet
Kubelet configure cbr0 instead of configure-vm.sh
2015-05-13 17:32:52 -07:00
Victor Marmol 2aaa4e08eb Revert "Change default CgroupRoot to /." 2015-05-13 15:50:23 -07:00
Robert Bailey c47b9178b4 Replace the auth config file with a kubeconfig file when
starting the kubelet on GCE.
2015-05-13 01:03:28 -07:00
CJ Cullen 31ea7d1295 Put cbr0-modifying stuff behind a flag. Address some other comments. 2015-05-12 23:00:28 -07:00
Victor Marmol 40ec627cd4 Merge pull request #8108 from rjnagal/kubelet
Handle out of disk situation on kubelet.
2015-05-12 15:49:31 -07:00
Rohit Jnagal fab980598a Merge pull request #8122 from vmarmol/docker-container
Run Docker Daemon in a Resource-only Container
2015-05-12 13:16:05 -07:00
Rohit Jnagal 2cf0dfb79d Handle out of disk situation on kubelets.
Kubelet will stop accepting new pods if it detects low disk space on root fs or fs holding docker images.
Running pods are not affected. low-diskspace-threshold-mb is used to configure the low diskspace threshold.
2015-05-12 18:23:09 +00:00
Victor Marmol e1447618f4 Integrating ContainerManager into Kubelet 2015-05-12 10:13:23 -07:00
James DeFelice 652c14d8d7 integrate mesos cloud provider into kube apps 2015-05-12 16:02:38 +00:00
Victor Marmol 8d304b7d1e Change default CgroupRoot to /.
This will make all Docker containers to be top-level containers. This
will more equally share the CPU under cases of contention.
2015-05-12 08:04:20 -07:00
deads2k 6498fc1fda remove cmd respect for auth-path 2015-05-08 16:33:33 -04:00
Yifan Gu 7e9ba26103 kubelet: Add container runtime option for rkt. 2015-05-07 23:39:37 -07:00
Victor Marmol ecf8348609 Revert "kubelet: Add container runtime option for rkt." 2015-05-07 13:01:37 -07:00
Yifan Gu 4f6535ed8a kubelet: Add container runtime option for rkt. 2015-05-07 10:31:58 -07:00
Zach Loafman 3fcea23185 Revert "Revert "Revert "Kubelet: Add rkt as a runtime option""" 2015-05-05 15:55:12 -07:00
Zach Loafman 92ca92f43a Revert "Revert "Kubelet: Add rkt as a runtime option"" 2015-05-05 15:28:09 -07:00
Zach Loafman 6016408096 Revert "Kubelet: Add rkt as a runtime option" 2015-05-05 15:15:15 -07:00
Yu-Ju Hong b2c0ea37b4 Merge pull request #7743 from vmarmol/runtime-switch
Kubelet: Add rkt as a runtime option
2015-05-05 13:36:46 -07:00
Victor Marmol 22297d316a Add rkt runtime to Kubelet init 2015-05-05 10:55:21 -07:00
Paul Morie 553265ce0c Add containerized option to kubelet binary 2015-05-05 13:10:06 -04:00
Victor Marmol 27dea5f400 Revert "Add containerized option to kubelet binary" 2015-05-04 16:34:22 -07:00
Paul Morie ddbf9f7a28 Add containerized option to kubelet binary 2015-05-04 18:59:52 -04:00
Paul Morie b538642464 Inject mounter into volume plugins 2015-05-04 11:28:57 -04:00
Daniel Smith 4a6ab7fd36 Merge pull request #7597 from eparis/copyright
Use generic copyright holder name in license boilerplate
2015-05-01 17:01:39 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Victor Marmol d9d61c3511 Kubelet: Add container runtime option. 2015-05-01 14:26:54 -07:00
Tobi Knaup b96c4046a8 Add --cgroup_root flag to Kubelet to set the parent cgroup for all pods.
Implements #6991.
2015-04-30 10:32:27 -07:00
Tim Hockin 0c611370e0 Merge pull request #7281 from thockin/flag-word-separators
Make flags accept - or _ between words
2015-04-27 18:11:58 -07:00
Tim Hockin a3d45fada8 Change flags to use dashes in help 2015-04-27 15:11:03 -07:00
Victor Marmol 7404b7019c Move Docker-specific log handling to DockerManager.
Eases the separation of Docker-specific code into the Docker-specific
runtime.
2015-04-27 13:10:10 -07:00
Satnam Singh 2444c1f943 Propagate pod and container name for log files 2015-04-22 15:08:51 -07:00
Kenjiro Nakayama 5e2e59e728 Add more help description to cert_dir flag 2015-04-20 00:35:56 +09:00
Robert Bailey f3dd053a08 Merge pull request #6952 from mikedanese/kubelet-profiling
add enable_profiling option to kubelet healthz port
2015-04-17 07:42:35 -07:00
Mike Danese 7b13870b32 add profiling to kubelet 2015-04-16 23:11:40 -07:00
Robert Bailey 8aff238c5f Remove an unused function in the kubelet code. 2015-04-16 15:38:12 -07:00
Dawn Chen d912398d07 Merge pull request #6813 from vmarmol/in-container
Run Kubelet and Kube-proxy in resource-only containers.
2015-04-15 10:37:00 -07:00
markturansky d904e747e3 PVClaim volume plugin 2015-04-14 16:21:29 -04:00
Victor Marmol fb3c351fe1 Run Kubelet on "/kubelet" container. 2015-04-14 10:29:05 -07:00
Eric Paris 036937227f Use Fprintf to print formatted strings
Shouldn't be using Fprint() with a format string.
2015-04-14 10:51:57 -04:00
Fabio Yeon e99141de0d Merge pull request #6729 from smarterclayton/chaosclient
Add a new Chaos transport that can simulate network failure and add it to the kubelet
2015-04-13 16:06:53 -07:00
Clayton Coleman ca335d7be9 Add support for chaos to Kubelet and hack/local-up-cluster.sh 2015-04-13 18:21:20 -04:00
Xiang Li cea38a2f4e pkg/kubelet: kill a TODO in util.go
Move kubelet.CapabilitiesSetup to capabilities.Setup
2015-04-11 10:55:39 -07:00
Eric Paris 8e7d14196f Fix printing errors from failed binary runs
I had the kublet die on startup and the only error was "0x401da0"  Which
I assume is an address of the err.Error function.  The other way to fix
this, I think, would be to use err.Error(), however that could cause
fmt.Fprintf() problems, debuging on the error message people used.

Now I get a nice clean error I can understand:

"cAdvisor.New() err = mountpoint for cpu not found"
2015-04-10 17:56:47 -04:00
Justin Santa Barbara 503e19e58c Rename aws_pd -> aws_ebs 2015-04-10 13:25:44 -07:00
Justin Santa Barbara edf0292d4a Add initial support for Volumes to AWS 2015-04-10 13:25:42 -07:00
Yifan Gu b868f421e0 kubelet: Move pod infra container image setting to dockertools. 2015-04-09 09:53:07 -07:00
Wojciech Tyczynski 37ea722b7b Set NodeStatusUpdateFrequency 2015-04-09 10:44:48 +02:00
Vishnu Kannan 2b5cad6acf Improve kubelet logging around startup. This might help detect any lockup issues during startup. 2015-04-08 21:02:15 +00:00
David Oppenheimer d8aa57872a Change default Kubelet NodeStatusUpdateFrequency from 2s to 10s. 2015-04-07 12:36:09 -07:00
David Oppenheimer 402bf60366 Merge pull request #6214 from gmarek/move_consts_to_flags
Move NodeController constants to flags
2015-04-07 11:31:11 -07:00
Huamin Chen a278ceeb0a implement glusterfs volume plugin
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-04-07 09:14:39 -04:00
gmarek 321a81047c Move NodeController constants to flags 2015-04-07 12:33:03 +02:00
Vish Kannan be0feddfa5 Merge pull request #5506 from rootfs/dev
add iscsi volume plugin
2015-04-06 15:11:44 -07:00
Huamin Chen 7a82af31de add iscsi volume plugin
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-04-06 16:20:28 -04:00
James DeFelice d194af6b4f allow for more easily customized kubelet creation and initialization 2015-04-06 18:51:42 +00:00
Robert Bailey 4488ff95a2 Create an insecure (http) read-only port on the kubelet so that
heapster can collect metrics. Update the heapster config to
point to the non-secured port.
2015-04-02 10:45:49 -07:00
Robert Bailey f15e34a1bf Revert "Merge pull request #6309 from GoogleCloudPlatform/revert-6243-kubelet-ssl"
This reverts commit 96a0a0d618, reversing
changes made to 2af9b54147.
2015-04-02 10:44:37 -07:00
Dawn Chen ab1a8b1e7c Merge pull request #6298 from roberthbailey/kubelet-config
Remove salt configuration that matches the default settings in the Kubelet.
2015-04-01 14:31:31 -07:00
Robert Bailey 32a1c052dc Revert "Configure the kubelet to use HTTPS" 2015-04-01 13:59:31 -07:00
Robert Bailey 40ebed845f Remove salt configuration that matches the default settings in
the Kubelet.
2015-04-01 12:13:40 -07:00
Robert Bailey dd9ec46cc0 Fix test-cmd to work with the kubelet listening on HTTPS. 2015-04-01 09:09:29 -07:00
Robert Bailey d0f48b68d8 Configure the Kubelet to listen on HTTPS. If no certificates are
provided on the command line, generate self-signed certs.
2015-04-01 09:09:29 -07:00
Daniel Smith acd67ebea0 Merge pull request #5535 from saad-ali/fix5327
Make each new instance of kubelet generate a new event channel
2015-03-30 17:05:27 -07:00
saadali e0f71cb21f Make each new instance of kubelet generate a new event channel (instead of reusing existing). 2015-03-30 14:22:16 -07:00
Robert Bailey bc8af553a3 Configure the kubelet to bind a simple healthz server to a localhost
port for monitoring by monit. This is in preparation for the standard
kubelet port to switch to SSL only (and eventually to only accepting
connections on the SSL port that present a proper client SSL cert).

Also standardize the formatting of the monit config files a bit.
2015-03-30 14:20:30 -07:00
Victor Marmol cf7e2756b5 Add HostNetworkSources capability to limit use of HostNetwork. 2015-03-25 11:23:06 -07:00
Sreekanth Pothanis 1c06cde4c4 added cloud provider flag to kubelet
This is to fix issue #5667
2015-03-24 19:32:50 -07:00
Deyuan Deng cf548765c9 Change kubelet update frequency to 2s, and make it a constant. 2015-03-24 14:23:48 -04:00
Filip Grzadkowski 632ca506ce * Update pod status only when it changes.
* Refactor syncing logic into a separate struct
2015-03-24 16:41:00 +01:00
Clayton Coleman d020ca00b8 Pass hostname to all kubelet config sources instead of os.Hostname()
Make applyDefaults be tied to the current config source.
2015-03-23 15:58:45 -04:00
Clayton Coleman bd12cfea69 Integration tests should do a faster status sync loop 2015-03-23 14:48:28 -04:00
Clayton Coleman 90beaa3d61 Set non-zero default HTTP/File check intervals to avoid hotloop
cmd/integration.go was hot-looping for both, but did not need to.
2015-03-23 00:47:39 -04:00
Tim Hockin bfadae77e0 Promote volume plugins, prep for persistent vols
Move pkg/kubelet/volume/... to pkg/volume/...
Some renames to make the soon-to-come persistent volumes work clearer.
2015-03-20 13:49:40 -07:00
Tim Hockin 1cbde2c5c7 Merge pull request #5664 from calfonso/nfs_mount_plugin
Addresses cross compile for syscall.Unmount by delegating to Mount.
2015-03-19 16:19:01 -07:00
CJ Cullen 7ddcecfd1c Revert "Revert "[WIP] southbound networking hooks in kubelet"" 2015-03-19 16:14:13 -07:00
Zach Loafman b5d1e538df Revert "[WIP] southbound networking hooks in kubelet" 2015-03-19 16:08:08 -07:00
Rajat Chopra 7857aa7751 kubelet networking plugin 2015-03-19 14:15:52 -07:00
Chris Alfonso 9d0c9e7dc3 Addresses cross compile for syscall.Unmount by delegating to Mount. 2015-03-19 16:46:14 -04:00
derekwaynecarr 396f802318 Disable the nfs plugin because it does not cross-compile during release builds 2015-03-19 16:11:15 -04:00
Chris Alfonso 1a45e37d17 NFSMount storage plugin for kubelet.
* If you want to test this out when an actual NFS export a good place
 to start is by running the NFS server in a container:

docker run -d --name nfs --privileged cpuguy83/nfs-server /tmp

More detail can be found here:
https://github.com/cpuguy83/docker-nfs-server
2015-03-19 13:37:38 -04:00
Victor Marmol cda4b6c598 Spread out pod status updates to apiserver.
Lowers pod status interval to every 2m and spreads updates within that
time window.
2015-03-18 15:43:07 -07:00
Victor Marmol d78ecf820e Garbage collecting images in the Kubelet.
Integrated the imageManager into the Kubelet and applies the garbage
collection policy every 5 minutes. The default policy allows up to 90%
disk usage, after which images are garbage collected to bring limit back
down to 80%.

Fixes #157.
2015-03-17 17:56:02 -07:00
Victor Marmol d1ed571e28 Use containerGC in the Kubelet.
New policy default is 100 containers max.

Fixes #5457.
2015-03-17 10:50:32 -07:00
Yu-Ju Hong 929fb63b33 Sync static pods from Kubelet to the API server
Currently, API server is not aware of the static pods (manifests from
sources other than the API server, e.g. file and http) at all. This is
inconvenient since users cannot check the static pods through kubectl.
It is also sub-optimal because scheduler is unaware of the resource
consumption by these static pods on the node.

This change syncs the information back to the API server by creating a
mirror pod via API server for each static pod.

 - Kubelet creates containers for the static pod, as it would do
   normally.

 - If a mirror pod gets deleted, Kubelet will re-create one. The
   containers are sync'd to the static pods, so they will not be
   affected.

 - If a static pod gets removed from the source (e.g. manifest file
   removed from the directory), the orphaned mirror pod will be deleted.

Note that because events are associated with UID, and the mirror pod has
a different UID than the original static pod, the events will not be
shown for the mirror pod when running `kubectl describe pod
<mirror_pod>`.
2015-03-17 08:45:56 -07:00
Victor Marmol dc96ea6300 Run cAdvisor inside the Kubelet.
cAdvisor is started as a Kubelet dependency during startup of the
Kubelet before the sync loops start.
2015-03-13 16:06:02 -07:00
Dawn Chen 0cc2b62b4a Merge pull request #5265 from ddysher/kubelet-post-status
kubelet post node status to master
2015-03-13 15:29:22 -07:00
Eric Tune ae9bc28f8b Remove mentions of etcd in kubelet. 2015-03-11 16:40:20 -07:00
Eric Tune ac7bf05079 Kubelet has not even heard of etcd. 2015-03-11 16:29:31 -07:00
Deyuan Deng 9982aaa960 kubelet post node status to master 2015-03-10 23:17:36 -04:00
Eric Tune 2ca265ae3b Remove --etcd_servers flag from kubelet and proxy.
All the distros that use this have been updated,
or have PRs out to update them, or owners
have been asked to fix RPMs.

Removing this prevents further use of this model.

Remove now dead code: EtcdClientOrDie

Remove now dead pkg/proxy/config/etcd.go.

Remove unused imports.
2015-03-10 09:29:09 -07:00
Victor Marmol ab3c9de34b Refactoring cAdvisor interface into a package.
This will make it easier to start running the real cAdvisor alongside
Kubelet. This change is primarily no-op refactoring. The main behavioral
change is that we always create a cAdvisor interface and expect it to
always be available. When we make a request, if cAdvisor is not
connected the request fails with a connection error. This failure is
handled today as well.
2015-03-09 11:19:05 -07:00
Dawn Chen 9439c0f3bd Merge pull request #5103 from yujuhong/naming
kubelet: revamp the pod/container naming scheme
2015-03-06 15:58:58 -08:00
Yu-Ju Hong 32fd331e73 Revert "Split up kubelet "source seen" logic"
We want to sync pods from file/http/etcd sources to the apiserver, hence
differentiating sources is no longer desired.

This reverts commit 110ab6f1bd.
2015-03-06 12:57:48 -08:00
Deyuan Deng 50de1a80c2 kubelet should take a client interface 2015-03-06 15:01:55 -05:00
Jordan Liggitt 02622b1401 Plumb tls and cert options into kubelet start 2015-03-05 16:30:52 -05:00
Paul Morie 02b18edac6 Allow multiple sources to be used with record package 2015-03-05 13:54:29 -05:00
Tim Hockin 9f1451121d keep hyperkube noise in one place 2015-02-20 08:49:12 -08:00
Tim Hockin 7fe7f8a542 move pkg/kubelet/server to cmd/kubelet/app 2015-02-20 08:49:12 -08:00
Daniel Smith fcddefa184 Set GOMAXPROCS. Print errors on stderr. 2015-02-19 10:30:31 -08:00
Joe Beda 76df5471b5 Covert the kubelet binary to hyperkube.
This leaves `pkg/kubelet/server/server.go` looking a little ugly as there is an extra layer of "config" structs that isn't needed.  This is left as a TODO for now.
2015-02-02 14:03:13 -08:00
Joe Beda d96afdd645 Move 'pkg/standalone' package to 'pkg/kubelet/server'.
This paves the way to hyperkube for the kubelet.
2015-02-02 14:03:13 -08:00
Tim Hockin 80ff2128de Merge pull request #3844 from mikedanese/dockercfg-dirs
Check other dirs for .dockercfg
2015-01-28 08:50:08 -08:00
Mike Danese 33f158073b Check other dirs for .dockercfg 2015-01-27 15:54:20 -08:00
Mrunal Patel b6a0ff1003 IP: Shared IPC. 2015-01-27 09:26:36 -08:00
Tim Hockin 6cb275829f Implement volumes as plugins.
Break up the monolithic volumes code in kubelet into very small individual
modules with a well-defined interface.  Move them all into their own packages
and beef up testing along the way.
2015-01-20 11:45:45 -08:00
Eric Tune 98bdd3f7c4 Test for and fix crash with nil client in kubelet.
Added test that fails before fix.
Fixed use of nil pointer.
2015-01-16 13:39:31 -08:00
Daniel Smith 46f8a56dba Merge pull request #3376 from erictune/channel_api
Kublet watches Pods.
2015-01-15 14:48:12 -08:00
Joe Beda 6bd6b905f5 Address code review comments
Add some documentation.
Create new util.InitFlags() function to merge and parse in one step.
2015-01-15 09:12:20 -08:00
Joe Beda dcd00c936e Move all kubernetes to posix flags 2015-01-15 09:12:19 -08:00
Eric Tune b759f67ee3 Kublet watches Pods.
Added a kubelet config source for watching pods on apiserver.
The pods are converted to boundpods for merging with other
config sources.

The preferred way to create a kubelet is now to pass an apiserver
client but not an etcd client.  Changed cmd/integration to use
apiserver to talk to kubelets.  And cmd/kubernetes.

Unit, integration, and e2e tests pass, except for a failure of the pd
e2e test which was unrelated.
2015-01-14 15:31:26 -08:00
Paul Morie fd834ae84d Pods should see services only from their own ns 2015-01-14 17:06:36 -05:00
Tim Hockin eac982137f Merge pull request #3260 from commonlisp/master
NewMainKubelet validates SyncFrequency, minimum GC age, etc.
2015-01-08 08:20:55 -08:00
George Kuan 06475fc4b4 NewMainKubelet validates Kubelet config parameters
Fixes issue #3202.
* Validates SyncFrequency and minimum GC age and propagates error to RunKubelet
* Defaults for Kubelet config and minor cleanup
* cmd Kubelet MinimumGCAge to 1m instead of 0
2015-01-07 18:50:53 -08:00
Clayton Coleman ba53d723d3 Clean up how client is passed to Kubelet in preparation for reading pods
Also fixes how Kubelet server looks up pods by name when there are multiple
sources.
2015-01-07 14:40:37 -05:00
Dawn Chen f718957a79 Move GetHostName and GetDockerEndpoint methods to pkg/util 2015-01-05 11:44:21 -08:00
Tim Hockin 652479a3b1 Add kubelet DNS flags & api disable for DNS
This adds --cluster_dns and --cluster_domain flags to kubelet.  If
non-empty, kubelet will set docker --dns and --dns-search flags based on
these.  It uses the cluster DNS and appends the hosts's DNS servers.
Likewise for DNS search domains.

This also adds API support to bypass cluster DNS entirely, needed to
bootstrap DNS.
2014-12-29 09:18:12 -08:00
Vishnu Kannan 6f53f33fda Set oom_score_adj for kubelet and kube-proxy to a low value to help them survive system memory pressure. 2014-12-24 00:34:28 +00:00
Mike Danese 722abf1a95 - make cadvisor port configurable on the kubelet.
- added cadvisor port documentation.
2014-12-06 09:48:08 -08:00
Brendan Burns d47b510104 Refactor kubelet, standalone k8s and integration test to all use the same code. 2014-12-01 15:37:21 -08:00
Brendan Burns cea52d7e4f Merge pull request #2409 from mattmoor/master
Implements a credentialprovider library for use by DockerPuller.
2014-11-17 21:53:25 -08:00
Matt Moore 0c5d9ed0d2 Implements a credentialprovider library for use by DockerPuller.
This change refactors the way Kubelet's DockerPuller handles the docker config credentials to utilize a new credentialprovider library.

The credentialprovider library is based on several of the files from the Kubelet's dockertools directory, but supports a new pluggable model for retrieving a .dockercfg-compatible JSON blob with credentials.

With this change, the Kubelet will lazily ask for the docker config from a set of DockerConfigProvider extensions each time it needs a credential.

This change provides common implementations of DockerConfigProvider for:
 - "Default": load .dockercfg from disk
 - "Caching": wraps another provider in a cache that expires after a pre-specified lifetime.

GCP-only:
 - "google-dockercfg": reads a .dockercfg from a GCE instance's metadata
 - "google-dockercfg-url": reads a .dockercfg from a URL specified in a GCE instance's metadata.
 - "google-container-registry": reads an access token from GCE metadata into a password field.
2014-11-17 21:46:54 -08:00
Victor Marmol 6908c9ca4a Merge pull request #2407 from eparis/cadvisor-0.5.0
Cadvisor 0.5.0
2014-11-17 08:53:36 -08:00
Eric Paris 630acf221c alias cadvisor/client to cadvisor
cadvisor 0.5.0 changes the package from cadvisor to client.  Which of
course conflicts with our own client.  Alias it back to cadvisor.
2014-11-16 21:44:34 -05:00
Eric Tune c770e70495 Factor to function. 2014-11-14 14:09:51 -08:00
Eric Tune 6430250ce8 Send events from kubelet.
Accept argument specifying file with kubernetes_auth file.
Make an api client in kubelet.
Send events to apiserver.
2014-11-14 13:37:20 -08:00
Daniel Smith c67083572b Merge pull request #2268 from erictune/kubelet_local_log_event
Locally log kubelet events
2014-11-10 15:57:07 -08:00
Eric Tune c5d1782c00 Add local logging of kubelet events. 2014-11-10 13:57:13 -08:00
Eric Tune 08c8f2cde1 Record event of kubelet restart re: minion obj. 2014-11-10 13:46:48 -08:00
Erik St. Martin f75f2bbc0f Fixes #1612 kubelet should fail to start if it cannot create rootDir 2014-11-03 14:44:46 -05:00
Brendan Burns 51bf451932 Add container garbage collection. 2014-10-28 12:52:06 -07:00
Daniel Smith 82bbcee8d9 Move port definitions to their own package 2014-10-20 11:28:12 -07:00
Haney Maxwell c0bf974871 Allow disabling non-necessary kubelet and apiserver endpoints 2014-10-09 16:49:27 -07:00
Daniel Smith 1fc92bef53 Load cadvisor connection in background. 2014-10-08 17:06:41 -07:00
Haney Maxwell 4d87159eda Allow etcd config file to be passed to apiserver, kubelet, and proxy 2014-10-07 14:25:54 -07:00
Tim Hockin 0ad0a247c4 Flag-compatible IP type 2014-10-06 11:29:22 -07:00
Johan Euphrosine f91162cf78 kubelet: add --runonce flag, exits after starting pod from the manifest 2014-10-03 18:02:30 -07:00
Clayton Coleman 6881db64a9 Allow configurable Kubelet net image for isolated networks
Public access to the DockerHub is not guaranteed in all environments,
add a flag to the kubelet that allows it to use a different image (like
one on a private registry) as well as only pull the first time the
image is needed.

Fixes #1545
2014-10-02 15:56:03 -04:00
Tim Hockin 1c02af3d16 Kill LivenessProbe.Type 2014-09-27 21:16:30 -07:00
Brendan Burns 3ac706a32e Add a rate limiter, use it to rate limit docker pulls. 2014-09-26 11:55:21 -07:00
Brendan Burns dc5a4a8c3f Refactor to clean up names. 2014-09-16 15:19:02 -07:00
Brendan Burns 5b9e2a55b5 Add a flag to reject privileged containers in the apiserver. 2014-09-16 11:22:32 -07:00
Clayton Coleman 24b5b7e8d3 Merge pull request #1296 from brendandburns/healthz
Add healthz handlers to the controller manager and scheduler
2014-09-15 11:28:02 -04:00
Brendan Burns 99f7a4f25d Add healthz handlers to the controller manager and scheduler 2014-09-12 21:13:33 -07:00
Brendan Burns 46d0cbd645 Add a global flag to enable/disable privileged containers 2014-09-12 09:56:45 -07:00
Filipe Brandenburger 1d8067450c Rename `pkg/version/flag` to `pkg/version/verflag`
This avoids some conflict with the built-in `flag` module in Go. The
module was already being renamed to `verflag` on import anyways, so we
might as well just call it that.

Tested:
- hack/build-go.sh and ran the resulting binaries with -version args.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-08-29 23:19:32 -07:00
brendandburns 1bd4ae0c62 Merge pull request #943 from smarterclayton/only_wait_for_acceptance
Clients must wait for completion of actions
2014-08-20 21:01:21 -07:00
Clayton Coleman 34031dbc6a Remove excessive waiting in kubelet etcd loop
Listen to etcd longer, and wait a shorter time before reconnecting.
No longer an argument to the source.
2014-08-20 18:46:10 -04:00
derekwaynecarr fd8741edf2 Refactor kubelet to use http.ServeMux 2014-08-20 16:08:08 -05:00
Brendan Burns 0caae9c1d4 Add a in container exec based health check. 2014-08-18 12:00:11 -07:00
Clayton Coleman d7f46718a8 Kubelet should have a max think time before auto resync
The sync frequency should be part of the syncLoop and resync no
less often than every X seconds.  The current implementation runs
even if a config update was delivered less than X seconds ago.
2014-08-07 10:40:03 -04:00
Tim Hockin adc9bb9451 Clarify flags for info server startup
Make a distinct flag to enable/disable the server.  Comment on the address
flag.
2014-08-06 17:28:41 -07:00
Yuki Yugui Sonoda 331fd0d986 Extract "pkg/version".PrintAndExitIfRequested() to its own package
because it causes a runtime panic if a binary which has its own implementation
of "-version" flag tries to reuse a package library which indirectly depend on
"pkg/version".

e.g. If such an user-defined binary tires to link "pkg/api" or "pkg/client",
the binary fails with a runtime panic "flag redefined: version".
2014-08-01 15:05:27 +09:00
Victor Marmol 4de48613e7 Change cAdvisor port to 4194.
This is so it doesn't conflict with the default registry address of
5000.
2014-07-31 13:14:00 -07:00
Filipe Brandenburger 7e56609139 Handle -version flag on all commands
Tested: Passed -version argument to kubelet (and all other binaries):
  $ output/go/bin/kubecfg -version
  Kubernetes version 0.1, build 6454a541fd56

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-07-30 18:48:56 -07:00
Danny Jones bfa4642055 Adds a flag to specify root working directory.
--root_dir specifies the directory kubelet will use for it's
procedures. Currently used for volume mounts.
2014-07-24 13:04:05 -07:00
Eric Tune ded67ead1e Make Kubelet type members private and provide New functions. 2014-07-22 14:40:59 -07:00
Clayton Coleman 7767c2a2ac Switch the Kubelet to use kubelet/config
Also transfer the Kubelet from using ContainerManifest.ID to source specific
identifiers with namespacing.  Move goroutine behavior out of kubelet/ and
into integration.go and cmd/kubelet/kubelet.go for better isolation.
2014-07-21 21:27:26 -04:00
Kelsey Hightower dc7ee7c333 normalize -etcd_servers flag across all commands
The -etcd_servers flag is used inconsistently by the Kubernetes commands,
both externally and internally.

This patch fixes the issue by using the same type to represent a list of
etcd servers internally, and declares the -etcd_servers flag consistently
across all commands.

This patch should be 100% backwards compatible with no changes in behavior.
2014-07-20 07:48:47 -07:00
Tim Hockin 4aa1f04b08 Break out small functions in cmd/kubelet 2014-07-19 22:03:46 -07:00
Yuki Yugui Sonoda edac5ce0b8 Fixes golint errors in pkg/kubelet 2014-07-15 22:56:31 +09:00
brendandburns 40c71e8292 Merge pull request #372 from yugui/feature/golint
Fixes Go lint errors.
2014-07-08 12:55:41 -07:00
Johannes 'fish' Ziemke 3fa6c9671d Use docker client lib instead of binary for pulls 2014-07-08 12:21:39 +02:00
Yuki Yugui Sonoda c25f44c137 Fixes golint errors in cmd/. 2014-07-08 16:08:24 +09:00
Daniel Smith 587fb75a7a rearrange RunKubelet's parameters so that address and port are next to each other 2014-07-01 16:47:37 -07:00
Brendan Burns f8060c5b3d Make the docker endpoint a flag. 2014-06-27 17:01:12 -07:00
Tim Hockin 9f9e75f508 Switch to glog for logging, bridge logging to glog.
1) imported glog to third_party (previous commit)
2) add support for third_party/update.sh to update just one pkg
3) search-and-replace:
  s/log.Printf/glog.Infof/
  s/log.Print/glog.Info/
  s/log.Fatalf/glog.Fatalf/
  s/log.Fatal/glog.Fatal/
4) convert glog.Info.*, err into glog.Error*

Adds some util interfaces to logging and calls them from each cmd, which
will set the default log output to write to glog.  Pass glog-wrapped
Loggers to etcd for logging.

Log files will go to /tmp - we should probably follow this up with a
default log dir for each cmd.

The glog lib is sort of weak in that it only flushes every 30 seconds, so
we spin up our own flushing goroutine.
2014-06-24 20:51:57 -07:00
Tim Hockin 7218a4d165 Clarify config file code to be clear that it handles directories. ...
… Add a check for IsRegular() before reading a config path.  Add a comment
about exec.Command("hostname", "-f").
2014-06-23 21:14:15 -07:00
Daniel Smith b850d36166 Fix boilerplate everywhere 2014-06-23 11:32:11 -07:00
Justin Huff d204f76484 Add config dir support to kubelet 2014-06-20 09:31:52 -07:00
Daniel Smith a047dc4930 No underscores in variable names. Add option to set hostname at command line. 2014-06-15 10:24:36 -07:00
Daniel Smith 69acbf5a74 Fix build 2014-06-12 09:35:04 -07:00
Daniel Smith 7c17db672e Move hostname detection logic to allow replacement 2014-06-12 09:35:04 -07:00
David Symonds 7f3989f91b Change flag.Duration descriptions to be unit-free.
flag.Duration permits different durations, not just seconds.
2014-06-11 16:29:35 +10:00
Joe Beda 2c4b3a562c First commit 2014-06-06 16:40:48 -07:00