Commit Graph

6877 Commits (8060d565946848abe4f67ffffb810dd3505fe4cb)

Author SHA1 Message Date
k8s-ci-robot 628e44647f
Merge pull request #70111 from Pingan2017/OOD-node
remove OutOfDisk condition in kubelet
2018-10-29 14:38:32 -07:00
Deep Debroy 5da66fd65f Address code review comments
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-10-27 00:31:16 -07:00
Deep Debroy 119e2a1d43 Address CR comments and add more tests
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-10-26 00:29:27 -07:00
Deep Debroy 2e19f70922 Improve comments for when hostPath in Windows needs to be transformed
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-10-25 13:58:16 -07:00
Lv Jiawei 06a3391b0c
Replace resyncTicker with syncTicker in commenting
The variable resyncTicker in commenting is out of date. It is replaced with syncTicker.
2018-10-24 10:47:55 +08:00
k8s-ci-robot c0974d7399
Merge pull request #69516 from feiskyer/win-npipe
Switch windows runtime endpoints to npipe
2018-10-23 16:44:41 -07:00
Yongkun Gui b573cce595 cni: rate and limit must be both set
Fix #70014
2018-10-23 16:44:07 -07:00
k8s-ci-robot dad07683b1
Merge pull request #69013 from ibrasho-forks/switch-to-http.Error
Update usages of http.ResponseWriter.WriteHeader to use http.Error
2018-10-23 15:31:55 -07:00
k8s-ci-robot fcf11b47fc
Merge pull request #69677 from knightXun/patch-8
remove unnecessary time type
2018-10-22 23:59:14 -07:00
Pingan2017 36997bae77 remove OutOfDisk condition in kubelet 2018-10-23 11:01:26 +08:00
WanLinghao 060f3a84d9 trivial fix 2018-10-23 10:23:31 +08:00
Mike Danese e5227216c0 rebase authenticators onto new interface. 2018-10-22 10:16:59 -07:00
Pengfei Ni 053b71d5d2 Switch windows runtime endpoints to npipe 2018-10-22 21:28:36 +08:00
WanLinghao 7df1078d6f Currently, kubelet token mamanger only clean tokens who are expired. For tokens with long expiration, if the pod who creates them got killed or evicted, those tokens may stay in kubelet's memory until they are expired. It's bad for kubelet and node itself. After this patch, each time a pod was deleted, token manager would clean related tokens. 2018-10-22 09:32:59 +08:00
k8s-ci-robot 4339a70dfa
Merge pull request #68841 from krzysztof-jastrzebski/cpuandmemeory2
Optimizes calculating stats when only CPU and Memory stats are returned from Kubelet stats/summary http endpoint.
2018-10-18 16:41:07 -07:00
k8s-ci-robot 30a06af453
Merge pull request #69671 from mooncak/fix_kubelet
Delete duplicated words in logs
2018-10-17 11:57:12 -07:00
k8s-ci-robot e85cb406eb
Merge pull request #65567 from ceshihao/pod_status_after_eviction
Pod status should contain ContainerStatuses if deadline exceeded
2018-10-17 11:56:41 -07:00
k8s-ci-robot c68ee22156
Merge pull request #69613 from Pingan2017/runtimeError
improve err msg for runtimeError when the uptime of runtime never update
2018-10-15 13:52:51 -07:00
Ibrahim AshShohail 2fb3ba71f1
Update usages of http.ResponseWriter.WriteHeader to use http.Error
Signed-off-by: Ibrahim AshShohail <me@ibrasho.com>
2018-10-14 05:58:00 +03:00
Deep Debroy f8a69f1086 Broaden scope of host path types to skip processing in Windows
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-10-12 19:57:08 -07:00
tanshanshan b7c7966b9f Move pkg/scheduler/algorithm/well_known_labels.go out 2018-10-13 09:10:00 +08:00
knight 5ed6da9d9e
remove unnecessary time type
remove unnecessary time type, improve volume_manager.go
2018-10-11 21:06:46 +08:00
mooncake 1e6602d6d8 Fixup log
Signed-off-by: mooncake <xcoder@tenxcloud.com>
2018-10-11 19:14:36 +08:00
k8s-ci-robot a8c7a3fd5e
Merge pull request #69322 from jpbetz/etcd-client-3.3.9
Update etcd client to 3.3 for 1.13
2018-10-10 17:56:46 -07:00
Pingan2017 a5824043be improve err msg for runtimeError 2018-10-10 15:19:48 +08:00
k8s-ci-robot 85a8f97cb1
Merge pull request #68582 from jonfriesen/master
Fixes golint for pkg/probe
2018-10-09 21:14:46 -07:00
k8s-ci-robot 9ba74cb5b5
Merge pull request #69251 from yue9944882/bugfix/pass-handler-context-to-nodegetter
Pass server handler context to storage nodeGetter
2018-10-09 02:14:51 -07:00
Joe Betz 4263c75211 Update etcd client to 3.3.9 2018-10-08 13:34:34 -07:00
k8s-ci-robot 0f17e9ade6
Merge pull request #69386 from cblecker/go-1.11
Update to go1.11.1
2018-10-05 17:35:51 -07:00
Deep Debroy b4bb5dd430 Correctly handle named pipe host mounts for Windows
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-10-05 16:46:04 -07:00
Christoph Blecker 0d63b55944
fix vet error in pkg/kubelet/kubelet_test.go
pkg/kubelet/kubelet_test.go:1573: *k8s.io/kubernetes/pkg/kubelet/container/testing.FakePod composite literal uses unkeyed fields
2018-10-05 15:52:44 -07:00
Christoph Blecker 97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
Walter Fender f3f46d5f5a Moving the cloudprovider interface to staging.
Individual implementations are not yet being moved.
Fixed all dependencies which call the interface.
Fixed golint exceptions to reflect the move.
Added project info as per @dims and
https://github.com/kubernetes/kubernetes-template-project.
Added dims to the security contacts.
Fixed minor issues.
Added missing template files.
Copied ControllerClientBuilder interface to cp.
This allows us to break the only dependency on K8s/K8s.
Added TODO to ControllerClientBuilder.
Fixed GoDeps.
Factored in feedback from JustinSB.
2018-10-04 14:41:20 -07:00
k8s-ci-robot e03886c34a
Merge pull request #68297 from leakingtapan/golint-fix-gce-pd
fix golint for pkg/volume/gce_pd
2018-10-03 13:01:34 -07:00
k8s-ci-robot 823fca1d93
Merge pull request #69159 from dcbw/cni-log-messages
network/cni: more informative log messages
2018-10-02 19:24:49 -07:00
Dan Williams 6cfe116375 network/cni: more informative log messages
Log details about the pod name, namespace, sandbox ID, and result.
Remove some useless messages that are now redundant.
2018-10-01 21:01:40 -05:00
Seth Jennings 7a12ac10be fix cri-o when using unix prefix 2018-10-01 17:07:56 -05:00
Seth Jennings 5eab76934b improve pleg error msg when it has never been successful 2018-10-01 16:41:01 -05:00
k8s-ci-robot 3cef522c9a
Merge pull request #69258 from chestack/gclog
Fix the confusing kubelet logs about imageGC
2018-10-01 13:27:31 -07:00
Cheng Pan 7d68fd00e6 fix golint for pkg/volume/gce_pd 2018-10-01 18:58:30 +00:00
zuoxiu.jm 3370907fe5 pass handler ctx to node rest nodegetter 2018-10-01 09:27:18 -04:00
k8s-ci-robot c847a1f04b
Merge pull request #68462 from knightXun/dns
refactor kubelet/network/dns
2018-10-01 00:30:04 -07:00
chestack 613f572caf Fix the confusing kubelet logs about imageGC 2018-09-29 18:09:37 +08:00
k8s-ci-robot 165faaaddf
Merge pull request #68602 from Pingan2017/internalerr
remove internalError in runtimeStates , not set anywhere
2018-09-28 15:47:06 -07:00
k8s-ci-robot 6c1688712d
Merge pull request #68181 from Pingan2017/golint
fix golint failures - some packages under /pkg/kubelet
2018-09-28 01:56:26 -07:00
Derek Carr 5f473bc8e1 Kubelet should not create a new pod sandbox if all containers are done 2018-09-27 14:21:50 -04:00
k8s-ci-robot 05196d752b
Merge pull request #69043 from deads2k/auth-01-logging
make sure that log includes user information
2018-09-27 07:18:31 -07:00
k8s-ci-robot 12787275f4
Merge pull request #68929 from FengyunPan2/fix-memoryLimit
Configure resource-only container with memory limit
2018-09-27 06:06:39 -07:00
k8s-ci-robot 3fe21e5433
Merge pull request #68922 from BenTheElder/version-staging
move pkg/util/version to staging
2018-09-26 22:59:42 -07:00
k8s-ci-robot 08ed1631ac
Merge pull request #68879 from Pingan2017/typo-timeout
fix a small typo
2018-09-26 20:37:38 -07:00
k8s-ci-robot 0ca25b8db7
Merge pull request #68816 from FengyunPan2/cgroup-info
Add helpful log for checking cgrop path
2018-09-26 18:10:46 -07:00
k8s-ci-robot 109b67c291
Merge pull request #66516 from tallclair/redirect
Add verification to apiserver redirect following
2018-09-26 15:53:09 -07:00
k8s-ci-robot f263993b80
Merge pull request #67829 from krzysztof-jastrzebski/cpuandmemory
Add "only_cpu_and_memory" GET parameter to /stats/summary http handler in kubele
2018-09-26 14:42:24 -07:00
k8s-ci-robot 4404cda7ad
Merge pull request #68752 from krzysztof-jastrzebski/pod_sync
Start synchronizing pods after network is ready.
2018-09-26 04:56:48 -07:00
Tim Allclair 4ee9f007cb
Only allow apiserver to follow redriects to the same host 2018-09-25 17:18:55 -07:00
k8s-ci-robot 2285a7dd66
Merge pull request #68423 from smarterclayton/break_docker_types_on_credential_providre
Remove dependency on docker daemon for core credential types
2018-09-25 17:00:07 -07:00
k8s-ci-robot a3e30269dc
Merge pull request #68116 from krmayankk/read-dns-code
add validation for etc resolve parsing
2018-09-25 14:40:32 -07:00
k8s-ci-robot 5401f9458b
Merge pull request #67877 from tianshapjq/podprefix-used
use podPrefix as it's defined
2018-09-25 13:29:17 -07:00
David Eads c76f8f194c make sure that log includes user information 2018-09-25 14:10:09 -04:00
k8s-ci-robot a8e8e891f2
Merge pull request #68289 from denkensk/fix-simple-pkg-kubelet
Simple code fixed in in pkg/kubelet
2018-09-25 06:14:03 -07:00
k8s-ci-robot c16691037d
Merge pull request #68255 from leakingtapan/golint-fix-ebs
Fix golint for pkg/volume/aws_ebs
2018-09-25 06:13:33 -07:00
Mayank Kumar ef976f1f70 add validation for etc resolve parsing 2018-09-24 21:01:59 -07:00
FengyunPan2 34a8b1fd9f Add helpful log for checking cgrop path
Currently I just get 'xxx cgroup does not exist', but I don't know
which path has missed. Let's add log for it.
2018-09-25 10:10:12 +08:00
k8s-ci-robot 8346631860
Merge pull request #68053 from Pingan2017/rmifblock
clean up unneeded else block
2018-09-24 17:17:29 -07:00
Benjamin Elder 8b56eb8588 hack/update-gofmt.sh 2018-09-24 12:21:29 -07:00
Benjamin Elder f828c6f662 hack/update-bazel.sh 2018-09-24 12:03:24 -07:00
Benjamin Elder 088cf3c37b find & replace version import 2018-09-24 12:03:24 -07:00
k8s-ci-robot 170dcc2ea0
Merge pull request #68754 from bradhoekstra/optional-service-env-variables
kubelet: Make service environment variables optional
2018-09-24 10:59:32 -07:00
Renaud Gaubert 79056292aa Update pluginwatcher doc 2018-09-24 15:11:21 +02:00
Cheng Pan 000e30086b fix golint for pkg/volume/aws_ebs 2018-09-22 05:56:05 +00:00
Brad Hoekstra 69551689d5 Fix spelling 2018-09-22 00:07:08 -04:00
Brad Hoekstra 42da186b62 Address review comments 2018-09-21 20:06:32 -04:00
Brad Hoekstra c4ec40eca8 Update comment to reflect the new logic 2018-09-21 16:26:37 -04:00
Renaud Gaubert 63436ab4a3 Renamed pluginwatcher README to README.md 2018-09-21 16:25:33 +02:00
FengyunPan2 6af9e97fa5 Configure resource-only container with memory limit
Fixed: #68928
The docker memory limit should base on the memory capacity of
machine. Currently CgroupManager specify wrong memory limit.
2018-09-21 17:50:54 +08:00
Krzysztof Jastrzebski ad330f7dbe Start synchronizing pods after network is ready. 2018-09-21 10:12:49 +02:00
k8s-ci-robot fb50b3cb32
Merge pull request #67793 from fisherxu/use_ctx
Refactor grpc dial with dialcontext
2018-09-20 20:35:36 -07:00
Krzysztof Jastrzebski 3b21995c95 Process only CPU and memory stats when Kubelete stats API is called with
only_cpu_and_memory parameter. Before all stats were processed and
removed before returning.
2018-09-20 12:35:56 +02:00
Pingan2017 5de6ada98f fix a small typo 2018-09-20 16:04:12 +08:00
k8s-ci-robot 3429b9aca4
Merge pull request #62544 from astefanutti/56297
Init Kubelet runtime cache before dependent stats provider
2018-09-19 08:38:16 -07:00
Davanum Srinivas 02489f8988
Avoid setting Masked/ReadOnly paths when pod is privileged
In the recent PR on adding ProcMount, we introduced a regression when
pods are privileged. This shows up in 18.06 docker with kubeadm in the
kube-proxy container.

