Commit Graph

3507 Commits (13a0ce68227c3265fefb150397d0e47e41c9b7ae)

Author SHA1 Message Date
Kubernetes Submit Queue 13a0ce6822 Merge pull request #31988 from pmorie/gc-log
Automatic merge from submit-queue

Add positive logging for GC events

We have no positive logging for GC events.  This PR:

1.  Adds positive logging at V(4) for success cases
2.  Adds positive logging at V(1) for the first successful GC after a failure
2016-09-23 00:36:43 -07:00
Kubernetes Submit Queue 1f7e79afbf Merge pull request #33066 from Random-Liu/set-docker-client-version
Automatic merge from submit-queue

Add docker client version.

Addressed https://github.com/kubernetes/kubernetes/issues/29478#issuecomment-248197665.

This partially reverted #31540, because currently we are really trying to connect to docker daemon when creating the client.

This PR updated docker client with real docker apiversion with `UpdateClientVersion`, so that the version related logic of engine-api can work properly, such as https://github.com/docker/engine-api/pull/174/files.

@yujuhong @feiskyer
2016-09-22 19:09:14 -07:00
Kubernetes Submit Queue 509096af21 Merge pull request #33301 from yujuhong/docker_hacks
Automatic merge from submit-queue

Fake container exec/logs support for in-process docker CRI integration

This is necessary to unblock other work on docker integration, while we are addressing
`logs` and `exec` in the meantime.

This is part of #31459 and #33189

/cc @kubernetes/sig-node
2016-09-22 17:44:37 -07:00
Yu-Ju Hong 2fc2e71438 Fake container exec/logs support for in-process docker CRI integration
This is a temporary hack to bypass CRI when getting container logs or
running exec in a container. This is necessary to unblock testing and adding
other features in the integration.
2016-09-22 16:03:37 -07:00
Yu-Ju Hong c43a106b26 Move ConvertPodStatusToRunningPod back to the kubelet/container package
This avoids unnecessary imports between of kuberuntime from dockertools/rkt,
which implements the same kubecontainer.Runtime interface.
2016-09-22 12:13:44 -07:00
Kubernetes Submit Queue 5b609f212c Merge pull request #32126 from intelsdi-x/kvm_fw
Automatic merge from submit-queue

Add port forwarding for rkt with kvm stage1

Port forwarding for rkt kvm using `socat`.
cc @yifan-gu @euank @pskrzyns @lukasredynk
2016-09-22 10:57:09 -07:00
Kubernetes Submit Queue 46123a1694 Merge pull request #33112 from vishh/fix-qos
Automatic merge from submit-queue

Ignore opaque or counted resources from Pod QoS

Fixes #33108
2016-09-22 09:09:05 -07:00
Kubernetes Submit Queue b60df6c312 Merge pull request #33228 from yujuhong/pull_throttling
Automatic merge from submit-queue

Move image pull throttling logic to pkg/kubelet/images

This is part of #31458

This allows runtimes in different packages (dockertools, rkt, kuberuntime) to
share the same logic. Before this change, only dockertools support this
feature. Now all three packages support image pull throttling.

/cc @kubernetes/sig-node
2016-09-22 06:23:39 -07:00
Kubernetes Submit Queue 5af04d1dd1 Merge pull request #32876 from errordeveloper/more-cert-utils
Automatic merge from submit-queue

Refactor cert utils into one pkg, add funcs from bootkube for kubeadm to use

**What this PR does / why we need it**:

We have ended-up with rather incomplete and fragmented collection of utils for handling certificates. It may be worse to consider using `cfssl` for doing all of these things, but for now there is some functionality that we need in `kubeadm` that we can borrow from bootkube. It makes sense to move the utils from bookube into core, as discussed in #31221.

**Special notes for your reviewer**: I've taken the opportunity to review names of existing funcs and tried to make some improvements in that area (with help from @peterbourgon).

**Release note**:

```release-note
NONE
```
2016-09-22 01:29:46 -07:00
Yu-Ju Hong ee5b6a2550 Move image pull throttling logic to kubelet/images
This allows runtimes in different packages (dockertools, rkt, kuberuntime) to
share the same logic. Before this change, only dockertools support this
feature. Now all three packages support image pull throttling.
2016-09-21 18:31:04 -07:00
Antoine Pelisse 938872582e Revert "simplify RC and SVC listers" 2016-09-21 15:49:38 -07:00
Kubernetes Submit Queue 2d9d84dc64 Merge pull request #32888 from deads2k/client-10-fixup-remaining-listers
Automatic merge from submit-queue

simplify RC and SVC listers

Make the RC and SVC listers use the common list functions that more closely match client APIs, are consistent with other listers, and avoid unnecessary copies.
2016-09-21 04:13:56 -07:00
Vishnu kannan 5d4ee244d3 ignore non first class QoS resources from computing Pod Qos
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-09-20 11:19:31 -07:00
Kubernetes Submit Queue 650715d231 Merge pull request #32903 from yujuhong/enable_docker_shim
Automatic merge from submit-queue

