Commit Graph

480 Commits (46eca25d719ef6262c9d307872d8ec73bcdae76b)

Author SHA1 Message Date
Rohith c2526c93fa - adding the -node-label flag to the kubelet which allows for a initial tagging / labelling of the node on cluster registration
- the labels can come from a series of key=pair value or file:///path_to_file which contains key pairs
2015-11-18 23:20:58 +00:00
Jeff Lowdermilk 70d89a3541 Merge pull request #13571 from yujuhong/lifecycle_v0
kubelet: add a generic pod lifecycle event generator
2015-11-16 14:59:40 -08:00
k8s-merge-robot 7fa85d430b Merge pull request #16614 from pmorie/ro-managed
Auto commit by PR queue bot
2015-11-16 10:46:44 -08:00
k8s-merge-robot 081b21687e Merge pull request #16261 from zhengguoyong/update_condition
Auto commit by PR queue bot
2015-11-16 02:34:18 -08:00
Paul Morie 911757486d Refactor volume.Builder.IsReadOnly() to volume.Builder.GetAttributes() 2015-11-13 23:34:48 -05:00
Yu-Ju Hong bc6414a873 kubelet: add a generic pod lifecycle event generator
This change introduces pod lifecycle event generator (PLEG), and adds a generic
PLEG. The generic PLEG relies on relisting to discover container events, and is
container-runtime-agnostic. Both docker and rkt are changed to use generic
PLEG.
2015-11-13 09:55:36 -08:00
k8s-merge-robot e88593d788 Merge pull request #14542 from vishh/kubelet-refactor
Auto commit by PR queue bot
2015-11-12 15:24:22 -08:00
Vishnu kannan b1770537ab Make cadvisor startup synchronous with container runtime initialization.
This is hopefully a temporary workaround.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2015-11-11 15:20:13 -08:00
Vishnu kannan 4ad3d6f5fe Move container manager into a separate package.
Inject container manager into Kubelet. This lets us stub out container
manager during integration testing.
2015-11-11 15:00:37 -08:00
Vishnu kannan 89c3cb2f43 refactor podCIDR handling in kubelet to runtime state 2015-11-11 15:00:37 -08:00
Vishnu kannan 5f4570b764 handling locks and update tests. Fail node if network is not initialized 2015-11-11 15:00:37 -08:00
Vishnu kannan cf56f7a8ef Refactoring kubelet to separate object creation from object logical initialization. 2015-11-11 15:00:34 -08:00
Lantao Liu d6b93cdfe1 Move active deadline check into main syncLoop of kubelet. 2015-11-11 10:05:04 -08:00
eulerzgy 3f630d8ad7 when pod has successed, update condition to PodCompleted 2015-11-10 15:37:44 +08:00
k8s-merge-robot fb571e3e2e Merge pull request #16545 from timstclair/mirrorpods
Auto commit by PR queue bot
2015-11-05 02:56:23 -08:00
Tim St. Clair 858126b42a Clean up static/mirror pod status logic
- status.Manager always deals with the local (static) pod, but gets the
  mirror pod when syncing
  - This lets components like the probe workers ignore mirror pods
2015-11-04 11:42:25 -08:00
Yu-Ju Hong b734155954 Clean up housekeeping routine in kubelet
Now that kubelet checks sources seen correctly, there is no need to enforce the
initial order of pod updates and housekeeping. Use a ticker for housekeeping to
simplify the code.
2015-11-04 08:12:18 -08:00
Yu-Ju Hong 2eb17df46b kubelet: independent pod syncs and backoff on error
Currently kubelet syncs all pods every 10s. This is not preferred because
 * Some pods may have been sync'd recently.
 * This may cause all the pods to be sync'd at once, causing undesirable
   CPU spikes.

This PR replaces the global syncs with independent, periodic pod syncs. At the
end of syncing, each pod worker will enqueue itslef with a future timestamp (
current time + sync interval), when it will be due for another sync.
 * If the pod worker encoutners an sync error, it may requeue with a different
   timestamp to retry sooner.
 * If a sync is triggered by the update channel (events or spec changes), the
   pod worker would enqueue a new sync time.

This change is necessary for moving to long or no periodic sync period once pod
lifecycle event generator is completed. We will still rely on the mechanism to
requeue the pod on sync error.

This change also makes sure that if a sync does not succeed (either due to
real error or the per-container backoff mechanism), an error would be propagated
back to the pod worker, which is responsible for requeuing.
2015-11-03 13:29:08 -08:00
Dawn Chen a39e1e96dc Mark NodeNotReady for docker version below 1.6.2 2015-10-30 13:48:51 -07:00
Sami Wagiaalla 1d352a16b8 Support volume relabling for pods which specify an SELinux label 2015-10-28 09:26:58 -04:00
Daniel Smith 8524d392bf Merge pull request #16178 from madhusudancs/kubelet-out-of-disk-no-master
Report node out of disk condition in the kubelet.
2015-10-27 14:28:03 -07:00
k8s-merge-robot 0a7a9f3535 Merge pull request #16340 from timstclair/flaky-prober
Auto commit by PR queue bot
2015-10-27 12:10:22 -07:00
k8s-merge-robot df265b2d6e Merge pull request #15510 from aveshagarwal/master-selflink-objref
Auto commit by PR queue bot
2015-10-27 00:37:21 -07:00
Tim St. Clair 17b0a964f4 Always resync after resyncInterval 2015-10-26 18:50:57 -07:00
Madhusudan.C.S 9c4424f0bd Report out of disk as a node condition when node goes out of disk.
Define a new out of disk node condition and use it to report when node
goes out of disk.

