Commit Graph

71 Commits (b1e4831265f8219d7bfed350245e3e304490043b)

Author SHA1 Message Date
Random-Liu 2ea11690b8 Remove running pod from SyncPod() of container runtime 2016-01-04 10:18:46 -08:00
Random-Liu b2a72ca384 Change my TODO to be the same with others 2015-12-31 00:41:05 -08:00
Tim St. Clair 89bc7992f9 Refactor kubelet server into its own package
Refactor Kubelet's server functionality into a server package. Most
notably, move pkg/kubelet/server.go into
pkg/kubelet/server/server.go. This will lead to better separation of
concerns and a more readable code hierarchy.
2015-12-15 10:20:38 -08:00
Random-Liu 3cbdf79f8c Change original PodStatus to APIPodStatus, and start using kubelet internal PodStatus in dockertools 2015-12-04 17:37:39 -08:00
Yu-Ju Hong 760309f349 kubelet: add RawPodStatus and related functions
RawPodStatus will be the internal status of the pod that kubelet relies on for
syncing.
2015-11-17 17:04:05 -08:00
Yu-Ju Hong 3beae6b70b Add Status in the runtime Container type
This is necessary for the generic PLEG to distinguish container events.
2015-11-13 09:55:36 -08:00
Dawn Chen a39e1e96dc Mark NodeNotReady for docker version below 1.6.2 2015-10-30 13:48:51 -07:00
mqliang 5b03cfc92b replace fmt.Sptintf() with + operator 2015-10-29 16:27:42 +08:00
Sami Wagiaalla 1d352a16b8 Support volume relabling for pods which specify an SELinux label 2015-10-28 09:26:58 -04:00
Vishnu kannan 94b45830c3 make kubelet image pulls serialized by default. 2015-10-20 14:50:44 -07:00
k8s-merge-robot 916ddbca65 Merge pull request #14182 from jiangyaoguo/distinguish-registry-unavailable-and-pull-failure
Auto commit by PR queue bot
2015-10-16 16:22:22 -07:00
feisky d624c7de51 Pass the ContainerGCPolicy in Runtime.GarbageCollect 2015-10-09 06:57:10 +08:00
feisky 35cf8ab7d4 Use runtime instread of dockerclient in container gc 2015-10-09 06:54:38 +08:00
jiangyaoguo af46c69553 Distinguish image registry unavailable and pull failure 2015-10-09 01:16:31 +08:00
Piotr Szczesniak 95b293c615 Merge pull request #13516 from samsabed/backoff-image-reason
backoff image pulling on failure
2015-10-08 13:05:32 +02:00
Tim St. Clair 551eff63b8 Use strong type for container ID
Change all references to the container ID in pkg/kubelet/... to the
strong type defined in pkg/kubelet/container: ContainerID

The motivation for this change is to make the format of the ID
unambiguous, specifically whether or not it includes the runtime
prefix (e.g. "docker://").
2015-10-07 10:58:05 -07:00
Sam Abed fdf712cd84 back-off image pull on failure
Signed-off-by: Sam Abed <samabed@gmail.com>
2015-10-07 21:12:42 +11:00
Clayton Coleman c2e90cd154 Support extended pod logging options
Increase the supported controls on pod logging. Add validaiton to pod
log options. Ensure the Kubelet is using a consistent, structured way to
process pod log arguments.

Add ?sinceSeconds=<durationInSeconds>, &sinceTime=<RFC3339>, ?timestamps=<bool>,
?tailLines=<number>, and ?limitBytes=<number>
2015-09-21 15:39:32 -04:00
Sam Abed 995cb15bb6 back off restarts of crashlooping containers
Signed-off-by: Sam Abed <samabed@gmail.com>
2015-08-24 21:43:17 +10:00
Clayton Coleman f5c4a3e7a6 Handle graceful termination in the Kubelet
Supports pods that are gracefully deleted on the server being
handled in the Kubelet

preStop is limited to the grace period of the pod in execution.
2015-08-21 10:18:21 -04:00
Yifan Gu 69f796f234 kubelet: refactor kubecontainer.Pod, remove PodStatus from it. 2015-08-18 16:27:22 -07:00
Yifan Gu d70a30c069 kubelet: refactor kubelet.Runtimehooks to container.ImagePuller. 2015-08-12 16:28:25 -07:00
Yifan Gu eb0fb43453 kubelet: Add image pulling event.
Since it takes a while (1-2mins) for kubelet to pulling a big image
(>500MB). Just showing "Pending" for pod status is not very helpful.

