Tim Hockin
c40dd59130
Merge pull request #8885 from lavalamp/no-ro-kubelettest
...
remove RO port from kubelet test
2015-05-27 16:25:33 -07:00
Brendan Burns
2ec4b409e1
Make exec more consistent with the rest of the kubectl commands.
2015-05-27 15:47:32 -07:00
Daniel Smith
ddcd2c89de
remove RO port from kubelet test
2015-05-27 13:46:32 -07:00
Yu-Ju Hong
d9339fedbe
Modify more tests to use FakeRuntime in kubelet_test.go
2015-05-27 13:01:45 -07:00
Yu-Ju Hong
697312bcd7
Migrate more docker-specific tests to dockertools/manager_test.go
2015-05-27 12:42:59 -07:00
Yu-Ju Hong
044894665d
Delete TestSyncPodsDeletes in kubelet_test.go
...
This test verifies that kubelet doesn't kill non-kubelet-managed containers.
This is obsolete now since container runtime provides only the KillPod
function, and has no support for killing a container.
2015-05-27 10:02:52 -07:00
Yu-Ju Hong
ef5bef914f
Kubelet: switch cadvisor-related unit tests to use FakeRuntime
2015-05-27 09:58:50 -07: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
Saad Ali
9ca4fb40dc
Merge pull request #8844 from yujuhong/kubelet_unittest
...
Kubelet: clean up unit tests
2015-05-26 18:29:48 -07:00
Yu-Ju Hong
9a71fb9373
Kubelet: clean up kubelet_test.go
...
* Start using FakeRuntime to replace FakeDockerClient in unit tests.
* Move and adapt docker-specific tests (e.g. creating/deleting infra
containers) to manager_test.go in dockertools.
2015-05-26 17:11:24 -07:00
Yu-Ju Hong
8ea88d58d4
Kubelet: make FakeRuntime implement Runtime
...
We should start using FakeRuntime in kubelet_test.go. First, make it implement
Runtime correctly.
2015-05-26 16:49:46 -07:00
CJ Cullen
197115853e
Report node.Ready == false until cbr0 is configured correctly
2015-05-26 10:48:29 -07:00
Robert Bailey
3302628db3
Fix kubelet tests for systems without functional dns to look up localhost.
2015-05-22 14:32:51 -07:00
Dawn Chen
677a4aa1a7
Merge pull request #8164 from cjcullen/cloudprovider
...
Route creation reconciler loop.
2015-05-22 12:27:50 -07:00
Tim Hockin
a29240f2c5
reduce verbosity of log line
2015-05-21 13:09:18 -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
017fb6a818
Merge pull request #8575 from yifan-gu/kube_refactor
...
Minor kubelet/rkt refactors
2015-05-21 09:37:31 -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
Dawn Chen
9a5b05312f
Merge pull request #8238 from thockin/probe-logs
...
Better kubelet logging for probes
2015-05-21 09:11:11 -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
Yifan Gu
6a5681e0fe
kubelet: Move HashContainer to kubelet/container package.
2015-05-20 12:08:32 -07:00
Tim Hockin
9117a757e2
Revert "Introduce an 'svc' segment for DNS search"
2015-05-20 09:04:15 -07:00
Tim Hockin
75617e8760
Better kubelet logging for probes
...
Log when we actually run probes and event when they fail. Print the output of
a probe, too.
2015-05-20 08:56:45 -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
Dawn Chen
349d8b1a67
Merge pull request #8491 from vmarmol/fix-isolation
...
Fix setting resource isolation in Docker 1.6+
2015-05-19 11:26:27 -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
deads2k
72c0709f18
reduce scope of DockerConfigEntryWithAuth
2015-05-19 12:41:03 -04:00
Victor Marmol
deaa0e569d
Set CPU and memory in Create() and Start().
...
This allows for backwards and forwards compatability since old Docker
versions expect it in Create() and newer ones do so in Start().
Fixes #8358
2015-05-19 09:26:15 -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
deads2k
5458f05679
create LocalObjectReference
2015-05-19 08:39:46 -04:00
David Oppenheimer
44b1e1ca0c
Fix stylistic isues with #5547 . Closes #4910 .
2015-05-18 23:32:06 -07:00
Brian Grant
03535478a2
Merge pull request #8440 from thockin/api-type-names
...
Rename a few API types (non-breaking change)
2015-05-18 18:48:16 -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
Tim Hockin
65833e42c4
rename CapabilityType Capability
2015-05-18 17:21:30 -07:00
Paul Morie
a58c7a0de7
rename rkt makeruntimePod
2015-05-18 19:24:10 -04: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
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
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
Satnam Singh
26b27b5e0f
Merge pull request #8374 from jimmidyson/docker-log-symlink-separator
...
Docker log symlinks should use underscore separator
2015-05-18 08:59:07 -07:00
Michal Fojtik
7d11e226b7
Disable 'Timestamps' in Docker logs to prevent double-timestamps
2015-05-18 12:27:19 +02:00
Clayton Coleman
1f628f2340
Bump fake docker version to emulate Docker 1.6
2015-05-16 16:10:49 -04:00
Jimmi Dyson
2d4067f1fd
Fixes #8374 : Underscore separator in docker log symlink
2015-05-16 19:19:27 +01:00
Yu-Ju Hong
e1a153e841
Merge pull request #8340 from dchen1107/clean
...
Wait for docker to start cadvisor.
2015-05-15 14:36:10 -07:00
Yu-Ju Hong
b8dd790ca1
Merge pull request #8284 from yifan-gu/rkt_fix
...
kubelet/rkt: Fix rkt status parsing, and resource requirement convert…
2015-05-15 14:30:48 -07:00
Yifan Gu
aa7393b55e
kubelet/rkt: Fix rkt status parsing, and resource requirement convertion.
2015-05-15 13:42:36 -07:00
derekwaynecarr
8216332611
Kubelet kills a pod that exceeds ActiveDeadlineSeconds
2015-05-15 16:33:37 -04:00
Dawn Chen
85ca8506bb
Wait for docker to start cadvisor.
2015-05-15 13:24:24 -07:00
Victor Marmol
43e4654333
Merge pull request #8292 from yujuhong/rm_podinfo
...
Remove /podInfo endpoint on kubelet
2015-05-15 08:42:02 -07:00
Victor Marmol
e7750fa0c7
Merge pull request #8274 from yujuhong/filter_terminated
...
kubelet: filter out terminated pods before rejecting pods
2015-05-15 08:02:44 -07: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
Victor Marmol
296152ec6d
Merge pull request #8281 from dchen1107/cleanup
...
OOM protected docker processes (-900)
2015-05-14 18:26:30 -07:00
Yu-Ju Hong
4b40db3367
Remove /podInfo endpoint on kubelet
...
Kubelet sends pod status updates to the API server now. This endpoint is no
longer needed.
2015-05-14 17:51:26 -07:00
Dawn Chen
ebbb130af8
OOM protected docker processes (-900)
2015-05-14 15:49:12 -07:00
Victor Marmol
353f304433
Merge pull request #8228 from yifan-gu/rkt_image_cat
...
kubelet/rkt: Add getImageManifest()
2015-05-14 13:32:52 -07:00
Yu-Ju Hong
a2d04a84de
kubelet: filter out terminated pods before rejecting pods
...
Currently, kubelet doesn't filter out terminated pods before determining whether
a pod fits. This could lead to duplicated events for rejecting the pods. This
change fixes that.
This change also groups all related pod fitness checking functions into one
function to improve readability.
2015-05-14 13:02:36 -07:00
Yifan Gu
daf7c8d686
kubelet/rkt: Use RunContainerOptions to get the arguments.
2015-05-14 12:03:11 -07:00
Yifan Gu
2a87d56171
kubelet/rkt: Add getImageManifest() to retrive the image manifest for container.
2015-05-14 12:03:11 -07:00
Rohit Jnagal
532f6fdcef
Merge pull request #7955 from hurf/refactor_scheduler
...
Move pkg/scheduler to plugin/pkg/scheduler
2015-05-14 10:28:52 -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
67eab52b9e
Merge pull request #8146 from yifan-gu/runtime_opt
...
kubelet/container: Refactor RunContainerOptions.
2015-05-13 11:09:56 -07:00
Yifan Gu
2617cb26b8
kubelet/container: Add tests for kubelet.makePortMappings().
2015-05-13 10:01:01 -07: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
Victor Marmol
67d576cf48
Merge pull request #8161 from rjnagal/rc
...
Use non-root available space to trigger out-of-disk events.
2015-05-13 08:07:37 -07:00
hurf
6203ce9f85
Move pkg/scheduler to plugin/pkg/scheduler
...
As the TODO in plugin/pkg/scheduler/scheduler.go described:
move everything from pkg/scheduler into this package. Remove
references from registry.
2015-05-13 14:03:25 +08:00
CJ Cullen
31ea7d1295
Put cbr0-modifying stuff behind a flag. Address some other comments.
2015-05-12 23:00:28 -07:00
CJ Cullen
5e3d2b9138
Kubelet configure cbr0 instead of configure-vm.sh
2015-05-12 23:00:12 -07:00
Rohit Jnagal
7a2add5e0a
Use non-root available space to trigger out-of-disk events.
2015-05-13 05:46:03 +00:00
Brendan Burns
3f49c556e6
Second try at implementing prestop.
2015-05-12 17:17:03 -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
Victor Marmol
3481db8aee
Merge pull request #8136 from yifan-gu/runtime_opt
...
kubelet/container: Remove ipcMode and netMode from RunContainerOptions.
2015-05-12 14:41:49 -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
Paul Morie
6ac55002d8
Improve kubelet test for env vars
2015-05-12 17:14:32 -04: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
Vish Kannan
a74522a738
Merge pull request #8011 from brendandburns/exec
...
Switch exec to look at exit code not output status.
2015-05-12 12:43:11 -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
Victor Marmol
a9db69ecfa
Implementation of ContainerManager
...
Implementation maintains a thread which ensures that the Docker daemon
is in a container.
2015-05-12 09:59:47 -07:00
Victor Marmol
0570480242
Kubelet: Add ContainerManager interface.
...
This component will manage containers on the machine not managed by the
runtime.
2015-05-12 09:58:21 -07:00
Rohit Jnagal
9eb01a6da1
Make SyncPodSync as the default SyncPodType.
...
We would like the default to be sync instead of create to easily differentiate
create operations in empty metrics map.
2015-05-12 06:25:48 +00:00
Tim Hockin
41033af256
Introduce an 'svc' segment for DNS search
2015-05-11 17:20:44 -07:00
Victor Marmol
43029345f9
Merge pull request #7973 from dchen1107/podstatus
...
Add kubectl log --previous support to view last terminated container log
2015-05-11 17:08:45 -07:00
Brendan Burns
fbd0143fa8
Merge pull request #7971 from deads2k/make-docker-keyring-handle-multiple-hits
...
make the dockerkeyring handle mutiple matching credentials
2015-05-11 17:01:37 -07:00
Victor Marmol
1465475401
Merge pull request #8079 from yifan-gu/rm_command_runner
...
kubelet/container: Move prober.ContainerCommandRunner to container.
2015-05-11 16:05:25 -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
Yu-Ju Hong
3f791db886
Kubelet: remove unused getHostFieldLabel function
2015-05-11 14:39:22 -07:00
Yu-Ju Hong
8b3130b112
Merge pull request #7980 from yifan-gu/fix_kubelet_tests
...
kubelet: Fix racy kubelet tests.
2015-05-11 14:09:44 -07:00
Dawn Chen
86479cc56c
Add support to pull log for last terminated container
2015-05-11 12:54:04 -07:00
Yifan Gu
85b453091b
kubelet: Add tests for fakePodWorkders.
2015-05-11 12:50:33 -07:00
Yifan Gu
52af792852
kubelet: Fix racy kubelet tests.
...
Add fakePodWorkders to run syncPod() in serial for testing.
2015-05-11 12:50:33 -07:00
Yu-Ju Hong
a9c9505206
Use VirtualSize of the docker image as the image size
2015-05-11 11:03:47 -07:00
Yu-Ju Hong
3599d81ef1
Remove some docker references
2015-05-11 11:03:47 -07:00
Yu-Ju Hong
3487a165b8
Unexport DockerManager.RunContainer
2015-05-11 11:03:41 -07:00
Nikhil Jindal
6bf5acd109
Merge pull request #8044 from pmorie/pod-volume-injection
...
Refactor volume interfaces to receive pod instead of ObjectReference
2015-05-11 10:11:00 -07:00
Victor Marmol
307d677e06
Merge pull request #8022 from ddysher/kubelet-privilege
...
Check Pod privileged container
2015-05-11 09:01:58 -07:00
deads2k
2ecb0ebd73
make the dockerkeyring handle mutiple matching credentials
2015-05-11 09:54:03 -04:00
Paul Morie
cd359ffa73
Refactor volume interfaces to receive pod instead of ObjectReference
2015-05-10 20:12:57 -04:00
Deyuan Deng
2f7183cba5
Check Pod privileged container
2015-05-09 17:30:35 -04:00
Deyuan Deng
72a563f618
Use error type from docker go-client instead of string
2015-05-09 15:20:45 -04:00
Yu-Ju Hong
d185bfd56a
Record failure reason for image pulling
2015-05-08 17:37:11 -07:00
Brendan Burns
c9324e6e38
Switch exec to look at exit code not output status.
2015-05-08 16:51:37 -07:00
Yifan Gu
7e9ba26103
kubelet: Add container runtime option for rkt.
2015-05-07 23:39:37 -07:00
Yifan Gu
8b1174a3a7
kubelet/container: Move pty*.go to container runtime package.
...
This makes the labeld pty wrapper available for both container runtime.
2015-05-07 23:36:47 -07:00
Victor Marmol
65bd04fc51
Merge pull request #7916 from yifan-gu/rkt_rm_label
...
kubelet/rkt: Remove build label.
2015-05-07 16:24:32 -07:00
Victor Marmol
5074e98ee9
Merge pull request #7910 from yujuhong/hostname
...
Use the full hostname for mirror pod name.
2015-05-07 14:43:16 -07:00
Yifan Gu
41f8c79490
kubelet/rkt: Remove build label.
...
As we removed the linux specific dependency, now rkt can be built
on other platforms as well.
2015-05-07 13:42:05 -07:00
Victor Marmol
ecf8348609
Revert "kubelet: Add container runtime option for rkt."
2015-05-07 13:01:37 -07:00
Yu-Ju Hong
ab5e0e0b5c
Use the full hostname for mirror pod name.
...
This change appends the full hostname to the mirror pod name (instead of taking
the first token) so that if the hostname is overriden, we'd not be creating
unncessary name conflicts. An example would be that a user overrides the
hostnames to be "127.0.0.1" and "127.0.0.2", and both of them were resolved to
"127" for the mirror pod name suffix.
Also, because `uname -n` could return a FQDN or not, this change takes only
the first token of it as the hostname for consistency.
2015-05-07 12:59:49 -07:00
Yifan Gu
4f6535ed8a
kubelet: Add container runtime option for rkt.
2015-05-07 10:31:58 -07:00
Victor Marmol
35c644a45f
Merge pull request #7870 from yifan-gu/rkt_volume
...
Add volumeGetter to rkt.
2015-05-07 08:58:00 -07:00
Wojciech Tyczynski
e26da316dc
Set NodeReady=False when docker is dead
2015-05-07 09:30:25 +02:00
Yifan Gu
a8f86da35b
kubelet/rkt: Add volumeGetter to rkt.
...
This enable rkt to fetch the volume mounts by the kubelet.
2015-05-06 19:30:33 -07:00
Victor Marmol
f6b7029475
Merge pull request #7859 from yifan-gu/rkt_remove_store
...
kubelet/rkt: Remove dependencies on rkt.store
2015-05-06 17:45:29 -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
Victor Marmol
d6ea33fbb5
Merge pull request #7849 from yifan-gu/rkt_components
...
kubelet/rkt: Inject dependencies to rkt.
2015-05-06 16:00:02 -07:00
Yifan Gu
8cbe8938c9
kubelet/rkt: Remove getImageID().
...
Replace getImageID() with getImageByName(), this can remove the
dependency on rkt.store.
2015-05-06 15:59:31 -07:00
Paul Morie
df08b15121
Change signature of container runtime PullImage to allow pull w/ secret
2015-05-06 17:42:03 -04:00
Yifan Gu
dee060c8fd
kubelet/rkt: Inject dependencies to rkt.
...
Add necessary components rkt.
2015-05-06 11:28:01 -07:00
Prashanth B
da42f13941
Merge pull request #7749 from yujuhong/stale_cache
...
Kubelet: record the timestamp correctly in the runtime cache
2015-05-06 09:20:30 -07:00
Victor Marmol
b4ae750e5d
Merge pull request #7830 from rhcarvalho/fix-metric-label
...
Fix metric label
2015-05-06 09:08:29 -07:00
Rodolfo Carvalho
075ae79826
Fix metric label
...
Signed-off-by: Rodolfo Carvalho <rcarvalh@redhat.com>
2015-05-06 10:29:50 +02:00
Jerzy Szczepkowski
4d655e3fcf
Merge pull request #7803 from yifan-gu/rkt_docker_image
...
kubelet/rkt: Add docker prefix to image string.
2015-05-06 09:22:50 +02:00
Yu-Ju Hong
c075719f05
Kubelet: fix the runtime cache to not cache the stale pods
...
If a pod worker sees stale pods from the runtime cache which were retrieved
before their last sync finished, it may think that the pod were not started
correctly, and attemp to fix that by killing/restarting containers.
There are two issues that may cause runtime cache to store stale pods:
1. The timstamp is recorded *after* getting the pods from the container
runtime. This may lead the consumer to think the pods are newer than they
actually are.
2. The cache updates are triggered by many goroutines (pod workers, and the
updating thread). There is no mechanism to enforece that the cache would
only be updated to newer pods.
This change fixes the above two issues by making sure one always record the
timestamp before getting pods from the container runtime, and updates the
cached pods only if the timestamp is newer.
2015-05-05 18:28:38 -07:00
Zach Loafman
875e83a741
Revert "Revert "Security context - types, kubelet, admission""
2015-05-05 16:02:13 -07:00
Zach Loafman
3fcea23185
Revert "Revert "Revert "Kubelet: Add rkt as a runtime option"""
2015-05-05 15:55:12 -07:00
Yifan Gu
ec68f1a85a
kubelet/rkt: Add docker prefix to image string.
...
This change makes rkt to run only docker image for now,
which enables us to test with all existing pods.
2015-05-05 15:41:13 -07:00
Zach Loafman
92ca92f43a
Revert "Revert "Kubelet: Add rkt as a runtime option""
2015-05-05 15:28:09 -07:00
Zach Loafman
f48904fd5e
Revert "Security context - types, kubelet, admission"
2015-05-05 15:20:39 -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
Paul Morie
1625e231dd
Merge pull request #7343 from pweil-/security-context-types
...
Security context - types, kubelet, admission
2015-05-05 16:26:09 -04:00
Victor Marmol
9f283f356f
Start ImageManager housekeeping in Run().
...
Fixes #7762
Fixes #5634
2015-05-05 11:15:12 -07:00
Victor Marmol
22297d316a
Add rkt runtime to Kubelet init
2015-05-05 10:55:21 -07:00
Victor Marmol
5d0e5d7d61
Inject dependencies to rkt
2015-05-05 10:55:11 -07:00
Paul Weil
982bf19c20
security context initial implementation - squash
2015-05-05 13:46:13 -04:00
Yu-Ju Hong
a7dadfcc97
Merge pull request #7752 from vmarmol/rkt-compile
...
Add build labels to rkt
2015-05-05 09:26:59 -07:00
Victor Marmol
d84aac6498
rkt: Unexport runtime, use Runtime interface
2015-05-04 17:28:02 -07:00
Victor Marmol
f012d7f506
Add unsupported version of rkt.
2015-05-04 17:22:45 -07:00
Robert Bailey
5fe07e69b7
Merge pull request #7725 from pmorie/typo
...
Fix typo in runtime_cache.go
2015-05-04 17:03:42 -07:00
Brian Grant
df8521c468
Merge pull request #7592 from pmorie/dapi-example
...
Rename EnvVarSource.FieldPath -> FieldRef and add example
2015-05-04 17:02:17 -07:00
Victor Marmol
de2212983f
Refactor rkt into one file.
...
This will make it easy to add build labels and stub out in non-Linux
builds.
2015-05-04 16:51:31 -07:00
Victor Marmol
fe7cb95be6
Merge pull request #7746 from vishh/exec_fix
...
Fix kubelet's docker RunInContainer implementation
2015-05-04 16:49:57 -07:00
Victor Marmol
a32d31d045
Merge pull request #7729 from yujuhong/runtime_up
...
Kubelet: wait until container runtime is up
2015-05-04 16:02:30 -07:00
Vishnu Kannan
ec01265643
Fix docker exec logic. Without this patch, kubelet was not receiving any output from docker exec
...
and was incorrectly handling the output.
2015-05-04 16:01:32 -07:00
Paul Morie
e949a623ff
Change EnvVarSource.FieldPath -> FieldRef and add example
2015-05-04 18:41:09 -04:00
Yu-Ju Hong
d231eb6bef
Kubelet: wait until container runtime is up
...
Instead of waiting for the docker client to be up, we wait for the container
runtime to be up.
2015-05-04 15:16:38 -07:00
Victor Marmol
b0129089da
Merge pull request #7712 from rjnagal/kubelet
...
Expose pod name as a label on containers.
2015-05-04 14:52:16 -07:00
Rohit Jnagal
1511dbf0b5
Expose pod name as a label on containers.
...
Full pod name is exposed under key 'kubernetes.io/pod'.
It helps in introspection by looking at all containers in a pod through
docker ps -a -f label=kubernetes.io/pod=podXXX
We also plan to visualize this in cAdvisor.
2015-05-04 21:20:42 +00:00
Paul Morie
d90689bb71
Fix typo in runtime_cache.go
2015-05-04 16:33:48 -04:00
Victor Marmol
ba7e940a57
Make rkt implement the container Runtime
2015-05-04 11:16:33 -07:00
Victor Marmol
e44d9df0f4
Changes to rkt's PortForward to match Runtime API.
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
Victor Marmol
60a77221f5
Add dummy ListImages and RemoveImage to rkt runtime.
2015-05-04 11:14:54 -07:00
Victor Marmol
2ad933e124
Merge pull request #7674 from yujuhong/enable_runtime
...
Kubelet: replace DockerManager with the Runtime interface
2015-05-04 11:10:20 -07:00
Yu-Ju Hong
1ad4dd7803
Kubelet: replace DockerManager with the Runtime interface
...
This change instructs kubelet to switch to using the Runtime interface. In order
to do it, the change moves the Prober instantiation to DockerManager.
Note that most of the tests in kubelet_test.go needs to be migrated to
dockertools. For now, we use type assertion to convert the Runtime interface to
DockerManager in most tests.
2015-05-04 10:19:46 -07: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
Victor Marmol
c5a86387a4
Merge pull request #7657 from yujuhong/docker_runtime
...
Removes RunPod in the Runtime interface
2015-05-01 16:09:44 -07:00
Yu-Ju Hong
ae1b24f07f
Merge pull request #7652 from vmarmol/runtime-switch
...
Kubelet: Add container runtime option.
2015-05-01 14:50:30 -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
Victor Marmol
d9d61c3511
Kubelet: Add container runtime option.
2015-05-01 14:26:54 -07:00
Yifan Gu
1b77615deb
kubelet/rkt: Add SyncPod() to rkt.
2015-05-01 13:02:05 -07:00
Victor Marmol
3b9eba2c1b
Add SyncPod() to DockerManager and use in Kubelet.
...
This allows us to abstract away the logic of syncing a pod by the
runtime. It will allow other runtimes to perform their own sync as well.
2015-05-01 11:03:08 -07:00
Victor Marmol
bb8ee5b0db
Add lifecycle tests from kubelet_test to lifecycle.
2015-05-01 11:02:10 -07:00
Victor Marmol
7a737892f5
Extract out interface for GetPods().
...
This will remove the circular import with dockertools for
DockerManager. Eventually, this will be Runtime.
2015-05-01 11:02:10 -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
Yu-Ju Hong
f74fab4e56
Merge pull request #7603 from vmarmol/runtime-syncpod-api
...
Add SyncPod() and remove Kill/Run InContainer().
2015-05-01 09:41:50 -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
Yifan Gu
3751ecc766
kubelet/container: Move ShouldContainerBeRestarted() to runtime.
2015-04-30 22:55:25 -07:00
Yifan Gu
428652bdc7
kubelet/rkt: Add KillPod() and GetPodStatus() for rkt.
2015-04-30 18:32:32 -07:00
Victor Marmol
03b5c32576
Merge pull request #7553 from yifan-gu/rkt_runner
...
kubelet/rkt: Add RunInContainer()/ExecInContainer()/PortForward().
2015-04-30 18:31:08 -07:00
Yifan Gu
9ce568a142
kubelet/rkt: Add GetPods() for rkt.
2015-04-30 18:00:18 -07:00
Yifan Gu
1636fd2e1c
kubelet/rkt: Add RunPod() for rkt.
2015-04-30 17:31:35 -07:00
Yifan Gu
2e4be0bcf1
kubelet/rkt: Add RunInContainer()/ExecInContainer()/PortForward().
2015-04-30 17:25:16 -07:00
Victor Marmol
262c34e7db
Merge pull request #7543 from yifan-gu/pod_manifest
...
kubelet/rkt: Add routines for converting kubelet pod to rkt pod.
2015-04-30 17:18:19 -07:00
Victor Marmol
3235799595
Merge pull request #7601 from yujuhong/kill_container
...
Add KillContainerInPod in DockerManager
2015-04-30 17:05:00 -07:00
Victor Marmol
df8490f52f
Merge pull request #7555 from yifan-gu/rkt_pod_info
...
kubelet/rkt: Add podInfo.
2015-04-30 17:04:51 -07:00
Yu-Ju Hong
b37f23f1eb
Add KillContainerInPod in DockerManager
...
This changes adds one of the functions that DockerManager needs to implement
the Runtime interface.
2015-04-30 16:23:39 -07:00
Victor Marmol
441a4e6f30
Merge pull request #7578 from yujuhong/docker_manager
...
Add image-related methods to DockerManager
2015-04-30 16:16:39 -07:00
Victor Marmol
a94aeb27fa
Merge pull request #7586 from yujuhong/container_info
...
Remove more docker references in kubelet
2015-04-30 16:16:23 -07:00
Yifan Gu
7e8afc7c96
kubelet/rkt: Add routines for converting kubelet pod to rkt pod.
2015-04-30 15:24:47 -07:00
Victor Marmol
0e89d65563
Merge pull request #7545 from yifan-gu/getlog
...
Getlog
2015-04-30 15:15:44 -07:00
Victor Marmol
57cc1218ca
Merge pull request #7549 from yifan-gu/rkt_gc
...
Rkt gc
2015-04-30 15:15:07 -07:00
Alex Robinson
f3352d96e6
Merge pull request #7595 from a-robinson/typo
...
Fix typo in kubelet prober code
2015-04-30 14:42:18 -07:00
Yifan Gu
01841a8c19
kubelet/rkt: Add podInfo.
...
podInfo reprensents the state of rkt pods.
It is used to for reporting the pod and container status to kubelet.
2015-04-30 14:39:10 -07:00
Yu-Ju Hong
644ec0dbfb
Remove ErrNoKubeletContainers
...
We no longer use it.
2015-04-30 13:35:21 -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