The kube-proxy container is privilged, but we end up setting the
`/proc/sys` to Read-Only which causes failures when running kube-proxy
as a pod. This shows up as a failure when using sysctl to set various
network things.

Change-Id: Ic61c4c9c961843a4e064e783fab0b54350762a8d
2018-09-18 17:46:16 -04:00
Brad Hoekstra e8366c8e99 Fix to inject KUBERNETES_ env vars when enableServiceLinks is
false and the pod is in the master namespace.
2018-09-17 16:28:49 -04:00
Brad Hoekstra ac8799a80d kubelet: Make service environment variables optional 2018-09-17 16:27:36 -04:00
Pingan2017 158552ff35 fix golint failures - /pkg/kubelet/images 2018-09-17 10:52:25 +08:00
k8s-ci-robot fb79943553
Merge pull request #67951 from liggitt/remove-deprecated-flags
Remove deprecated feature flags
2018-09-15 14:50:11 -07:00
Pingan2017 2f2c4ebc14 del internalError 2018-09-13 11:25:26 +08:00
k8s-ci-robot 9b8b6571a2
Merge pull request #68521 from yujuhong/nil-client
kubelet: skip initializing/using the RuntimeClass in standalone mode
2018-09-12 15:05:12 -07:00
k8s-ci-robot 37ef6eeb6d
Merge pull request #68431 from dashpole/cadvisor_godep_update
Update cAdvisor godeps to v0.31.0
2018-09-12 15:04:53 -07:00
Jon Friesen b971c3e200 Fix golint for pkg/probe
This change adds comments to exported things and renames the tcp,
http, and exec probe interfaces to just be Prober within their
namespace.