kubelet: Add a hidden flag to enable docker CRI integration for testing
2016-09-20 11:19:26 -07:00
deads2k 16fbb47189 fix up service lister 2016-09-20 08:24:33 -04:00
Kubernetes Submit Queue 1070a51830 Merge pull request #31388 from yifan-gu/fix_kubenet_getRunningPods
Automatic merge from submit-queue

kubenet: SyncHostports for both running and ready to run pods.

This fixes the race that happens in rktnetes when pod B invokes
'kubenet.SetUpPod()' before another pod A becomes actually running.

The second 'kubenet.SetUpPod()' call will not pick up the pod A
and thus overwrite the host port iptable rules that breaks pod A.

This PR fixes the case by listing all 'active pods' (all non-exited
pods) instead of only running pods.

Fix https://github.com/kubernetes/kubernetes/issues/27975 

Originally discussed in https://github.com/kubernetes/kubernetes/pull/27914#issuecomment-228140108

cc @euank @freehan @dcbw
2016-09-20 04:24:41 -07:00
Random-Liu 08d74f33f6 Add client version. 2016-09-19 21:27:00 -07:00
Kubernetes Submit Queue b4d5177c23 Merge pull request #32816 from pmorie/kubelet-godoc
Automatic merge from submit-queue

Add missing kubelet godoc

Adds some missing godoc to Kubelet, which I found while triaging a bug.
2016-09-19 20:33:21 -07:00
Kubernetes Submit Queue 30ff1f495a Merge pull request #32914 from yujuhong/limit_names
Automatic merge from submit-queue

Limit the number of names per image reported in the node status

This fixes #32908
2016-09-19 15:10:52 -07:00
Kubernetes Submit Queue 80f0f82903 Merge pull request #32934 from yifan-gu/fix_pod_sandbox
Automatic merge from submit-queue

CRI: Add missing sandbox in runningPod.

Add a container that represents pod sandbox when converting the
pod status to runningPod.

Without the change, `kubeGenericRuntimeManager.killPodWithSyncResult()` will not kill any sandboxes.

cc @feiskyer @Random-Liu @yujuhong
2016-09-19 13:48:40 -07:00
Yu-Ju Hong bd357e9761 Various fixes to enable kubelet to switch to kuberuntime/dockershim 2016-09-19 13:09:00 -07:00
Yu-Ju Hong 1c3c1ac514 kubelet: Add a hidden flag to enable docker CRI integration
The new flag, if specified, and if --container-runtime=docker, switches
kubelet to use the new CRI implementation for testing. This is hidden flag
since the feature is still under heavy development and the flag may be changed
in the near future.
2016-09-19 13:09:00 -07:00
Yifan Gu 27d4866c4e CRI: Add missing sandbox in runningPod.
Append containers that represent pod sandboxes when converting the
pod status to runningPod.
2016-09-19 11:52:00 -07:00
Ilya Dmitrichenko 386fae4592
Refactor utils that deal with certs
- merge `pkg/util/{crypto,certificates}`
- add funcs from `github.com/kubernetes-incubator/bootkube/pkg/tlsutil`
- ensure naming of funcs is fairly consistent
2016-09-19 09:03:42 +01:00
Yifan Gu 5389a74388 kubenet: SyncHostports for both running and ready to run pods.
This fixes the race that happens in rktnetes when pod B invokes
'kubenet.SetUpPod()' before another pod A becomes actually running.

The second 'kubenet.SetUpPod()' call will not pick up the pod A
and thus overwrite the host port iptable rules that breaks pod A.

This PR fixes the case by listing all 'active pods' (all non-exited
pods) instead of only running pods.
2016-09-16 17:29:44 -07:00
Vish Kannan a1fe3adbc7 Revert "Revert "[kubelet] Fix oom-score-adj policy in kubelet"" 2016-09-16 16:32:58 -07:00
Yu-Ju Hong 7ada99181c Limit the number of names per image reported in the node status 2016-09-16 15:16:08 -07:00
Kubernetes Submit Queue af3050dd15 Merge pull request #32835 from yujuhong/docker_annotations
Automatic merge from submit-queue

dockershim: support annotations and filtering by sandbox ID
2016-09-16 14:17:03 -07:00
Yu-Ju Hong 73f30b18e4 dockershim: support filter containers by sandbox ID 2016-09-16 11:31:15 -07:00
Yu-Ju Hong 2f60b72dd3 dockershim: add support for annotations 2016-09-16 11:31:15 -07:00
Kubernetes Submit Queue 791116476f Merge pull request #32348 from asalkeld/metrics-nil-spammy
Automatic merge from submit-queue

Disambiguate unsupported metrics from metrics errors

