Commit Graph

693 Commits (5a02fc07d8a943132b9e68fe7169778253318487)

Author SHA1 Message Date
krousey f62a2a1bb6 Merge pull request #9451 from cjcullen/mig
Use Node IP Address instead of Node.Name in minion.ResourceLocation.
2015-06-09 15:52:12 -07:00
James DeFelice 257bc9b1a3 add GetRuntime() to simplify integration with 3rd party kubelet extensions like kubernetes-mesos 2015-06-09 13:27:34 +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
Yifan Gu f197a9db4e kubelet: Minor refactors.
Remove some TODOs.
Unexport DockerManager.Puller and DockerManager.PodInfraContainerImage.
Add "docker" for all "go-dockerclient" imports.
2015-06-04 16:08:45 -07:00
Brian Grant f72fa67924 Revert "Use Node IP Address instead of Node.Name in minion.ResourceLocation." 2015-06-03 18:19:22 -07:00
Daniel Smith 3f454b7599 remove ro refs from more places 2015-06-03 15:41:09 -07:00
Brian Grant 36a4ece87a Merge pull request #9080 from thockin/dns-new-search-kubelet
Insert 'svc' into the DNS search paths
2015-06-02 22:54:07 -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
Filip Grzadkowski 98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02:00
Brian Grant 8a9700b2ba Merge pull request #8864 from ncdc/pluggable-docker-exec
Add support for pluggable Docker exec handlers
2015-06-02 14:13:06 -07:00
Brian Grant 0a28edf6e7 Merge pull request #8698 from vmarmol/with-limits
Reserve node resources for node services
2015-06-02 13:05:29 -07:00
Tim Hockin a826529573 Insert 'svc' into the DNS search paths
Fixes #8569.

This requires the DNS server to be running kube2sky v1.6 or higher (part of
release 0.18).  Users with older kube2sky MUST NOT update to this kubelet until
they upgrade DNS.  Versions of kube2sky >= 1.6 support both old and new style
names.  Old style names are deprectaed and will be removed around the time of
kubernetes v1.0 release.
2015-06-01 17:02:17 -07:00
Clayton Coleman 72ee028cab Gracefully delete pods from the Kubelet
This commit wires together the graceful delete option for pods
on the Kubelet.  When a pod is deleted on the API server, a
grace period is calculated that is based on the
Pod.Spec.TerminationGracePeriodInSeconds, the user's provided grace
period, or a default.  The grace period can only shrink once set.
The value provided by the user (or the default) is set onto metadata
as DeletionGracePeriod.

When the Kubelet sees a pod with DeletionTimestamp set, it uses the
value of ObjectMeta.GracePeriodSeconds as the grace period
sent to Docker.  When updating status, if the pod has DeletionTimestamp
set and all containers are terminated, the Kubelet will update the
status one last time and then invoke Delete(pod, grace: 0) to
clean up the pod immediately.
2015-06-01 19:23:59 -04: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 7283e662b5 Introduce SystemContainer to Kubelet ContainerManager.
This generalizes the handling of containers in the
ContainerManager.

