Commit Graph

5813 Commits (13b12e89408869c5b560a81e95bca33267bdb8e1)

Author SHA1 Message Date
Kubernetes Submit Queue 4024b59844
Merge pull request #45442 from verb/pod-tshoot-1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add a container type to the runtime manager's container status

**What this PR does / why we need it**:
This is Step 1 of the "Debug Containers" feature proposed in #35584 and is hidden behind a feature gate. Debug containers exist as container status with no associated spec, so this new runtime label allows the kubelet to treat containers differently without relying on spec.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: cc #27140

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

**Integrating feedback**:
- [x] Remove Type field in favor of a help method

**Dependencies:**
- [x] #46261 Feature gate for Debug Containers
2018-01-24 11:48:49 -08:00
Kubernetes Submit Queue 47d61ef472
Merge pull request #58418 from yujuhong/deprecate-rktnetes
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add deprecation warnings for rktnetes flags

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

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #53601

**Special notes for your reviewer**:

**Release note**:
```release-note
rktnetes has been deprecated in favor of rktlet. Please see https://github.com/kubernetes-incubator/rktlet for more information.
```
2018-01-24 08:54:49 -08:00
Lee Verberne ba6f31a6c6 Add a container type to the runtime labels
This is part of the "Debug Containers" feature and is hidden behind
a feature gate. Debug containers have no stored spec, so this new
runtime label allows the kubelet to treat containers differently
without relying on spec.
2018-01-23 13:16:36 +01:00
Kubernetes Submit Queue 3550551b9f
Merge pull request #58528 from deads2k/kubelet-02-mincipher
Automatic merge from submit-queue (batch tested with PRs 58547, 57228, 58528, 58499, 58618). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add TLS min version flag

Adds a flag for controlling the minimum TLS level allowed.

/assign liggitt

@kubernetes/sig-node-pr-reviews @k8s-mirror-api-machinery-pr-reviews 

```release-note
--tls-min-version on kubelet and kube-apiserver allow for configuring minimum TLS versions
```
2018-01-22 20:49:35 -08:00
Yu-Ju Hong 0957afbbd9 dockershim: clean up the legacy interface 2018-01-19 17:09:40 -08:00
Yu-Ju Hong 9728c56a5a dockershim: call DockerService.Start() during grpc server startup 2018-01-19 16:31:18 -08:00
Yu-Ju Hong 20910289b8 Fix all the unit tests and update the bazel files 2018-01-19 16:31:18 -08:00
Yu-Ju Hong e8da890aee dockershim: remove the use of kubelet's internal API
We let dockershim implement the kubelet's internal (CRI) API as an
intermediary step before transitioning fully to communicate using gRPC.
Now that kubelet has been communicating to the runtime over gRPC for
multiple releases, we can safely retire the extra interface in
dockershim.
2018-01-19 16:31:18 -08:00
David Eads 4ce7bcced4 generated 2018-01-19 14:08:28 -05:00
David Eads ad16803470 add options for min tls levels 2018-01-19 14:08:27 -05:00
Kubernetes Submit Queue 62616d79ad
Merge pull request #58053 from tianshapjq/nit-errUnsupportedVersion
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

typo of errUnsuportedVersion

**What this PR does / why we need it**:
typo of errUnsuportedVersion in pkg/kubelet/cm/deviceplugin/types.go

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note