This commit introduces a "pulling" event, and inserts it before the
kubelet starts to pull an image.
2015-08-07 10:50:39 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Brendan Burns 64be76c14d Add support for Attach to the kubelet.
This is a pre-cursor to supporting 'kubectl attach ...' and 'kubectl run -it ...'
2015-07-27 21:48:55 -07:00
Yu-Ju Hong de75a42cb2 Add a kubelet /runningpods endpoint
/runningpods returns a list of pods currently running on the kubelet. The list
is composed by examining the container runtime, and may be different from the
desired pods to run known by kubelet.

This is useful for tests to verify that pods are indeed deleted on nodes.
2015-06-29 11:29:23 -07:00
Prashanth Balasubramanian af175cc00b Add a pod status equality method to the status manager. 2015-06-22 13:49:49 -07:00
Yifan Gu 6ddffdd736 kubelet: Move TestPortForwardNoSuchContainer() to dockertools package.
Also refactor TestPortForward() to be neutral to container runtime.
2015-06-19 10:28:27 -07:00
Filip Grzadkowski 98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02: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
deads2k 0c14e0cbdb add pull secret references to pods 2015-05-18 16:18:16 -04:00
Yifan Gu d164ac0ba0 kubelet/container: Refactor RunContainerOptions.
Make Envs, Mounts, PortMappings more generic.
Also add default name for PortMapping if it's not specified.
2015-05-13 10:01:00 -07:00
Yifan Gu a2dac158c2 kubelet/container: Remove ipcMode and netMode from RunContainerOptions.
Since createPodInfraContainer() is moved into dockertools. There is no
need to pass the ipcMode or netMode via RunContainerOptions.
2015-05-12 14:18:00 -07:00
Yifan Gu 7831b7da72 kubelet/container: Move prober.ContainerCommandRunner to container.
Also include the ContainerCommandRunner in Runtime interface, but
still keep the ContainerCommandRunner interface for testability.
2015-05-11 15:32:51 -07:00
Yifan Gu 8715c54bd3 kubelet/container: Move kubelet.volumeMap to container.VolumeMap.
This is a quick fix to solve circular dependency problem when
rkt references volume maps.
2015-05-06 16:50:57 -07:00
Paul Morie df08b15121 Change signature of container runtime PullImage to allow pull w/ secret 2015-05-06 17:42:03 -04:00
Victor Marmol ba7e940a57 Make rkt implement the container Runtime 2015-05-04 11:16:33 -07:00
Victor Marmol 79fc8bee34 Change GetContainerLogs() signature.
This works for both runtimes. We need to eventually unify the ID scheme
for this method.
2015-05-04 11:16:32 -07: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
Yu-Ju Hong 4fe3366b04 Removes RunPod in the Runtime interface
SyncPod subsumes RunPod, so the latter is no longer needed.
After this change, DockerManager implements the Runtime interface.
2015-05-01 14:47:04 -07:00
Vish Kannan cadfde0bd1 Merge pull request #7277 from guenter/cgroup-parent
Add --cgroup_parent flag to Kubelet to set the parent cgroup for pods
2015-05-01 10:24:58 -07:00
Victor Marmol 6316b485ad Add SyncPod() and remove Kill/Run InContainer().
SyncPod allows us to abstract away how a pod is started and updated. It
also simplifies what the runtime has to implement.
2015-05-01 00:32:29 -07:00
Yu-Ju Hong 83c599e4d4 Add image-related methods to DockerManager
This change is part of the efforts to make DockerManager implement the Runtime
interface.

The change also modifies the interface slightly to work with existing
code, and aggregates the type converting functions to convert.go.
2015-04-30 13:27:52 -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
Yu-Ju Hong 176fc9b9c6 Remove GetContainers from Runtime interface
This function is no longer considered needed.
2015-04-30 09:33:23 -07:00
Yu-Ju Hong de32785e2e Merge pull request #7532 from vmarmol/runtime-images
Add image-related methods to Runtime interface.
2015-04-30 09:30:59 -07:00
Victor Marmol 090d0c95fa Remove ImagePull metric in Kubelet.
There is an equivalent metric from our Docker metrics and this one is
harder to maintain with the RuntimeHooks.
2015-04-29 17:12:03 -07:00
Victor Marmol 61d51243c5 Add RuntimeHooks interface and Kubelet implementation.
This interface will be used to inject functionality and logic into the
runtimes that should be shared accross runtimes.
2015-04-29 17:06:49 -07:00
Victor Marmol 4d09b79529 Add image-related methods to Runtime interface.
This includes RemoveImage() and ListImages().
2015-04-29 16:00:36 -07:00