Issue #68026
2018-09-12 14:18:16 -07:00
Yu-Ju Hong a1f7ae7ab3 kubelet: skip initializing/using the RuntimeClass in standalone mode
In standalone mode, kubelet will not be configured to talk to an
apiserver. The RuntimeClass manager should be disabled in this case.
2018-09-11 13:21:53 -07:00
k8s-ci-robot 25cbd1c753
Merge pull request #67781 from dashpole/fix_priority_tests
Fix priority tests
2018-09-10 12:48:05 -07:00
David Ashpole 788196e45b update cadvisor to v0.31.0 2018-09-10 10:31:56 -07:00
knight a578c707c3 refactor kubelet/network/dns 2018-09-10 17:32:28 +08:00
Kubernetes Submit Queue 60ec6bf359
Merge pull request #64867 from dixudx/missing_container_ready_ltt
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

add missing LastTransitionTime of ContainerReady condition

**What this PR does / why we need it**:
add missing LastTransitionTime of ContainerReady condition

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

**Special notes for your reviewer**:
/cc freehan yujuhong

**Release note**:

```release-note
add missing LastTransitionTime of ContainerReady condition
```
2018-09-08 17:22:30 -07:00
fisherxu 89f3fa3d62 use dailcontext 2018-09-08 16:07:38 +08:00
David Ashpole 90f58c1157 critical pod test should not rely on feature gate set in framework; non-critical pods are always preemptable 2018-09-07 17:43:42 -07:00
Clayton Coleman 7e398dc31f
Remove dependency on docker daemon for core credential types
We are removing dependencies on docker types where possible in the core
libraries. credentialprovider is generic to Docker and uses a public API
(the config file format) that must remain stable. Create an equivalent type
and use a type cast (which would error if we ever change the type) in the
dockershim. We already perform a transformation like this for CRI and so
we aren't changing much.
2018-09-07 16:36:14 -04:00
Kubernetes Submit Queue a6eb49f0dc
Merge pull request #68195 from luxas/consolidate_componentconfig_code_standards
Automatic merge from submit-queue (batch tested with PRs 67950, 68195). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Consolidate componentconfig code standards

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

