Commit Graph

822 Commits (d48611a1da00a2fe32011404fe25fb6af51673a5)

Author SHA1 Message Date
Jordan Liggitt f8f57d8959
Use separate client for node status loop 2017-09-14 15:56:22 -04:00
Kubernetes Submit Queue b6545a086c Merge pull request #51728 from derekwaynecarr/cadvisor-stats
Automatic merge from submit-queue (batch tested with PRs 51728, 49202)

Enable CRI-O stats from cAdvisor

**What this PR does / why we need it**:
cAdvisor may support multiple container runtimes (docker, rkt, cri-o, systemd, etc.)

As long as the kubelet continues to run cAdvisor, runtimes with native cAdvisor support may not want to run multiple monitoring agents to avoid performance regression in production.  Pending kubelet running a more light-weight monitoring solution, this PR allows remote runtimes to have their stats pulled from cAdvisor when cAdvisor is registered stats provider by introspection of the runtime endpoint.

See issue https://github.com/kubernetes/kubernetes/issues/51798

**Special notes for your reviewer**:
cAdvisor will be bumped to pick up https://github.com/google/cadvisor/pull/1741

At that time, CRI-O will support fetching stats from cAdvisor.

**Release note**:
```release-note
NONE
```
2017-09-06 20:00:57 -07:00
Kubernetes Submit Queue eb86cc5e87 Merge pull request #51634 from verb/sharedpid-default-off
Automatic merge from submit-queue (batch tested with PRs 51984, 51351, 51873, 51795, 51634)

Revert to using isolated PID namespaces in Docker

**What this PR does / why we need it**: Reverts to the previous docker default of using isolated PID namespaces for containers in a pod. There exist container images that expect always to be PID 1 which we want to support unmodified in 1.8.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Sharing a PID namespace between containers in a pod is disabled by default in 1.8. To enable for a node, use the --docker-disable-shared-pid=false kubelet flag. Note that PID namespace sharing requires docker >= 1.13.1.
```
2017-09-05 18:40:33 -07:00
Connor Doyle d0bcbbb437 Added static cpumanager policy. 2017-09-04 07:24:59 -07:00
Connor Doyle ec706216e6 Un-revert "CPU manager wiring and `none` policy"
This reverts commit 8d2832021a.
2017-09-04 07:24:59 -07:00
Lee Verberne 145c343273 Revert to using isolated PID namespaces in Docker
A shared PID namespace were enabled by default in the 1.7 when running
with a supported Docker runtime, but a Docker version that supports
a shared namespace was not qualified for use.

Release 1.8 will qualify a docker version supporting shared PID, but we
don't want to cause disruption for container images which expect always
to have PID 1.
2017-09-01 23:50:11 +02:00
Jiaying Zhang 02001af752 Kubelet side extension to support device allocation 2017-09-01 11:56:35 -07:00
Shyam JVS 8d2832021a Revert "CPU manager wiring and `none` policy" 2017-09-01 18:17:36 +02:00
Kubernetes Submit Queue c65ab61b3f Merge pull request #51372 from mtaufen/feature-gate-file
Automatic merge from submit-queue (batch tested with PRs 49971, 51357, 51616, 51649, 51372)

Separate feature gates for dynamic kubelet config vs loading from a file

This makes it so these two features can be turned on independently, rather than bundling both under dynamic kubelet config.

fixes: #51664

```release-note
NONE
```
2017-09-01 01:12:47 -07:00
Derek Carr 566f411b08 Support remote runtimes with native cAdvisor support 2017-08-31 16:41:53 -04:00
Connor Doyle 50674ec614 Added cpu-manager-reconcile-period config.
- Defaults to sync-frequency.
2017-08-30 23:42:32 -07:00
Michael Taufen 0e25cbd6a0 Separate feature gates for dynamic kubelet config vs loading from a file 2017-08-30 14:52:37 -07:00
Connor Doyle 7c6e31617d CPU Manager initialization and lifecycle calls. 2017-08-30 08:50:41 -07:00
Connor Doyle 5dee682796 CPU manager config and feature gate. 2017-08-30 08:27:23 -07:00
Jacob Simpson a0d81d1abb Move rotating kubelet client certificate to beta. 2017-08-29 09:25:12 -07:00
Kubernetes Submit Queue 7c70decd27 Merge pull request #51312 from andrewsykim/50986
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

Deprecation warnings for auto detecting cloud providers

**What this PR does / why we need it**:
Adds deprecation warnings for auto detecting cloud providers. As part of the initiative for out-of-tree cloud providers, this feature is conflicting since we're shifting the dependency of kubernetes core into cAdvisor. In the future kubelets should be using `--cloud-provider=external` or no cloud provider at all. 

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

**Special notes for your reviewer**:
NOTE: I still have to coordinate with sig-node and kubernetes-dev to get approval for this deprecation, I'm only opening this PR since we're close to code freeze and it's something presentable.  

**Release note**:
```release-note
Deprecate auto detecting cloud providers in kubelet. Auto detecting cloud providers go against the initiative for out-of-tree cloud providers as we'll now depend on cAdvisor integrations with cloud providers instead of the core repo. In the near future, `--cloud-provider` for kubelet will either be an empty string or `external`. 
```
2017-08-29 01:17:37 -07:00
Kubernetes Submit Queue 932e07af53 Merge pull request #50031 from verult/ConnectedProbe
Automatic merge from submit-queue (batch tested with PRs 51054, 51101, 50031, 51296, 51173)

Dynamic Flexvolume plugin discovery, probing with filesystem watch.

**What this PR does / why we need it**: Enables dynamic Flexvolume plugin discovery. This model uses a filesystem watch (fsnotify library), which notifies the system that a probe is necessary only if something changes in the Flexvolume plugin directory.

This PR uses the dependency injection model in https://github.com/kubernetes/kubernetes/pull/49668.

**Release Note**:
```release-note
Dynamic Flexvolume plugin discovery. Flexvolume plugins can now be discovered on the fly rather than only at system initialization time.
```

/sig-storage

/assign @jsafrane @saad-ali 
/cc @bassam @chakri-nelluri @kokhang @liggitt @thockin
2017-08-26 02:05:34 -07:00
Kubernetes Submit Queue 76c520cea3 Merge pull request #50889 from NickrenREN/local-storage-eviction
Automatic merge from submit-queue (batch tested with PRs 50889, 51347, 50582, 51297, 51264)

Change eviction manager to manage one single local storage resource

**What this PR does / why we need it**:
We decided to manage one single resource name, eviction policy should be modified too.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
Change eviction manager to manage one single local ephemeral storage resource
```