```NONE
2018-01-19 03:26:34 -08:00
Kubernetes Submit Queue 5d9f1f82a6
Merge pull request #58229 from sjenning/exempt-sandbox-image
Automatic merge from submit-queue (batch tested with PRs 58422, 58229, 58421, 58435, 58475). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubelet: imagegc: exempt sandbox image

The image GC logic currently does not consider the sandbox image to be in-use by pods, since it isn't explicitly listed in the pod spec.  However, it is trivially in-use if there are any pods running on the node.

This change adds logic to exempt the sandbox image from GC by always considering it as in-use.

**Reviewer Note**
I am changing `(m *kubeGenericRuntimeManager) GetImageRef` to return the ID always rather than the first tag if it exists.  Seemed ok to me.  Makes some error messages a little less readable in that the ID will be printed and not the tag.  Just wanted to see what reviewers think about this.

@derekwaynecarr @dashpole
2018-01-18 16:36:36 -08:00
Kubernetes Submit Queue 44d0ba29d3
Merge pull request #56960 from islinwb/remove_unused_code_ut_pkg
Automatic merge from submit-queue (batch tested with PRs 53631, 56960). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove unused code in UT files in pkg/

**What this PR does / why we need it**:
Remove unused code in UT files in pkg/ .

**Release note**:

```release-note
NONE
```
2018-01-18 02:41:29 -08:00
Kubernetes Submit Queue b7100f1ee7
Merge pull request #48859 from victorgp/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Support for custom tls cipher suites in api server and kubelet

**What this PR does / why we need it**:
This pull request aims to solve the problem of users not able to set custom cipher suites in the api server.
Several users have requested this given that some default ciphers are vulnerable.
There is a discussion in #41038 of how to implement this. The options are:
- Setting a fixed list of ciphers, but users will have different requirements so a fixed list would be problematic.
- Letting the user set them by parameter, this requires adding a new parameter that could be pretty long with the list of all the ciphers.

I implemented the second option, if the ciphers are not passed by parameter, the Go default ones will be used (same behavior as now).

**Which issue this PR fixes** 
fixes #41038 

**Special notes for your reviewer**:
The ciphers in Go tls config are constants and the ones passed by parameters are a comma-separated list. I needed to create the `type CipherSuitesFlag` to support that conversion/mapping, because i couldn't find any way to do this type of reflection in Go.
If you think there is another way to implement this, let me know.

If you want to test it out, this is a ciphers combination i tested without the weak ones:

```
TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
```

If this is merged i will implement the same for the Kubelet.

**Release note**:
```release-note
kube-apiserver and kubelet now support customizing TLS ciphers via a `--tls-cipher-suites` flag
```
2018-01-17 17:46:40 -08:00
Yu-Ju Hong 794f03e0ad Add deprecation warnings for rktnetes flags 2018-01-17 14:05:51 -08:00
Seth Jennings 19a546758c kubelet: imagegc: exempt sandbox image 2018-01-17 15:10:44 -06:00
Victor Garcia d7dbc96c70 Adding support for custom TLS ciphers in api server and kubelet 2018-01-17 12:55:55 -08:00
Kubernetes Submit Queue 99fb21f61f
Merge pull request #58149 from CaoShuFeng/duplicated_import_2
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove duplicated import

**Release note**:
```release-note
NONE
```
2018-01-17 01:41:36 -08:00
Cao Shufeng 4e7398b67b remove duplicated import 2018-01-17 09:34:59 +08:00
vikaschoudhary16 9c847fc4d6 Call Dial in blocking mode 2018-01-16 10:50:17 -05:00
linweibin fa8afc1d39 Remove unused code in UT files in pkg/ 2018-01-15 16:02:35 +08:00
Kubernetes Submit Queue 9007df35b9
Merge pull request #55921 from ScorpioCPH/fix-endpoint-ut
Automatic merge from submit-queue (batch tested with PRs 58216, 58193, 53033, 58219, 55921). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix device plugin endpoint UT

**What this PR does / why we need it**:
Fix some issues in device plugin endpoint UT.

**Which issue(s) this PR fixes**:
Fixes #55920

**Special notes for your reviewer**:

@jiayingz @RenaudWasTaken @lichuqiang PTAL.

/sig node

**Release note**:

```release-note
None
```
2018-01-13 03:34:57 -08:00
Kubernetes Submit Queue f2e46a2147
Merge pull request #57266 from vikaschoudhary16/unhealthy_device
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Handle Unhealthy devices

Update node capacity with sum of both healthy and unhealthy devices.
Node allocatable reflect only healthy devices.



**What this PR does / why we need it**:
Currently node capacity only reflects healthy devices. Unhealthy devices are ignored totally while updating node status. This PR handles unhealthy devices while updating node status. 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #57241

**Special notes for your reviewer**:

**Release note**:
<!--  Write your release note:
Handle Unhealthy devices

```release-note
Handle Unhealthy devices
```
/cc @tengqm @ConnorDoyle @jiayingz @vishh @jeremyeder @sjenning @resouer @ScorpioCPH @lichuqiang @RenaudWasTaken @balajismaniam 

/sig node
2018-01-12 19:55:54 -08:00
Kubernetes Submit Queue 5636634879
Merge pull request #56112 from dashpole/on_demand_metrics
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Enable on-demand collection of node metrics

**What this PR does / why we need it**:
This PR enables collecting node-level metrics on-demand.  This is useful because it allows the kubelet to respond to resource pressure more quickly.

**Which issue(s) this PR fixes**:
Ref: #51745

**Release note**:
```release-note
NONE
```

/sig node
/priority important-soon
/kind bug

/assign @vishh @derekwaynecarr 
cc @tallclair
2018-01-12 15:38:42 -08:00
Penghao Cen b96c383ef7 Check grpc server ready properly 2018-01-13 05:47:49 +08:00
Kubernetes Submit Queue 1824684c7d
Merge pull request #57036 from lcfang/fixevictfunc
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fixed the some typo in eviction_manager

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

fixed some wrong typo in `eviction_manager.go`
2018-01-12 10:12:29 -08:00
Penghao Cen 90bc1265cf Fix endpoint not work issue 2018-01-12 20:09:07 +08:00
Kubernetes Submit Queue 6d55ffbf84
Merge pull request #54792 from ScorpioCPH/add-stub-device-plugin-for-e2e
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add stub device plugin for conformance e2e test

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

Add stub device plugin for conformance e2e test
- extend [device_plugin_stub](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/cm/deviceplugin/device_plugin_stub.go) to support e2e test
- add test suite with this device-plugin-stub
- simulate more use cases by deploying some pods to request these resources

**Which issue this PR fixes**:

fixes #52861

**Special notes for your reviewer**:

@vishh @jiayingz PTAL.

**Release note**:

```release-note
None
```
2018-01-12 04:05:55 -08:00
abhi 3dd6e98ea0 Fixing logs for cri stats
Signed-off-by: abhi <abhi@docker.com>
2018-01-11 09:43:12 -08:00
Kubernetes Submit Queue e96162e81b
Merge pull request #57637 from dims/fix-cadvisor-test-under-mac
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix TestCadvisorListPodStats failure under mac/darwin

**What this PR does / why we need it**:
GetPodCgroupNameSuffix is not really implemented under darwin
(or windows for that matter). So let's just skip over the check
for CPU and Memory if that is not set.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #57636

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-11 07:50:17 -08:00
Penghao Cen 671c4eb2b7 Add e2e test logic for device plugin 2018-01-11 14:41:45 +08:00
Penghao Cen dc5384a139 Don't rewrite device health 2018-01-11 14:18:13 +08:00
Kubernetes Submit Queue 07e4939b66
Merge pull request #57020 from dixudx/imagegc_ignore_inuse
Automatic merge from submit-queue (batch tested with PRs 57823, 58091, 58093, 58096, 57020). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

ignore images in used by running containers when GC

**What this PR does / why we need it**:
Let kubelet not attempt to remove images being used by running containers.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #57006

**Special notes for your reviewer**:
@kubernetes/sig-node-pr-reviews 

**Release note**:

```release-note
ignore images in used by running containers when GC
```
2018-01-10 12:37:48 -08:00
Lee Verberne bf60b7aa55 Mark kubelet PID namespace flag as deprecated
The `--docker-disable-shared-pid` flag will be removed once per-pod
configurable process namespace sharing becomes available. Mark it
deprecated to notify cluster admins.
2018-01-10 18:35:09 +01:00
tianshapjq e8005face7 typo of errUnsuportedVersion 2018-01-10 15:47:11 +08:00
Kubernetes Submit Queue 656cb30bb5
Merge pull request #57733 from stewart-yu/fixtypeErrorInEviction
Automatic merge from submit-queue (batch tested with PRs 57733, 57613, 57953). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[eviction manager]fix type error

**What this PR does / why we need it**:
It should not  wrong hint messages when create memory threshold notifier failed

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-09 21:51:34 -08:00
Kubernetes Submit Queue 2e9a277a3c
Merge pull request #57845 from yujuhong/minor-clean-up
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

dockershim: bump the minimum supported docker version to 1.11

Drop the 1.10 compatibilty code.

**Release note**:

```release-note
NONE
```
2018-01-09 18:14:27 -08:00
Kubernetes Submit Queue 34d63793fd
Merge pull request #57851 from mtaufen/kc-deprecate-old-security-knobs
Automatic merge from submit-queue (batch tested with PRs 56759, 57851, 56352). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move some old security controls to KubeletFlags and mark them deprecated

Related to @timstclair's comment: https://github.com/kubernetes/kubernetes/pull/53833#issuecomment-355399163


```release-note
NONE
```
2018-01-09 12:40:37 -08:00
Michael Taufen 5caf26fa84 Move some old security controls to KubeletFlags and mark them deprecated 2018-01-09 10:18:36 -08:00
vikaschoudhary16 e9cf3f1ac4 Handle Unhealthy devices
Update node capacity with sum of both healthy and unhealthy devices.
Node allocatable reflect only healthy devices.
2018-01-09 11:38:48 -05:00
Kubernetes Submit Queue 57888103a5
Merge pull request #57734 from stewart-yu/removeGetBuggyHostportChain
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove duplicate function getBuggyHostportChain

**What this PR does / why we need it**:
remove `TODO remove this after release 1.9, please refer https://github.com/kubernetes/kubernetes/pull/55153`
function `getBuggyHostportChain`  does bad conversion on HostPort from int32 to string, now that `getHostportChain` does right, we remove function `getBuggyHostportChain` .

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-08 22:40:22 -08:00
stewart-yu 2fefca4a0b remove unnecessary function getBuggyHostportChain 2018-01-09 10:38:53 +08:00
David Ashpole f6721480f4 enable on-demand metrics for eviction 2018-01-08 10:20:02 -08:00
Kubernetes Submit Queue cc22b10278
Merge pull request #52638 from wackxu/fixbadcom
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix the wrong code comment

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