This PR fixes a bunch of very small misalignments in ComponentConfig packages:
 - Add sane comments to all functions/variables in componentconfig `register.go` files
 - Make the `register.go` files of componentconfig pkgs follow the same pattern and not differ from each other like they do today.
 - Register the `openapi-gen` tag in all `doc.go` files where the pkg contains _external_ types.
 - Add the `groupName` tag where missing
 - Fix cases where `addKnownTypes` was registered twice in the `SchemeBuilder`
 - Add `Readme` and `OWNERS` files to `Godeps` directories if missing.

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


**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @sttts @thockin
2018-09-07 11:19:40 -07:00
David Ashpole 137c6d638e remove feature gate from kubelet defaulting 2018-09-06 18:17:09 -07:00
Kubernetes Submit Queue 4bb3712a75
Merge pull request #68119 from WanLinghao/token_controller_cachekey_fix
Automatic merge from submit-queue (batch tested with PRs 68119, 68191). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

fix token controller keyFunc bug

Currently, token manager use keyFunc like: `fmt.Sprintf("%q/%q/%#v", name, namespace, tr.Spec)`.
Since tr.Spec contains point fields, new token request would not reuse the cache at all.
This patch fix this, also adds unit test.

```release-note
NONE
```
2018-09-06 16:20:36 -07:00
Krzysztof Jastrzebski 138a3c7172 Add "only_cpu_and_memory" GET parameter to /stats/summary http handler in kubelet. If parameter is true then only cpu and memory will be present in response. The parameter will be used by Metric Server to avoid sending/decoding unneeded data. 2018-09-06 21:49:00 +02:00
WanLinghao 794e665d7b Currently, token manager use keyFunc like: `fmt.Sprintf("%q/%q/%#v", name, namespace, tr.Spec)`.
Since tr.Spec contains point fields, new token request would not reuse
the cache at all.  This patch fix this, also adds unit test.