/assign @jingxu97
2017-08-25 22:43:26 -07:00
andrewsykim fd86022714 add deprecation warnings for auto detecting cloud providers 2017-08-25 19:30:52 -04:00
NickrenREN 27901ad5df Change eviction policy to manage one single local storage resource 2017-08-26 05:14:49 +08:00
Michael Taufen 6918ab1d70 fix ReadOnlyPort, HealthzPort, CAdvisorPort defaulting/documentation
The ReadOnlyPort defaulting prevented passing 0 to diable via
the KubeletConfiguraiton struct.

The HealthzPort defaulting prevented passing 0 to disable via the
KubeletConfiguration struct. The documentation also failed to mention
this, but the check is performed in code.

The CAdvisorPort documentation failed to mention that you can pass 0 to
disable.
2017-08-25 13:15:36 -07:00
Cheng Xing 396c3c7c6f Adding dynamic Flexvolume plugin discovery capability, using filesystem watch. 2017-08-25 11:42:32 -07:00
Kubernetes Submit Queue c6980e7247 Merge pull request #51033 from mtaufen/revert-51008-revert-50789-fix-scheme
Automatic merge from submit-queue (batch tested with PRs 50967, 50505, 50706, 51033, 51028)

Revert "Merge pull request #51008 from kubernetes/revert-50789-fix-scheme"

I'm spinning up a cluster right now to test this fix, but I'm pretty sure this was the problem.
There doesn't seem to be a way to confirm from logs, because AFAICT the logs from the hollow kubelet containers are not collected as part of the kubemark test.

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

This reverts commit f4afdecef8, reversing
changes made to e633a1604f.

This also fixes a bug where Kubemark was still using the core api scheme
to manipulate the Kubelet's types, which was the cause of the initial
revert.

**Which issue this PR fixes**: fixes #51007

**Release note**:

```release-note
NONE
```

/cc @shyamjvs @wojtek-t
2017-08-22 10:48:21 -07:00
Kubernetes Submit Queue 99e50f3544 Merge pull request #50970 from mtaufen/fix-unhandled-error
Automatic merge from submit-queue (batch tested with PRs 46458, 50934, 50766, 50970, 47698)

Fix unhandled error

Fixes an unhandled error in the kubelet startup code.
fixes: https://github.com/kubernetes/kubernetes/issues/50981
2017-08-21 18:11:25 -07:00
Michael Taufen a90d81620b Revert "Merge pull request #51008 from kubernetes/revert-50789-fix-scheme"
This reverts commit f4afdecef8, reversing
changes made to e633a1604f.

This also fixes a bug where Kubemark was still using the core api scheme
to manipulate the Kubelet's types, which was the cause of the initial
revert.
2017-08-21 11:28:05 -07:00
Michael Taufen c48b2dd7e4 Fix unhandled error 2017-08-19 11:54:17 -07:00
NickrenREN b00ec8e46c Cleanup makeEventRecorder function
drop KubeletConfiguration arg since it is unused
2017-08-18 14:54:10 +08:00
Michael Taufen 24bab4c20f move KubeletConfiguration out of componentconfig API group 2017-08-15 08:12:42 -07:00
Pengfei Ni c242432a3b Rename runtime/default to docker default 2017-08-13 15:42:15 +08:00
Pengfei Ni f3150c9c8c Support seccomp profile from container's security context 2017-08-13 15:42:15 +08:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Jeff Grafton cf55f9ed45 Autogenerate BUILD files 2017-08-11 09:30:23 -07:00
Michael Taufen 443d58e40a Dynamic Kubelet Configuration
Alpha implementation of the Dynamic Kubelet Configuration feature.
See the proposal doc in #29459.
2017-08-08 12:21:37 -07:00
Dr. Stefan Schimanski 1910b5a1dd Fix code implicitly casting clientsets to getters 2017-08-06 15:30:13 +02:00
Kubernetes Submit Queue fae79dd4b4 Merge pull request #47181 from dims/fail-on-swap-enabled
Automatic merge from submit-queue (batch tested with PRs 50119, 48366, 47181, 41611, 49547)

Fail on swap enabled and deprecate experimental-fail-swap-on flag

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

    * Deprecate the old experimental-fail-swap-on
    * Add a new flag fail-swap-on and set it to true

    Before this change, we would not fail when swap is on. With this
    change we fail for everyone when swap is on, unless they explicitly
    set --fail-swap-on to false.

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

Fixes #34726

**Special notes for your reviewer**:

**Release note**:

```release-note
Kubelet will by default fail with swap enabled from now on. The experimental flag "--experimental-fail-swap-on" has been deprecated, please set the new "--fail-swap-on" flag to false if you wish to run with /proc/swaps on.
```
2017-08-04 14:29:36 -07:00
Davanum Srinivas 71e8c8eba4 Fail on swap enabled and deprecate experimental-fail-swap-on flag
* Deprecate the old experimental-fail-swap-on
* Add a new flag fail-swap-on and set it to true

Before this change, we would not fail when swap is on. With this
change we fail for everyone when swap is on, unless they explicitly
set --fail-swap-on to false.
2017-08-02 16:20:01 -04:00
Eric Chiang 98795b32de generated:
Commands run:

	./hack/update-bazel.sh
2017-08-01 16:33:52 -07:00
Eric Chiang 11d96c174e certificate manager: close existing client conns once cert rotates
After the kubelet rotates its client cert, it will keep connections
to the API server open indefinitely, causing it to use its old
credentials instead of the new certs

When the kubelet rotates its cert, close down existing connections
to force a new TLS handshake.
2017-08-01 16:33:52 -07:00
Kubernetes Submit Queue 740ca9a052 Merge pull request #49538 from supereagle/versioned-coreclient
Automatic merge from submit-queue (batch tested with PRs 49538, 49708, 47665, 49750, 49528)

Use the core client with version

**What this PR does / why we need it**:
Replace the **deprecated** `clientSet.Core()` with `clientSet.CoreV1()`.