Also introduces the ability to determine how much
resources are reserved for those system containers.
2015-05-29 17:32:34 -07:00
Rohit Jnagal 233ce46b83 Merge pull request #8923 from caesarxuchao/TerminationToTerminated
Update ContainerState.Termination to ContainerState.Terminated
2015-05-29 14:51:09 -07:00
Rohit Jnagal 50b9d6284a Merge pull request #8681 from vmarmol/system-container
Create a system container
2015-05-29 09:41:06 -07:00
Chao Xu 2f6e5e2e08 Update ContainerState.Termination to ContainerState.Terminated in pkg/api/types.go and pkg/api/v1/types.go 2015-05-28 17:18:24 -07:00
Tim Hockin bade36c7dd Merge pull request #8826 from markturansky/b2d_fix
Fixed setNodeStatus to allow running on pods on OS X
2015-05-28 16:54:42 -07:00
Tim Hockin 4318ca5a8b Rename 'portal IP' to 'cluster IP' most everywhere
This covers obvious transforms, but not --portal_net, $PORTAL_NET and
similar.
2015-05-28 16:10:44 -07:00
Federico Simoncelli 2a89428d44 api: add the ProviderID attribute to NodeSpec
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-05-28 13:01:58 -04:00
markturansky 8aa3cb22b5 added pod capacity to node.Status when cadvisor unavailable. defaults to kubelet's pod list length 2015-05-28 10:53:08 -04:00
Paul Morie 8b338860aa Make kubelet expand var refs in cmd, args, env 2015-05-27 00:13:57 -04:00
Victor Marmol 9a2630ac6e Make system container name configurable. 2015-05-26 20:49:55 -07:00
Victor Marmol ddec34a000 Have the ContainerManager create a system container.
The system container is a resource-only container which contains all
non-kernel processes that are not already part of a container. This will
allow monitoring of their resource usage and limiting it (eventually).
2015-05-26 20:49:55 -07:00
CJ Cullen 197115853e Report node.Ready == false until cbr0 is configured correctly 2015-05-26 10:48:29 -07:00
Dawn Chen 677a4aa1a7 Merge pull request #8164 from cjcullen/cloudprovider
Route creation reconciler loop.
2015-05-22 12:27:50 -07:00
David Oppenheimer 6b428ef1a8 Merge pull request #7170 from simon3z/node-events
Node events recording fixes
2015-05-21 12:54:38 -07:00
Dawn Chen 0710976d43 Merge pull request #8490 from thockin/diff-proto
Allow same-hostport-different-protocol
2015-05-21 09:16:16 -07:00
Federico Simoncelli fefc65164a kubelet: fix node ready condition logic
Fixes #8585

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-05-20 20:03:57 -04:00
Federico Simoncelli 2f503c57a5 nodecontroller: improve node status event recording
This patch substitutes the misleading reason "unknown" for the event
recording. For symmetry with kubelet's message "online" the conditions
Unknown and False are reported as "offline".

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-05-20 18:46:01 -04: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
Tim Hockin 9117a757e2 Revert "Introduce an 'svc' segment for DNS search" 2015-05-20 09:04:15 -07:00
Eric Tune 1f4172d23c Merge pull request #6949 from roberthbailey/node-register
Modify nodes to register directly with the master.
2015-05-19 11:29:43 -07:00
Daniel Smith 181124bc9b Merge pull request #7974 from deads2k/attach-pull-secrets-to-pods
Attach pull secrets to pods
2015-05-19 10:26:39 -07:00
Tim Hockin 711fa2f2c6 fix 2015-05-19 10:17:53 -07:00
Tim Hockin c7bf373d98 Allow same-hostport-different-protocol 2015-05-19 10:00:35 -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
Brian Grant 2c81050e6f Merge pull request #8457 from davidopp/master
Fix stylistic isues with #5547. Closes #4910.
2015-05-19 07:43:21 -07:00
David Oppenheimer 44b1e1ca0c Fix stylistic isues with #5547. Closes #4910. 2015-05-18 23:32:06 -07:00
Victor Marmol c5da035d51 Merge pull request #8421 from yujuhong/active_deadline
Kubelet: move active deadline check to per pod worker
2015-05-18 17:42:21 -07:00
Vish Kannan c5f7ee6f96 Merge pull request #8430 from vmarmol/logging
Don't run OOM watcher is cAdvisor is not available.
2015-05-18 14:41:24 -07:00
Yu-Ju Hong 2bf0646c76 Kubelet: do not remove directories of terminated pods
We recently changed `SyncPods` to filter out terminated pods at the beginning
for two reasons:

 * performance: kubelet no longer keeps goroutines to checks containers for
   terminated pods.
 * correctness: kubelet relies on inspecting dead containers to generate
   pod status. Because dead containers may get garbage collected and
   kubelet does not have checkpoints yet, syncing terminated pod could
   lead to modifying the status of a terminated pod.

However, even though kubelet should not *sync* the terminated pods, it
should not attempt to remove the directories and volumes for such
pods as long as they have not been deleted. This change fixes aggresive
directory removal by passing all pods (including terminated pods) to the
cleanup functions.
2015-05-18 13:23:49 -07:00
deads2k 0c14e0cbdb add pull secret references to pods 2015-05-18 16:18:16 -04:00
Victor Marmol 4a1100bb66 Don't run OOM watcher is cAdvisor is not available.
Fixes #8424.
2015-05-18 12:18:12 -07:00
Victor Marmol 45874d5f76 Merge pull request #5547 from gmarek/client3
Add a resource specifying number of Pods that are allowed to run on Kubelet.
2015-05-18 11:11:43 -07:00
Yu-Ju Hong 050b8ba60b Kubelet: move active deadline check to per pod worker
Per-pod workers have sufficient knowledge to determine whether a pod has
exceeded the active deadline, and they set the status at the end of each sync.
Move the active deadline check to generatePodStatus so that per pod workers
can update the pod status directly. This eliminates the possibility of a race
condition where both SyncPods and the pod worker are updating the status, which
could lead to temporary erratic pod status behavior (pod phase: failed ->
running -> failed).
2015-05-18 10:52:41 -07:00
Yu-Ju Hong 25668ccc11 Kubelet: remove the getPodstatus method
Pod statuses are periodically writtien to the status manager, and status
manager sets the start time of the pod. All non-status-modifying code should
perform cache lookup and should not attempt to generate pod status on its own.
2015-05-18 10:52:36 -07:00