Signed-off-by: Mike Danese <mikedanese@google.com>
2018-09-06 09:03:26 -07:00
Renaud Gaubert 8dd1d27c03 Updated the device manager pluginwatcher handler 2018-09-06 15:34:46 +02:00
Renaud Gaubert 78b55eb5bf Updated the CSI pluginwatcher handler 2018-09-06 15:34:46 +02:00
Renaud Gaubert 29d225e90c Update pluginwatcher tests 2018-09-06 14:44:03 +02:00
Renaud Gaubert 4d18aa63cd Refactor pluginwatcher to use the new API 2018-09-06 14:42:21 +02:00
Renaud Gaubert 2eb91e89c0 Update the plugin watcher interface 2018-09-06 14:42:21 +02:00
Lucas Käldström 83d53ea1c2
Standardize componentconfig code/comment patterns 2018-09-06 13:42:02 +03:00
Kubernetes Submit Queue 4bc9e94fee
Merge pull request #67690 from feiskyer/iptables-cross
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Kubelet: only sync iptables on linux

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

Iptables is only supported on Linux, kubelet should only sync NAT rules on Linux.

Without this PR, Kubelet on Windows would logs following errors on each `syncNetworkUtil()`:

```
kubelet.err.log:4692:E0711 22:03:42.103939    2872 kubelet_network.go:102] Failed to ensure that nat chain KUBE-MARK-DROP exists: error creating chain "KUBE-MARK-DROP": executable file
```

**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 #65713

**Special notes for your reviewer**:

**Release note**:

```release-note
Kubelet now only sync iptables on Linux.
```
2018-09-05 22:55:15 -07:00
wangqingcan 6506e0c51a Simple code and typo fixed in in kubelet 2018-09-06 09:12:39 +08:00
Kubernetes Submit Queue 0df5d8d205
Merge pull request #67909 from tallclair/runtimeclass-kubelet
Automatic merge from submit-queue (batch tested with PRs 68161, 68023, 67909, 67955, 67731). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Dynamic RuntimeClass implementation

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

Implement RuntimeClass using the dynamic client to break the dependency on https://github.com/kubernetes/kubernetes/pull/67791