Make a copy of loop range clause variable in node listers so that it
is available outside the for loop.

Also update/implement unit tests.
2015-10-26 15:01:20 -07:00
Tim Hockin 42c7fec490 Add a cloud-provider hook to scrub DNS for pods
GCE needs this hook and it seems general enough to include.
2015-10-23 17:01:49 -07:00
Abhishek Shah ba6469d478 kubelet manages /etc/hosts file 2015-10-22 13:27:05 -07:00
k8s-merge-robot 6dc3dcf36a Merge pull request #15414 from thockin/exp-beta-annotations
Auto commit by PR queue bot
2015-10-20 17:45:32 -07:00
Tim St. Clair a263c77b65 Refactor liveness probing
This commit builds on previous work and creates an independent
worker for every liveness probe. Liveness probes behave largely the same
as readiness probes, so much of the code is shared by introducing a
probeType paramater to distinguish the type when it matters. The
circular dependency between the runtime and the prober is broken by
exposing a shared liveness ResultsManager, owned by the
kubelet. Finally, an Updates channel is introduced to the ResultsManager
so the kubelet can react to unhealthy containers immediately.
2015-10-19 15:15:59 -07:00
k8s-merge-robot 09a3871506 Merge pull request #15755 from zhengguoyong/del_capatical_packagename_for_cadvisorApi2
Auto commit by PR queue bot
2015-10-18 04:04:11 -07:00
Dawn Chen 6f46780cbf Add tests to reproduce the issue and verify the fix. 2015-10-16 15:16:07 -07:00
eulerzgy 31c09bdcb8 Del capatical local packagename for cadvisorApi 2015-10-16 11:03:50 +08:00
Tim Hockin 2f4c3035be Change to alpha/beta for bandwidth annotations 2015-10-14 15:33:19 -07:00
Yu-Ju Hong 2c76c55bb9 kubelet: move PodManager and MirrorClient to a subpackage
This change moves pod_manager.go and mirror_client.go to a separate package.
Also made necessary, minor changes to facilitate testing.
2015-10-12 16:34:18 -07:00
Avesh Agarwal 8e4a8b7260 Addresses issue #6596.
Removes ForTesting_ReferencesAllowBlankSelfLinks.
Fixes controller's persistentvolumes unit tests.
2015-10-12 19:21:48 -04:00
Yu-Ju Hong a3e60cc32e Rename imported package local name kubeletTypes to kubetypes
According to the naming guidelines, package name should not include mixedCaps.
2015-10-09 10:24:31 -07:00
k8s-merge-robot 45cca144cb Merge pull request #15167 from yujuhong/sources_seen
Auto commit by PR queue bot
2015-10-09 08:35:40 -07:00
Yu-Ju Hong 098ab05997 kubelet: move common types to kubelet/types
This would faciliate tasks such as moving code in pkg/kubelet to sub packages.
2015-10-08 14:38:01 -07: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
Yu-Ju Hong 5abdfcdfe6 kubelet: fix all sources ready condition
The current implementation considers a source seen when it receives a SET at
kubelet/config/config.go. However, the main kubelet sync loop may not have
received the pod update from the source via the channel. This change ensures
that kubelet would consider all sources are ready only after the sync loop has
seen all the sources.
2015-10-06 10:13:04 -07:00
Paul Morie 227dd82119 Add PodSecurityContext and backward compatibility tests 2015-10-05 21:05:27 -04:00
Tim St. Clair 52ece0c34e Refactor readiness probing
Each container with a readiness has an individual go-routine which
handles periodic probing for that container. The results are cached, and
written to the status.Manager in the pod sync path.
2015-10-02 15:37:10 -07:00
nikhiljindal b99d225d19 Setting PodReadyCondition.LastTransitionTime 2015-09-29 17:23:32 -07:00
Vishnu kannan 77be271ed0 Linux container manager initialization will now fail if cpu and memory cgroups are not mounted. 2015-09-24 15:34:42 -07:00
Eric Tune de38de0c1a Merge pull request #14064 from brendandburns/flakes
Increase a bunch of timeouts to reduce flakes
2015-09-23 12:56:27 -07:00
Brendan Burns 77fd388485 Increase a bunch of timeouts to reduce flakes 2015-09-23 11:09:03 -07:00
gmarek 66ca7fcc92 Functionally revert #12894 2015-09-23 12:15:38 +02:00
Eric Tune f92da0c714 Merge pull request #14323 from brendandburns/flakes2
Fix a flake in the kubelet test.
2015-09-22 13:36:22 -07:00
Brendan Burns e845c6a4e6 Fix a flake in the kubelet test. 2015-09-21 16:45:21 -07:00
Yu-Ju Hong 077158ef86 Rebase to use unversioned api 2015-09-21 11:14:14 -07:00