**What this PR does / why we need it**:
Stop logging "metrics are not supported for MetricsNil Volumes" as it spams the log.

**Which issue this PR fixes** 
fixes #20676, fixes #27373

**Special notes for your reviewer**:
None

**Release note**:
```release-note
Don't log "metrics are not supported for MetricsNil Volumes"
```
2016-09-16 11:27:15 -07:00
Yu-Ju Hong 5e318cd749 CRI: add annotations to PodSandbox
Both Container and ContainerStatus includes labels and annotations. PodSandbox
should be consistent with that.
2016-09-16 11:09:24 -07:00
Yu-Ju Hong fd70d94330 dockershim: fix sandbox/container filtering 2016-09-16 11:09:24 -07:00
Yu-Ju Hong 18f230c524 kuberuntime: fix nil pointer dereference in killPodWithSyncResult 2016-09-16 08:38:11 -07:00
Hai Huang 192825bc5e fix a typo 2016-09-16 09:42:29 -04:00
Kubernetes Submit Queue dfe3a46672 Merge pull request #31847 from feiskyer/syncpod
Automatic merge from submit-queue

Kubelet: add SyncPod for new runtime API

This PR adds implements of `SyncPod` for new runtime API. Note that init containers is not included, it will in another following PR.

**DO-NOT-MERGE**. Based on #31322 and #31395, only last commit is for review.

CC @yujuhong @Random-Liu and @kubernetes/sig-node @kubernetes/sig-rktnetes
2016-09-15 22:26:52 -07:00
Vish Kannan 492ca3bc9c Revert "[kubelet] Fix oom-score-adj policy in kubelet" 2016-09-15 19:28:59 -07:00
Kubernetes Submit Queue 2c6620b1ee Merge pull request #32563 from ZTE-PaaS/zhangke-patch-045
Automatic merge from submit-queue

Check kubeClient nil in Kubelet and bugfix

1. check kubeClient nil first before using as it maybe nil
2. configMaps and secrets map do not be used properly and should use it as cache
2016-09-15 18:48:34 -07:00
Saad Ali cb88d88b3e Merge pull request #32251 from vishh/fix-oom-policy
[kubelet] Fix oom-score-adj policy in kubelet
2016-09-15 15:24:54 -07:00
Paul Morie 703cc16403 Add missing kubelet godoc 2016-09-15 16:27:09 -04:00
Kubernetes Submit Queue 9f0dc7fe27 Merge pull request #32744 from yujuhong/fix_shim
Automatic merge from submit-queue

Clarify the "version" requirement in CRI and fix various bugs in dockershim

This fixes #32741
2016-09-15 08:50:59 -07:00
Pengfei Ni d65309399a Kubelet: add SyncPod for new runtime API 2016-09-15 23:32:36 +08:00
Kubernetes Submit Queue 265746af18 Merge pull request #31326 from feiskyer/kuberuntime-gc
Automatic merge from submit-queue

Kubelet: add garbage collection for new runtime API

This PR adds garbage collection for new runtime API.

Note that this PR also adds `CreatedAt` and `PodSandboxId` to `ListContainers()` result.

CC @yujuhong @Random-Liu  @kubernetes/sig-node @kubernetes/sig-rktnetes
2016-09-15 02:28:05 -07:00
Yu-Ju Hong 77aa4cd07c CRI: clarify the version string requirement 2016-09-14 18:03:12 -07:00
Angus Salkeld a1b2fcb10f Disambiguate unsupported metrics from metrics errors 2016-09-15 10:05:30 +10:00
Yu-Ju Hong 13b23c51cb dockershim: fix docker filter, Hostname, and the apiversion 2016-09-14 16:42:02 -07:00
Vishnu kannan ba6feb2771 fix kubelet ignoring docker daemon in container feature
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-09-14 12:43:59 -07:00
Vishnu kannan e4acad7afb Fix oom-score-adj policy in kubelet.
Docker daemon and kubelet needs to be protected by setting oom-score-adj to -999.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-09-14 11:56:10 -07:00
Clayton Coleman 4a48bf8375
Docker digest validation is too strict
Docker 1.10 does not guarantee that the pulled digest matches the digest
on disk when dealing with v1 schemas stored in a Docker registry. This
is the case for images like
centos/ruby-23-centos7@sha256:940584acbbfb0347272112d2eb95574625c0c60b4e2fdadb139de5859cf754bf
which as a result of #30366 cannot be pulled by Kube from a Docker 1.10
system.

Instead, use RepoDigests field as the primary match, validating the
digest, and then fall back to ID (also validating the match). Adds more
restrictive matching.
2016-09-14 14:13:21 -04:00
Kubernetes Submit Queue 5ffb523cf8 Merge pull request #32259 from ZTE-PaaS/zhangke-patch-040
Automatic merge from submit-queue

Improving StopContainer failed log level

Using at least Warning level will be more property
2016-09-14 02:53:55 -07:00