Commit Graph

630 Commits (bcfae7e1ed93d5c2000aebdbb2e89f32352dc422)

Author SHA1 Message Date
Michael Taufen 2ee2ec5e21 Remove the deprecated --babysit-daemons kubelet flag 2017-05-17 09:08:57 -07:00
Michael Taufen 93f392251c Mark kubelet's master-service-namespace flag deprecated
This flag is already deprecated in the API server:
- https://kubernetes.io/docs/admin/kube-apiserver/
- https://kubernetes.io/docs/admin/federation-apiserver/
2017-05-12 06:37:48 -07:00
Yu-Ju Hong daa329c9ae Remove the deprecated `--enable-cri` flag
Except for rkt, CRI is the default and only integration point for
container runtimes.
2017-05-10 13:03:41 -07:00
Kubernetes Submit Queue 77b2e6302c Merge pull request #45236 from verb/sharedpid-2-default
Automatic merge from submit-queue

Enable shared PID namespace by default for docker pods

**What this PR does / why we need it**: This PR enables PID namespace sharing for docker pods by default, bringing the behavior of docker in line with the other CRI runtimes when used with docker >= 1.13.1.

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

**Special notes for your reviewer**: cc @dchen1107 @yujuhong 

**Release note**:

```release-note
Kubernetes now shares a single PID namespace among all containers in a pod when running with docker >= 1.13.1. This means processes can now signal processes in other containers in a pod, but it also means that the `kubectl exec {pod} kill 1` pattern will cause the pod to be restarted rather than a single container.
```
2017-05-10 12:06:01 -07:00
Kubernetes Submit Queue 51a3413371 Merge pull request #45307 from yujuhong/mv-docker-client
Automatic merge from submit-queue (batch tested with PRs 45453, 45307, 44987)

Migrate the docker client code from dockertools to dockershim

Move docker client code from dockertools to dockershim/libdocker. This includes
DockerInterface (renamed to Interface), FakeDockerClient, etc.

This is part of #43234
2017-05-09 20:23:44 -07:00
wlan0 45d2bc06b7 cloud initialize node in external cloud controller 2017-05-05 16:51:45 -07:00
Yu-Ju Hong cf3635c876 Update bazel BUID files 2017-05-05 11:48:08 -07:00
Yu-Ju Hong 389c140eaf Move docker client code from dockertools to dockershim/dockerlib
The code affected include DockerInterface (renamed to Interface),
FakeDockerClient, etc.
2017-05-05 11:48:08 -07:00
Kubernetes Submit Queue d23c73687a Merge pull request #45238 from deads2k/auth-04-expose-kubelet
Automatic merge from submit-queue (batch tested with PRs 45362, 45159, 45321, 45238)

expose kubelet authentication and authorization builders

The kubelet authentication and authorization builder methods are useful for consumers.

@liggitt
2017-05-04 13:25:06 -07:00
deads2k 0022223d8b expose kubelet authentication and authorization builders 2017-05-04 14:35:24 -04:00
Yu-Ju Hong 40b0474956 pass noopnetworkhost to dockershim 2017-05-03 16:32:01 -07:00
Lee Verberne b668371a63 Enable shared PID namespace by default for docker 2017-05-03 17:12:08 +00:00
Kubernetes Submit Queue 0a87487bda Merge pull request #38161 from chentao1596/correct-description-kubelet-get-pod-from-path
Automatic merge from submit-queue

kubelet/get-pods-from-path: correct description of implemention

**What this PR does / why we need it**:
    I find this description does not follow the current implementation, it should be describe like this according to my understanding of the source code.
2017-05-02 22:24:51 -07:00
Kubernetes Submit Queue 2a87baba6c Merge pull request #45199 from yujuhong/clean-up-dockertools
Automatic merge from submit-queue

Clean up code in dockertools

Move functions and sub packages to dockershim.
Part of #43234.
2017-05-02 20:55:59 -07:00
Yu-Ju Hong 93ecaf6812 Move exec.go from dockertools to dockershim 2017-05-01 16:00:46 -07:00
Klaus Ma e0d67c9913 Removed duplicated 'default' in kubelet's help message. 2017-04-30 04:18:09 -04:00
Kubernetes Submit Queue 55f802b72a Merge pull request #44196 from xiangpengzhao/cmd-cleanup
Automatic merge from submit-queue