**Which issue this PR fixes**: fixes #49535

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-07-29 05:28:49 -07:00
Kubernetes Submit Queue dcb1d2875e Merge pull request #47539 from gnufied/deprecate-keep-terminated-pod-volumes
Automatic merge from submit-queue (batch tested with PRs 45813, 49594, 49443, 49167, 47539)

Deprecate keep-terminated-pod-volumes

It was discussed and agreed by sig-storage that
this flag causes unnecessary confusion and is hard to keep
synchornized with controller's attach/detach functionality.

Fixes https://github.com/kubernetes/kubernetes/issues/45615

```release-note
keep-terminated-pod-volumes flag on kubelet is deprecated.
```
2017-07-28 07:22:41 -07:00
Kubernetes Submit Queue b3db5a20c1 Merge pull request #43494 from guangxuli/fix_k8s_kubelet_panix
Automatic merge from submit-queue (batch tested with PRs 49238, 49595, 43494, 47897, 48905)

Should not set struct pointer directly to interface which may cause potential panic

fix https://github.com/kubernetes/kubernetes/issues/43127 to avoid potential kubelet panic.

In our old implemention, interface `kubeDeps.EventClient ` (interface) will never equals to `nil` even if `eventClient `(struct pointer )was set to `nil`.  `kubeDeps.ExternalKubeClient` and `kubeDeps.KubeClient` also have same potential risk.
2017-07-28 02:12:56 -07:00
supereagle edce96c5b6 use the core client with version 2017-07-26 19:16:02 +08:00
Clayton Coleman 333536a68b
Move client cert bootstrap to a kubelet package
Makes it more clearly associated with the existing code and simplifies
cmd/kubelet/app.
2017-07-25 17:54:15 -04:00
Clayton Coleman 48236f0321
Move cmd/kubelet/app/bootstrap.go to a kubelet subpackage 2017-07-25 17:53:39 -04:00
Kubernetes Submit Queue 2189314895 Merge pull request #40050 from mtaufen/standalone-mode
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Use presence of kubeconfig file to toggle standalone mode

Fixes #40049 

```release-note
The deprecated --api-servers flag has been removed. Use --kubeconfig to provide API server connection information instead. The --require-kubeconfig flag is now deprecated. The default kubeconfig path is also deprecated. Both --require-kubeconfig and the default kubeconfig path will be removed in Kubernetes v1.10.0.
```

/cc @kubernetes/sig-cluster-lifecycle-misc @kubernetes/sig-node-misc
2017-07-25 12:14:43 -07:00
Kubernetes Submit Queue 9350afd772 Merge pull request #48976 from supereagle/cleanup-api-package
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Remove duplicated import and wrong alias name of api package

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

**Which issue this PR fixes**: fixes #48975

**Special notes for your reviewer**:
/assign @caesarxuchao

**Release note**:
```release-note
NONE
```
2017-07-25 12:14:38 -07:00
Kubernetes Submit Queue 7f1d9382ec Merge pull request #48846 from dashpole/remove_ood
Automatic merge from submit-queue

Remove flags low-diskspace-threshold-mb and outofdisk-transition-frequency

issue: #48843

This removes two flags replaced by the eviction manager.  These have been depreciated for two releases, which I believe correctly follows the kubernetes depreciation guidelines.

```release-note
Remove depreciated flags: --low-diskspace-threshold-mb and --outofdisk-transition-frequency, which are replaced by --eviction-hard
```

cc @mtaufen since I am changing kubelet flags
cc @vishh @derekwaynecarr 
/sig node
2017-07-24 23:05:50 -07:00
Kubernetes Submit Queue e623fed778 Merge pull request #48636 from jingxu97/July/allocatable
Automatic merge from submit-queue (batch tested with PRs 48636, 49088, 49251, 49417, 49494)

Fix issues for local storage allocatable feature

This PR fixes the following issues:
1. Use ResourceStorageScratch instead of ResourceStorage API to represent
local storage capacity
2. In eviction manager, use container manager instead of node provider
(kubelet) to retrieve the node capacity and reserved resources. Node
provider (kubelet) has a feature gate so that storagescratch information
may not be exposed if feature gate is not set. On the other hand,
container manager has all the capacity and allocatable resource
information.

This PR fixes issue #47809
2017-07-24 19:30:33 -07:00
supereagle adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00