Once (if) https://github.com/kubernetes/kubernetes/pull/67791 merges, I will migrate to the typed client.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
For https://github.com/kubernetes/features/issues/585

**Release note**:
Covered by #67737
```release-note
NONE
```

/sig node
/kind feature
/priority important-soon
/milestone v1.12
2018-09-05 14:51:47 -07:00
Kubernetes Submit Queue 70a0089ae6
Merge pull request #68200 from RenaudWasTaken/pluginwatcher-beta
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

KubeletPluginsWatcher feature is beta in 1.12 release

*What this PR does / why we need it:*
Graduates DevicePlugins feature to beta.

*Which issue(s) this PR fixes:*
Related but does not fix: https://github.com/kubernetes/features/issues/595 as well as https://github.com/kubernetes/kubernetes/issues/65773

*Special notes for your reviewer:*
Includes upgrading the gRPC pluginwatcher API to beta. Based on the [device plugin model](https://github.com/kubernetes/kubernetes/pull/59588).

*Depends on https://github.com/kubernetes/kubernetes/pull/64621 being merged* 

Release note:

```release-note
KubeletPluginsWatcher feature graduates to beta.
```

/sig node
/sig storage

/cc @vladimirvivien @sbezverk @vikaschoudhary16 @saad-ali @vishh @jiayingz
2018-09-05 13:18:39 -07:00
wangqingcan b0c308f082 Simple code and typo fixed in in pkg/kubelet 2018-09-05 21:51:32 +08:00
Kubernetes Submit Queue 743e4fba63
Merge pull request #67709 from feiskyer/inodes-clean
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

 Kubelet: only apply default hard evictions of nodefs.inodesFree on Linux

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

Kubelet sets default hard evictions of `nodefs.inodesFree ` for all platforms today. This will cause errors on Windows and a lot `no observation found for eviction signal nodefs.inodesFree` errors will be logs for kubelet.

```
kubelet.err.log:4961:W0711 22:21:12.378789    2872 helpers.go:808] eviction manager: no observation found for eviction signal nodefs.inodesFree
kubelet.err.log:4967:W0711 22:21:30.411371    2872 helpers.go:808] eviction manager: no observation found for eviction signal nodefs.inodesFree
kubelet.err.log:4974:W0711 22:21:48.446456    2872 helpers.go:808] eviction manager: no observation found for eviction signal nodefs.inodesFree
kubelet.err.log:4978:W0711 22:22:06.482441    2872 helpers.go:808] eviction manager: no observation found for eviction signal nodefs.inodesFree
```

This PR updates the default hard eviction value and only apply nodefs.inodesFree on Linux.

**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 #66088

**Special notes for your reviewer**:

**Release note**:

```release-note
Kubelet only applies default hard evictions of nodefs.inodesFree on Linux
```
2018-09-04 23:08:30 -07:00
Kubernetes Submit Queue 8f906fefae
Merge pull request #66427 from feiskyer/win-pods-stats
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Add kubelet stats for windows system container "pods"

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

This PR adds kubelet stats for windows system container "pods". Without this, kubelet will always logs error: 

```
kubelet.err.log:4832:E0711 22:12:49.241358    2872 helpers.go:735] eviction manager: failed to construct signal: "allocatableMemory.available" error: system container "pods" not found
```

**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 #66087

**Special notes for your reviewer**:

/sig windows
/sig node

**Release note**:

```release-note
Add kubelet stats for windows system container "pods"
```
2018-09-04 21:59:49 -07:00
Pengfei Ni 376b45cb64 Fix unit tests for Windows
* TestMakeBlockVolume is moved to Linux only.
* TestMakeMounts are running on both Linux and Windows
2018-09-05 10:22:53 +08:00
Pengfei Ni aeea967149 Kubelet: only sync iptables on linux 2018-09-05 10:22:48 +08:00
Tim Allclair 63f3bc1b7e
Implement RuntimeClass support for the Kubelet & CRI 2018-09-04 13:45:11 -07:00
Renaud Gaubert 44dd0672b6 Add pluginwatcher generated files 2018-09-04 20:22:59 +02:00
Renaud Gaubert f8e80e45e7 Create pkg/kubelet/apis/pluginregistration/v1beta1 directory 2018-09-04 20:22:59 +02:00
Pengfei Ni 8255318b96 Kubelet: do not report used inodes on Windows 2018-09-03 16:42:33 +08:00
Pengfei Ni e1fdaa177f Kubelet: only apply default hard evictions of nodefs.inodesFree on Linux 2018-09-03 16:42:30 +08:00
Lucas Käldström 8b6a7ee075
autogenerated go code, godeps, bazel and gofmt 2018-09-02 14:38:59 +03:00
Lucas Käldström 15760506c2
Move the kubelet's external types to k8s.io/kubelet 2018-09-02 14:19:38 +03:00
Lucas Käldström 0707b1274f
Automated package reference rename 2018-09-02 14:15:38 +03:00
Sandor Szücs 588d2808b7
fix #51135 make CFS quota period configurable, adds a cli flag and config option to kubelet to be able to set cpu.cfs_period and defaults to 100ms as before.
It requires to enable feature gate CustomCPUCFSQuotaPeriod.

Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2018-09-01 20:19:59 +02:00
Kubernetes Submit Queue 33cca5251c
Merge pull request #67255 from bertinatto/promote_mount_propagation
Automatic merge from submit-queue (batch tested with PRs 65251, 67255, 67224, 67297, 68105). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Promote mount propagation to GA

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

This PR promotes mount propagation to GA.

Website PR: https://github.com/kubernetes/website/pull/9823

**Release note**:

```release-note
Mount propagation has promoted to GA. The `MountPropagation` feature gate is deprecated and will be removed in 1.13.
```
2018-08-31 19:25:30 -07:00
Kubernetes Submit Queue 85300f4f5d
Merge pull request #67803 from saad-ali/csiClusterReg3
Automatic merge from submit-queue (batch tested with PRs 64283, 67910, 67803, 68100). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

CSI Cluster Registry and Node Info CRDs

**What this PR does / why we need it**:
Introduces the new `CSIDriver` and `CSINodeInfo` API Object as proposed in https://github.com/kubernetes/community/pull/2514 and https://github.com/kubernetes/community/pull/2034

**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 https://github.com/kubernetes/features/issues/594

**Special notes for your reviewer**:
Per the discussion in https://groups.google.com/d/msg/kubernetes-sig-storage-wg-csi/x5CchIP9qiI/D_TyOrn2CwAJ the API is being added to the staging directory of the `kubernetes/kubernetes` repo because the consumers will be attach/detach controller and possibly kubelet, but it will be installed as a CRD (because we want to move in the direction where the API server is Kubernetes agnostic, and all Kubernetes specific types are installed).

**Release note**:

```release-note
Introduce CSI Cluster Registration mechanism to ease CSI plugin discovery and allow CSI drivers to customize Kubernetes' interaction with them.
```

CC @jsafrane
2018-08-31 16:46:41 -07:00
Kubernetes Submit Queue 39004e852b
Merge pull request #64283 from jessfraz/ProcMountType
Automatic merge from submit-queue (batch tested with PRs 64283, 67910, 67803, 68100). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Add a ProcMount option to the SecurityContext & AllowedProcMountTypes to PodSecurityPolicy

So there is a bit of a chicken and egg problem here in that the CRI runtimes will need to implement this for there to be any sort of e2e testing.

**What this PR does / why we need it**: This PR implements design proposal https://github.com/kubernetes/community/pull/1934. This adds a ProcMount option to the SecurityContext and AllowedProcMountTypes to PodSecurityPolicy

Relies on https://github.com/google/cadvisor/pull/1967

**Release note**:

```release-note
ProcMount added to SecurityContext and AllowedProcMounts added to PodSecurityPolicy to allow paths in the container's /proc to not be masked.
```

cc @Random-Liu @mrunalp
2018-08-31 16:46:33 -07:00
Jan Safranek 7d673cb8f0 Pass new CSI API Client and informer to Volume Plugins 2018-08-31 12:25:59 -07:00
Fabio Bertinatto b87a57a111 Promote mount propagation to GA 2018-08-31 10:04:51 +02:00
Kubernetes Submit Queue c1e37a5f16
Merge pull request #66056 from mikedanese/fixhang
Automatic merge from submit-queue (batch tested with PRs 67349, 66056). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

wait until apiserver connection before starting kubelet tls bootstrap

I wonder if this helps with sometimes slow network programming

cc @mwielgus @awly
2018-08-30 20:16:32 -07:00
Jess Frazelle 1a4cf7a36e
make update
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 18:24:23 -04:00
Mike Danese 2cf1c75e07 wait until apiserver connection before starting kubelet tls bootstrap 2018-08-30 11:37:05 -07:00
Jess Frazelle 20cc40a5dc
ProcMount: add dockershim support
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 11:40:06 -04:00
Jess Frazelle 31ffd9f881
vendor: update docker cadvisor winterm
This vendor change was purely for the changes in docker to allow for
setting the Masked and Read-only paths.

See: moby/moby#36644

But because of the docker dep update it also needed cadvisor to be
updated and winterm due to changes in pkg/tlsconfig in docker

See: google/cadvisor#1967

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 11:40:05 -04:00
Jess Frazelle dbf7186bee
update jsonlog path for updated vendor
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 11:40:05 -04:00
Jess Frazelle 30dcca6233
ProcMount: add api options and feature gate
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 11:40:02 -04:00
Jess Frazelle 6b7c39a4f8
pkg/kubelet/apis/cri/runtime: add masked_paths and readonly_paths
generate runtime protobufs

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 11:39:18 -04:00
Pingan2017 2f1284bc34 cleanup unneeded if block 2018-08-30 17:18:56 +08:00
Lucas Käldström 844487aea4
autogenerated 2018-08-29 20:21:17 +03:00
Lucas Käldström 994ac98586
Update api violations, golint failures and gofmt 2018-08-29 20:21:09 +03:00
Lucas Käldström 7a840cb4c8
automated: Rename all package references 2018-08-29 19:07:52 +03:00
Lucas Käldström 62bfe29ce4
automated, boring: Rename pkg/kubelet/apis/{kubelet,}config 2018-08-29 18:59:05 +03:00
Kubernetes Submit Queue cd06419973
Merge pull request #67369 from tianshapjq/should-not-eventf-directly
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>.

should not event directly

**What this PR does / why we need it**:
should not event directly, using recordContainerEvent() to generate ref and deduplicate events instead.

**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-08-28 16:18:13 -07:00
Kubernetes Submit Queue a26e1ddacc
Merge pull request #67739 from liggitt/hostname-override
Automatic merge from submit-queue (batch tested with PRs 67739, 65222). 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>.

Honor --hostname-override, report compatible hostname addresses with cloud provider

xref #67714

7828e5d made cloud providers authoritative for the addresses reported on Node objects, so that the addresses used by the node (and requested as SANs in serving certs) could be verified via cloud provider metadata.

This had the effect of no longer reporting addresses of type Hostname for Node objects for some cloud providers. Cloud providers that have the instance hostname available in metadata should add a `type: Hostname` address to node status. This is being tracked in #67714

This PR does a couple other things to ease the transition to authoritative cloud providers:
* if `--hostname-override` is set on the kubelet, make the kubelet report that `Hostname` address. if it can't be verified via cloud-provider metadata (for cert approval, etc), the kubelet deployer is responsible for fixing the situation by adjusting the kubelet configuration (as they were in 1.11 and previously)
* if `--hostname-override` is not set, *and* the cloud provider didn't report a Hostname address, *and* the auto-detected hostname matches one of the addresses the cloud provider *did* report, make the kubelet report that as a Hostname address. That lets the addresses remain verifiable via cloud provider metadata, while still including a `Hostname` address whenever possible.

/sig node
/sig cloud-provider

/cc @mikedanese

fyi @hh

```release-note
NONE
```
2018-08-28 12:31:00 -07:00
Jordan Liggitt e309bd3abf
Remove deprecated feature flags 2018-08-28 15:25:46 -04:00
Jordan Liggitt 2857de73ce
Honor --hostname-override, report compatible hostname addresses with cloud provider 2018-08-28 11:21:01 -04:00
Kubernetes Submit Queue 2eb14e3007
Merge pull request #64973 from nokia/k8s-sctp
Automatic merge from submit-queue (batch tested with PRs 67694, 64973, 67902). 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>.

SCTP support implementation for Kubernetes

**What this PR does / why we need it**: This PR adds SCTP support to Kubernetes, including Service, Endpoint, and NetworkPolicy.

**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 #44485

**Special notes for your reviewer**:

**Release note**:

```release-note

SCTP is now supported as additional protocol (alpha) alongside TCP and UDP in Pod, Service, Endpoint, and NetworkPolicy.  

```
2018-08-28 07:21:18 -07:00
Tim Allclair 62d56060b7 Remove unused kubelet dependency 2018-08-27 16:48:12 -07:00