Fix the wrong code comment


**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #55608


**Release note**:

```release-note
NONE
```
2018-01-07 10:22:02 -08:00
Kubernetes Submit Queue bd4d511a40
Merge pull request #57852 from misterikkit/moveScheduler
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move scheduler out of plugin directory

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

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
This is but one step toward resolving the referenced issue.
/ref #57579

**Special notes for your reviewer**:

**Release note**:

```release-note
Default scheduler code is moved out of the plugin directory.
plugin/pkg/scheduler -> pkg/scheduler
plugin/cmd/kube-scheduler -> cmd/kube-scheduler
```
/sig scheduling
2018-01-05 22:20:13 -08:00
Jonathan Basseri 85c5862552 Fix scheduler refs in BUILD files.
Update references to moved scheduler code.
2018-01-05 15:05:01 -08:00
Jonathan Basseri 30b89d830b Move scheduler code out of plugin directory.
This moves plugin/pkg/scheduler to pkg/scheduler and
plugin/cmd/kube-scheduler to cmd/kube-scheduler.

Bulk of the work was done with gomvpkg, except for kube-scheduler main
package.
2018-01-05 15:05:01 -08:00
Clayton Coleman 5210e6fefd
Remove dependency on v1 API in base credential provider
Credential provider is useful without the v1 API, move the only
dependency out so that we can more easily move credential provider to a
utility library in the future (other callers besides Kubelet may need to
load pull secrets like Docker).
2018-01-05 17:52:06 -05:00
Kubernetes Submit Queue afbbd394c1
Merge pull request #57517 from verb/paws-bump
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Bump pause container used by kubelet and tests to 3.1

This updates the version of the pause container used by the kubelet and
various test utilities to 3.1.

**What this PR does / why we need it**: The pause container hasn't been rebuilt in quite a while and needs an update to reap zombies (#50865) and for schema2 manifest (#56253).

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #50865, Fixes #56253

**Special notes for your reviewer**:

**Release note**:

```release-note
The kubelet uses a new release 3.1 of the pause container with the Docker runtime. This version will clean up orphaned zombie processes that it inherits.
```
2018-01-04 17:06:48 -08:00
Yu-Ju Hong 059fa35a84 dockershim: bump the minimum supported docker version to 1.11
Drop the 1.10 compatibilty code.
2018-01-04 10:22:16 -08:00