Delete "hard-coded" default value in flags usage.

**What this PR does / why we need it**:
Some flags of kubernetes components have "hard-coded" default values in their usage info. In fact, [pflag pkg](https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/spf13/pflag/flag.go#L602-L608) has already added a string `(default value)` automatically in the usage info if the flag is initialized. Then we don't need to hard-code the default value in usage info. After this PR, if we want to update the default value of a flag, we only need to update the flag where it is initialized. `pflag` will update the usage info for us. This will avoid inconsistency.

For example:
Before
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: 10s (default 10s)
...
```

After
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. (default 10s)
...
```

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

**Special notes for your reviewer**:
This PR doesn't delete some "hard-coded" default values because they are not explicitly initialized. We still need to hard-code them to give users friendly info.

```
--allow-privileged                                        If true, allow containers to request privileged mode. [default=false]
```

**Release note**:

```release-note
None
```
2017-04-28 21:28:09 -07:00
Lee Verberne d22dd0fa35 Implement shared PID namespace in the dockershim 2017-04-27 23:43:53 +00:00
Kubernetes Submit Queue 099e7a5f0a Merge pull request #44162 from liggitt/tls-flag-help
Automatic merge from submit-queue (batch tested with PRs 40060, 44860, 44865, 44825, 44162)

Clarify kubelet cert flag usage
2017-04-24 23:07:45 -07:00
chentao1596 785cad9580 change the description of getting pod from file 2017-04-21 15:35:31 +08:00
Daniel Nardo 2320fde49c Update kubelet to use the network-plugin-dir if the cni-bin-dir flag
is not set.
2017-04-19 16:33:06 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Kubernetes Submit Queue b0a05b4597 Merge pull request #42474 from k82cn/rm_empty_line_kl
Automatic merge from submit-queue

Removed un-necessary empty line.
2017-04-14 07:23:11 -07:00
Andy Goldstein 00e11566f2 Make the dockershim root directory configurable
Make the dockershim root directory configurable so things like
integration tests (e.g. in OpenShift) can run as non-root.
2017-04-12 09:06:21 -04:00
Kubernetes Submit Queue 357af07718 Merge pull request #44197 from Random-Liu/dockershim-only-mode
Automatic merge from submit-queue

Add dockershim only mode

This PR added a `experimental-dockershim` hidden flag in kubelet to run dockershim only.

We introduce this flag mainly for cri validation test. In the future we should compile dockershim into another binary.

@yujuhong @feiskyer @xlgao-zju 
/cc @kubernetes/sig-node-pr-reviews
2017-04-09 19:27:51 -07:00
Kubernetes Submit Queue 67029858ae Merge pull request #40160 from wlan0/credentialprovider
Automatic merge from submit-queue

add rancher credential provider

This adds rancher as a credential provider in kubernetes.

@erictune This might be a good opportunity to discuss adding a provision for people to have their own credential providers that is similar to the new cloud provider changes (https://github.com/kubernetes/community/pull/128). WDYT?

```
release-note
Added Rancher Credential Provider to use Rancher Registry credentials when running in a Rancher cluster
```
2017-04-07 22:12:18 -07:00
Random-Liu 327fc270d7 Add dockershim only mode 2017-04-07 16:43:57 -07:00
xiangpengzhao 420caf200c
Delete "hard-coded" default value in flags usage. 2017-04-07 11:21:37 +08:00
Jordan Liggitt 13e583141a
Clarify kubelet cert flag usage 2017-04-06 10:57:37 -04:00
Michael Taufen f5eed7e91d Add a separate flags struct for Kubelet flags
Kubelet flags are not necessarily appropriate for the KubeletConfiguration
object. For example, this PR also removes HostnameOverride and NodeIP
from KubeletConfiguration. This is a preleminary step to enabling Nodes
to share configurations, as part of the dynamic Kubelet configuration
feature (#29459). Fields that must be unique for each node inhibit
sharing, because their values, by definition, cannot be shared.
2017-04-03 13:28:29 -07:00
Kubernetes Submit Queue 6f3e5bade6 Merge pull request #40432 from sjenning/imagegc-default
Automatic merge from submit-queue

kubelet: change image-gc-high-threshold below docker dm.min_free_space

docker dm.min_free_space defaults to 10%, which "specifies the min free space percent in a thin pool require for new device creation to succeed....Whenever a new a thin pool device is created (during docker pull or during container creation), the Engine checks if the minimum free space is available. If sufficient space is unavailable, then device creation fails and any relevant docker operation fails." [1]

This setting is preventing the storage usage to cross the 90% limit. However, image GC is expected to kick in only beyond image-gc-high-threshold. The image-gc-high-threshold has a default value of 90%, and hence GC never triggers. If image-gc-high-threshold is set to a value lower than (100 - dm.min_free_space)%, GC triggers.

xref https://bugzilla.redhat.com/show_bug.cgi?id=1408309

```release-note
changed kubelet default image-gc-high-threshold to 85% to resolve a conflict with default settings in docker that prevented image garbage collection from resolving low disk space situations when using devicemapper storage.
```

@derekwaynecarr @sdodson @rhvgoyal
2017-04-03 10:51:32 -07:00
wlan0 38988fec78 add rancher credential provider 2017-03-27 16:22:53 -07:00
Kubernetes Submit Queue 2b6e318ea0 Merge pull request #38937 from nak3/reserved-example
Automatic merge from submit-queue

Use realistic value for the memory example of kube-reserved and system-reserved

Use realistic value for the memory example of kube-reserved and system-reserved

Currently, kublet help shows the memory example of
kube-reserved and system-reserved as 150G. This 150G is not realistic
value and it leads misconfiguration or confusion. This patch changes
to example value as 500Mi.

Before(same with system-reserved):
```
      --kube-reserved value                                A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for kubernetes system components. Currently only cpu and memory are supported. See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail. [default=none]
```

After(same with system-reserved):
```
      --kube-reserved value                                A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=500Mi) pairs that describe resources reserved for kubernetes system components. Currently only cpu and memory are supported. See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail. [default=none]
```
2017-03-21 16:39:19 -07:00
Andy Goldstein b011529d8a Add pprof trace support
Add pprof trace support and --enable-contention-profiling to those
components that don't already have it.
2017-03-07 10:10:42 -05:00
wlan0 9875620388 add external cloudprovider to clerly denote the offloading off cloudprovider tasks 2017-03-06 10:45:13 -08:00
Kenjiro Nakayama fd8099c179 Use realistic value for the memory example of kube-reserved and system-reserved 2017-03-04 14:06:09 +09:00
Kubernetes Submit Queue 2d319bd406 Merge pull request #42204 from dashpole/allocatable_eviction
Automatic merge from submit-queue

Eviction Manager Enforces Allocatable Thresholds

This PR modifies the eviction manager to enforce node allocatable thresholds for memory as described in kubernetes/community#348.
This PR should be merged after #41234. 

cc @kubernetes/sig-node-pr-reviews @kubernetes/sig-node-feature-requests @vishh 

** Why is this a bug/regression**

Kubelet uses `oom_score_adj` to enforce QoS policies. But the `oom_score_adj` is based on overall memory requested, which means that a Burstable pod that requested a lot of memory can lead to OOM kills for Guaranteed pods, which violates QoS. Even worse, we have observed system daemons like kubelet or kube-proxy being killed by the OOM killer.
Without this PR, v1.6 will have node stability issues and regressions in an existing GA feature `out of Resource` handling.
2017-03-03 20:20:12 -08:00
Kubernetes Submit Queue f81a0107f0 Merge pull request #38924 from vladimirvivien/scaleio-k8s
Automatic merge from submit-queue (batch tested with PRs 42443, 38924, 42367, 42391, 42310)

Dell EMC ScaleIO Volume Plugin

**What this PR does / why we need it**
This PR implements the Kubernetes volume plugin to allow pods to seamlessly access and use data stored on ScaleIO volumes.  [ScaleIO](https://www.emc.com/storage/scaleio/index.htm) is a software-based storage platform that creates a pool of distributed block storage using locally attached disks on every server.  The code for this PR supports persistent volumes using PVs, PVCs, and dynamic provisioning.

You can find examples of how to use and configure the ScaleIO Kubernetes volume plugin in [examples/volumes/scaleio/README.md](examples/volumes/scaleio/README.md).

**Special notes for your reviewer**:
To facilitate code review, commits for source code implementation are separated from other artifacts such as generated, docs, and vendored sources.

```release-note
ScaleIO Kubernetes Volume Plugin added enabling pods to seamlessly access and use data stored on ScaleIO volumes.
```
2017-03-03 18:08:40 -08:00
Kubernetes Submit Queue b432e137e6 Merge pull request #42350 from vishh/enable-qos-cgroups
Automatic merge from submit-queue (batch tested with PRs 41919, 41149, 42350, 42351, 42285)

enable cgroups tiers and node allocatable enforcement on pods by default.

```release-note
Pods are launched in a separate cgroup hierarchy than system services.
```
Depends on #41753

cc @derekwaynecarr
2017-03-03 16:44:41 -08:00
Vladimir Vivien 915a54180d Addition of ScaleIO Kubernetes Volume Plugin
This commits implements the Kubernetes volume plugin allowing pods to seamlessly access and use data stored on ScaleIO volumes.
2017-03-03 15:47:19 -05:00
Klaus Ma 41c4426a30 Removed un-necessary empty line. 2017-03-03 19:43:48 +08:00
Seth Jennings cc50aa9dfb kubelet: enable qos-level memory request reservation 2017-03-02 15:04:13 -06:00
David Ashpole ac612eab8e eviction manager changes for allocatable 2017-03-02 07:36:24 -08:00
Vishnu kannan 17a6d2da72 enable cgroups tiers by default.
enable node allocatable enforcement on pods by default.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-03-01 11:42:42 -08:00
Kubernetes Submit Queue ed479163fa Merge pull request #42116 from vishh/gpu-experimental-support
Automatic merge from submit-queue

Extend experimental support to multiple Nvidia GPUs

Extended from #28216

```release-note
`--experimental-nvidia-gpus` flag is **replaced** by `Accelerators` alpha feature gate along with  support for multiple Nvidia GPUs. 
To use GPUs, pass `Accelerators=true` as part of `--feature-gates` flag.
Works only with Docker runtime.
```

1. Automated testing for this PR is not possible since creation of clusters with GPUs isn't supported yet in GCP.
1. To test this PR locally, use the node e2e.
```shell
TEST_ARGS='--feature-gates=DynamicKubeletConfig=true' FOCUS=GPU SKIP="" make test-e2e-node
```

TODO:

- [x] Run manual tests
- [x] Add node e2e
- [x] Add unit tests for GPU manager (< 100% coverage)
- [ ] Add unit tests in kubelet package
2017-03-01 04:52:50 -08:00
Aditya Dani 28df55fc31 Portworx Volume Driver in Kubernetes
- Add a new type PortworxVolumeSource
- Implement the kubernetes volume plugin for Portworx Volumes under pkg/volume/portworx
- The Portworx Volume Driver uses the libopenstorage/openstorage specifications and apis for volume operations.

Changes for k8s configuration and examples for portworx volumes.

- Add PortworxVolume hooks in kubectl, kube-controller-manager and validation.
- Add a README for PortworxVolume usage as PVs, PVCs and StorageClass.
- Add example spec files

Handle code review comments.

- Modified READMEs to incorporate to suggestions.
- Add a test for ReadWriteMany access mode.
- Use util.UnmountPath in TearDown.
- Add ReadOnly flag to PortworxVolumeSource
- Use hostname:port instead of unix sockets
- Delete the mount dir in TearDown.
- Fix link issue in persistentvolumes README
- In unit test check for mountpath after Setup is done.
- Add PVC Claim Name as a Portworx Volume Label

Generated code and documentation.
- Updated swagger spec
- Updated api-reference docs
- Updated generated code under pkg/api/v1

Godeps update for Portworx Volume Driver
- Adds github.com/libopenstorage/openstorage
- Adds go.pedge.io/pb/go/google/protobuf
- Updates Godep Licenses
2017-02-28 23:24:56 +00:00
Vishnu kannan 69acb02394 use feature gate instead of flag to control support for GPUs
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-28 13:42:07 -08:00
Vishnu kannan 3b0a408e3b improve gpu integration
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-28 11:27:53 -08:00
Hui-Zhi 57c77ffbdd Add support for multiple nvidia gpus 2017-02-28 11:24:48 -08:00
Vishnu Kannan cc5f5474d5 add support for node allocatable phase 2 to kubelet
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2017-02-27 21:24:44 -08:00