Commit Graph

706 Commits (01b736c4d9b5a410632366a4beb9612aea72eeaf)

Author SHA1 Message Date
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Minhan Xia 5e39b3d9c3 clean up exec network plugin 2016-12-27 14:04:57 -08:00
deads2k ab1b77673f decouple genericapiserver from non-generic authenticator 2016-12-22 07:48:08 -05:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Kubernetes Submit Queue 025c57e62b Merge pull request #37783 from brendandburns/acr
Automatic merge from submit-queue

Add support for Azure Container Registry, update Azure dependencies

@colemickens
2016-12-09 23:52:41 -08:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Brendan Burns 91f19e3dfc Add an azure container registry credential provider. 2016-12-08 21:38:11 -08:00
Jun Gong 036899ec98 Add --image-pull-progress-deadline option to kubelet 2016-12-09 09:28:57 +08:00
Derek Carr 5b2d1c2c25 Enable kernel memcg notification via additional flag 2016-12-07 10:09:41 -05:00
Mike Danese e225625a80 add a configuration for kubelet to register as a node with taints
and deprecate register-schedulable
2016-12-06 10:32:54 -08:00
NickrenREN 34d13c996a eventclient create error info print
Need to print error info when creating eventClient error , just as create kubeClient does 8 lines above
2016-12-06 17:55:46 +08:00
NickrenREN 48026ce655 modify startKubelet return
Since startKubelet() will always return nil, we donot need to judge its return err
2016-12-06 12:08:45 +08:00
Kubernetes Submit Queue caa935df45 Merge pull request #37442 from NickrenREN/kubelet-run
Automatic merge from submit-queue (batch tested with PRs 37094, 37663, 37442, 37808, 37826)

fix if condition question in kubelet run() function

Here variable err returned by function NewForConfig(&eventClientConfig) if CreateAPIServerClientConfig() function runs correctly .  And we should not print "invalid kubeconfig" info.
Should we use else instead of if.
2016-12-03 04:27:50 -08:00
yupeng 31c46e1d2c error strings should not end with punctuation
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-12-03 15:42:47 +08:00
Kubernetes Submit Queue 35808b39aa Merge pull request #36472 from xilabao/cert-key-coexist
Automatic merge from submit-queue

fix apiserver start failed if lost one of cert and key
2016-12-01 07:52:15 -08:00
NickrenREN 19c9860bb3 fix if condition question in kubelet run() function
here variable err returned by function NewForConfig(&eventClientConfig) if CreateAPIServerClientConfig() function is executed correctly. We should use else instead of if.
Or put block (if err != nil)  to block (if err == nil) above
2016-12-01 12:00:25 +08:00
xilabao 7016057ff7 fix apiserver start failed if lost one of cert and key, add a error message 2016-11-30 17:25:52 +08:00
deads2k 6846855929 add delegating authorization flags and options 2016-11-29 10:59:43 -05:00
deads2k 5cea15ac9f add delegating auth options 2016-11-29 10:59:43 -05:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu 5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
Vishnu kannan 9066253491 [kubelet] rename --cgroups-per-qos to --experimental-cgroups-per-qos to reflect the true nature of that feature
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-11-14 14:06:39 -08:00
Rajat Ramesh Koujalagi d81e216fc6 Better messaging for missing volume components on host to perform mount 2016-11-09 15:16:11 -08:00
Kubernetes Submit Queue c41c603baa Merge pull request #36471 from Random-Liu/fix-flag-description
Automatic merge from submit-queue

Kubelet: Fix the description of MaxContainers kubelet flag.

Found this during code review.

The default number has been changed to `-1` and `1`. 82c488bd6e/pkg/apis/componentconfig/v1alpha1/defaults.go (L279-L285)
@yujuhong 

/cc @saad-ali This PR fixed incorrect doc.
2016-11-09 03:13:51 -08:00
Kubernetes Submit Queue b3e4083f49 Merge pull request #36133 from luomiao/photon-support-PR-v2
Automatic merge from submit-queue

Support persistent volume usage for kubernetes running on Photon Controller platform

**What this PR does / why we need it:**
Enable the persistent volume usage for kubernetes running on Photon platform.
Photon Controller: https://vmware.github.io/photon-controller/

_Only the first commit include the real code change.
The following commits are for third-party vendor dependency and auto-generated code/docs updating._

Two components are added:
pkg/cloudprovider/providers/photon: support Photon Controller as cloud provider
pkg/volume/photon_pd: support Photon persistent disk as volume source for persistent volume

Usage introduction:
a. Photon Controller is supported as cloud provider.
When choosing to use photon controller as a cloud provider, "--cloud-provider=photon --cloud-config=[path_to_config_file]" is required for kubelet/kube-controller-manager/kube-apiserver. The config file of Photon Controller should follow the following usage:

```
[Global]
target = http://[photon_controller_endpoint_IP]
ignoreCertificate = true
tenant = [tenant_name]
project = [project_name]
overrideIP = true
```

b. Photon persistent disk is supported as volume source/persistent volume source.
yaml usage:

```
volumes:
  - name: photon-storage-1
    photonPersistentDisk:
        pdID: "643ed4e2-3fcc-482b-96d0-12ff6cab2a69"
```
pdID is the persistent disk ID from Photon Controller.

c. Enable Photon Controller as volume provisioner.
yaml usage:

```
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: gold_sc
provisioner: kubernetes.io/photon-pd
parameters:
  flavor: persistent-disk-gold
```

The flavor "persistent-disk-gold" needs to be created by Photon platform admin before hand.
2016-11-09 00:10:22 -08:00
Random-Liu 021ff77028 Fix the description of MaxContainers kubelet flag. 2016-11-08 17:52:40 -08:00
Vish Kannan f42a843e89 Prune reviewers on cmd/kubelet/app 2016-11-08 17:21:23 -08:00
Vish Kannan e6332c7b74 Prune list of reviewers for cmd/kubelet 2016-11-08 17:20:29 -08:00
Antoine Pelisse 9f3363a7e6 Update OWNERS approvers and reviewers: cmd/kubelet 2016-11-08 16:21:08 -08:00
Vishnu kannan dd8ec911f3 Revert "Revert "Merge pull request #35821 from vishh/gci-mounter-scope""
This reverts commit 402116aed4.
2016-11-08 11:09:10 -08:00
Miao Luo b22ccc6780 Support persistent volume on Photon Controller platform
1. Enable Photon Controller as cloud provider
2. Support Photon persistent disk as volume source/persistent volume
source
2016-11-08 09:36:16 -08:00
Michael Taufen 0c6c622434 Fail kubelet creation if swap enabled
Provides an opt-in flag, --experimental-fail-swap-on (and corresponding
KubeletConfiguration value, ExperimentalFailSwapOn), which is false by default.
2016-11-08 08:39:31 -08:00
Kubernetes Submit Queue 6c5e0269d3 Merge pull request #36051 from zdj6373/server-log
Automatic merge from submit-queue

improve and modify log

1, the content of a unified writing, compared to the following line of failure (314th lines)
2, “instance” should be “node”
2016-11-08 02:52:38 -08:00
Yu-Ju Hong dcce768a3e Rename experimental-runtime-integration-type to experimental-cri 2016-11-07 11:29:24 -08:00
saadali 402116aed4 Revert "Merge pull request #35821 from vishh/gci-mounter-scope"
This reverts commit 973fa6b334, reversing
changes made to 41b5fe86b6.
2016-11-03 20:23:25 -07:00
Kubernetes Submit Queue 973fa6b334 Merge pull request #35821 from vishh/gci-mounter-scope
Automatic merge from submit-queue

[Kubelet] Use the custom mounter script for Nfs and Glusterfs only

This patch reduces the scope for the containerized mounter to NFS and GlusterFS on GCE + GCI clusters

This patch also enabled the containerized mounter on GCI nodes

Shepherding multiple PRs through the submit queue is painful. Hence I combined them into this PR. Please review each commit individually.

cc @jingxu97 @saad-ali

https://github.com/kubernetes/kubernetes/pull/35652 has also been reverted as part of this PR
2016-11-03 04:32:19 -07:00
Vishnu Kannan 414e4ae549 Revert "Adding a root filesystem override for kubelet mounter"
This reverts commit e861a5761d.
2016-11-02 15:18:09 -07:00
derekwaynecarr 42289c2758 pod and qos level cgroup support 2016-11-02 08:07:04 -04:00
zdj6373 cc39354af3 improve and modify log 2016-11-02 17:26:54 +08:00
Kubernetes Submit Queue 6e90106ded Merge pull request #34490 from yujuhong/docker_cgroup
Automatic merge from submit-queue

dockershim: move docker to the given cgroup
2016-11-02 00:30:30 -07:00
Michael Taufen a38566dac6 Add FeatureGates field to KubeletConfiguration 2016-11-01 14:53:50 -07:00
Yu-Ju Hong 87aaf4c0ac dockershim: move docker to the given cgruop
This change add a container manager inside the dockershim to move docker daemon
and associated processes to a specified cgroup. The original kubelet container
manager will continue checking the name of the cgroup, so that kubelet know how
to report runtime stats.
2016-11-01 11:39:20 -07:00
Dr. Stefan Schimanski 5dc31d35a0 Add --tls-sni-cert-key to the apiserver for SNI support 2016-11-01 09:50:56 +01:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
David Ashpole eb19713486 kubelet calls GetDirFsInfo(root directory) instead of using GetFsInfo(root label). Reverted #33520, and changed e2e test context to use nodefs 2016-10-27 08:04:59 -07:00
Vishnu kannan e861a5761d Adding a root filesystem override for kubelet mounter
This is useful for supporting hostPath volumes via containerized
mounters in kubelet.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 21:42:59 -07:00
Kubernetes Submit Queue 10061ac358 Merge pull request #35523 from luxas/remove_reconcile
Automatic merge from submit-queue

Deprecate the --reconcile-cidr flag

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: Follows up https://github.com/kubernetes/kubernetes/pull/34906

**Special notes for your reviewer**: I'm not sure why coreos had set `--reconcile-cidr` to `false` and what the implications are now.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Deprecate the --reconcile-cidr kubelet flag because it has no function anymore
```

PTAL @thockin @freehan @justinsb @yujuhong 
@kubernetes/sig-node @kubernetes/sig-network 

**I will add `hack/update-all.sh` contents soon to fix builds**
2016-10-26 20:18:37 -07:00
Vishnu kannan adef4675a0 rename kubelet flag mounter-path to experimental-mounter-path
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 14:50:33 -07:00
Lucas Käldström 1cf00d1ff1 Remove the function of --reconcile-cidr and deprecate it 2016-10-26 20:25:35 +03:00
Kubernetes Submit Queue a898f3d996 Merge pull request #34381 from liggitt/kubelet-auth
Automatic merge from submit-queue

kubelet authn/authz

Implements https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/kubelet-auth.md

Part of [Authenticated/Authorized access to kubelet API](https://github.com/kubernetes/features/issues/89) feature
2016-10-25 17:40:27 -07:00
Random-Liu 3d549b9e25 Add dockershim grpc server. 2016-10-25 10:31:16 -07:00
Jordan Liggitt c83f5804d2
Wire kubelet authn/authz 2016-10-25 03:40:09 -04:00
Jordan Liggitt 426caf5bd1
Kubelet auth flags 2016-10-25 03:40:08 -04:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Jing Xu 34ef93aa0c Add mounterPath to mounter interface
In order to be able to use new mounter library, this PR adds the
mounterPath flag to kubelet which passes the flag to the mount
interface. If flag is empty, mount uses default mount path.
2016-10-20 14:15:27 -07:00
Kubernetes Submit Queue 61e0113019 Merge pull request #34906 from luxas/remove_old_networking
Automatic merge from submit-queue

WIP: Remove the legacy networking mode

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
Removes the deprecated configure-cbr0 flag and networking mode to avoid having untested and maybe unstable code in kubelet, see: #33789

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

**Special notes for your reviewer**: There are a lot of deployments who rely on this networking mode. Not sure how we deal with that: force switch to kubenet or just delete the old deployment?

But please review the code changes first (the first commit)

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Removed the deprecated kubelet --configure-cbr0 flag, and with that the "classic" networking mode as well
```

PTAL @kubernetes/sig-network @kubernetes/sig-node @mikedanese
2016-10-19 01:03:39 -07:00
Clayton Coleman 957c0955aa
Run defaulting on the scheduler startup 2016-10-18 21:07:35 -04:00
Lucas Käldström 0800df74ab Remove the legacy networking mode --configure-cbr0 2016-10-16 21:26:41 +03:00
Harry Zhang eb81ef6023 Merge string flag into util flag 2016-10-11 23:28:59 -04:00
Kubernetes Submit Queue 254c10f08a Merge pull request #32137 from mtaufen/spellcheck
Automatic merge from submit-queue

Fixup in kubelet.go: Package short names should be [a-z0-9]
2016-10-11 00:33:34 -07:00
derekwaynecarr 36eb79b42b Add cgroup driver and cgroups-per-qos flags to kubelet 2016-10-05 13:48:37 -04:00
Lucas Käldström 348717c50a Remove the flannel experimental overlay 2016-10-04 11:53:53 +03:00
Ilya Dmitrichenko abc0a98d25
Replace references to http://releases.k8s.io/HEAD/docs/user-guide/ 2016-10-02 11:44:40 +01:00
Justin Santa Barbara 54195d590f Use strongly-typed types.NodeName for a node name
We had another bug where we confused the hostname with the NodeName.

To avoid this happening again, and to make the code more
self-documenting, we use types.NodeName (a typedef alias for string)
whenever we are referring to the Node.Name.

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName

Also clean up some of the (many) places where the NodeName is referred
to as a hostname (not true on AWS), or an instanceID (not true on GCE),
etc.
2016-09-27 10:47:31 -04:00
Kubernetes Submit Queue 1f7e79afbf Merge pull request #33066 from Random-Liu/set-docker-client-version
Automatic merge from submit-queue

Add docker client version.

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

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

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

@yujuhong @feiskyer
2016-09-22 19:09:14 -07:00
Kubernetes Submit Queue 5af04d1dd1 Merge pull request #32876 from errordeveloper/more-cert-utils
Automatic merge from submit-queue

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

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

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

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

**Release note**:

```release-note
NONE
```
2016-09-22 01:29:46 -07:00
Random-Liu 08d74f33f6 Add client version. 2016-09-19 21:27:00 -07:00
Yu-Ju Hong 1c3c1ac514 kubelet: Add a hidden flag to enable docker CRI integration
The new flag, if specified, and if --container-runtime=docker, switches
kubelet to use the new CRI implementation for testing. This is hidden flag
since the feature is still under heavy development and the flag may be changed
in the near future.
2016-09-19 13:09:00 -07:00
Ilya Dmitrichenko 386fae4592
Refactor utils that deal with certs
- merge `pkg/util/{crypto,certificates}`
- add funcs from `github.com/kubernetes-incubator/bootkube/pkg/tlsutil`
- ensure naming of funcs is fairly consistent
2016-09-19 09:03:42 +01:00
Kubernetes Submit Queue c4893df894 Merge pull request #32151 from bboreham/fix-cni-on-gci
Automatic merge from submit-queue

Add flag to set CNI bin dir, and use it on gci nodes

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

When using `kube-up` on GCE, following #31023 which moved the workers from debian to gci, CNI just isn't working.  The root cause is basically as discussed in #28563: one flag (`--network-plugin-dir`) means two different things, and the `configure-helper` script uses it for the wrong purpose.

This PR adds a new flag `--cni-bin-dir`, then uses it to configure CNI as desired.

As discussed at #28563, I have also added a flag `--cni-conf-dir` so users can be explicit 

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

**Special notes for your reviewer**:

I left the old flag largely alone for backwards-compatibility, with the exception that I stop setting the default when CNI is in use.  The value of `"/usr/libexec/kubernetes/kubelet-plugins/net/exec/"` is unlikely to be what is wanted there.

**Release note**:
```release-note
Added new kubelet flags `--cni-bin-dir` and `--cni-conf-dir` to specify where CNI files are located.
Fixed CNI configuration on GCI platform when using CNI.
```
2016-09-13 16:42:06 -07:00
Kubernetes Submit Queue 66201fa7af Merge pull request #29650 from ping035627/ping035627-patch-0727
Automatic merge from submit-queue

Add error log for clientset.NewForConfig

Deal with the CreateAPIServerClientConfig return, when s.APIServerList == 0, CreateAPIServerClientConfig return error, and on the origin way the err perhaps has been rewrited by clientset.NewForConfig(&eventClientConfig).
2016-09-12 00:08:10 -07:00
Bryan Boreham 4e961e2bf5 Add options to set CNI config and binary directories
Also make clearer the function of --network-plugin-dir when using CNI
2016-09-09 11:43:16 +01:00
Ilya Dmitrichenko d14df7afa7 Move CSR helper for nodes out of kubelet
Including `cmd/kubelet/app` in kubeadm causes flag leakage.

Namelly, the problem is with `pkg/credentialprovider/gcp`, which
leaks `--google-json-key` and changing the behaviour of `init()`
doesn't sound reasonable, given kubelet is the only one who uses
this packages and obviously the flag is part of the functionality.

The helper is already generic enough, it has already been exported
and works well for kubeadm, so moving it should be fine.
2016-09-08 07:27:38 +01:00
Kubernetes Submit Queue 0bd0d5571a Merge pull request #31540 from mtaufen/DockerOrDieRename
Automatic merge from submit-queue

Rename ConnectToDockerOrDie to CreateDockerClientOrDie

This function does not actually attempt to connect to the docker daemon, it just creates a client object that can be used to do so later. The old name was confusing, as it implied that a failure to touch the docker daemon could cause program termination (rather than just a failure to create the client).
2016-09-07 15:27:41 -07:00
Michael Taufen 7b2af2dea0 Fixup in kubelet.go: Package short names should be [a-z0-9] 2016-09-06 14:59:59 -07:00
Ilya Dmitrichenko fe768dd405 Do not go into standalone mode when `--require-kubeconfig` is passed (fix #32085) 2016-09-06 08:30:06 +01:00
Minhan Xia 83ca3504b4 add deprecate message for configure-cbr0 2016-09-02 14:36:07 -07:00
Michael Taufen b9ad337bbd Rename ConnectToDockerOrDie to CreateDockerClientOrDie
This function does not actually attempt to connect to the docker daemon,
it just creates a client object that can be used to do so later. The old
name was confusing, as it implied that a failure to touch the docker daemon
could cause program termination (rather than just a failure to create the
client).
2016-08-26 11:21:07 -07:00
Kubernetes Submit Queue c70583ac10 Merge pull request #30902 from krousey/version_metric
Automatic merge from submit-queue

Split the version metric out to its own package

This PR breaks a client dependency on prometheus. Combined with #30638, the client will no longer depend on these packages.
2016-08-25 18:33:48 -07:00
PingWang fa5c496669 deal error for clientset.NewForConfig
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-08-26 09:17:51 +08:00
Michael Taufen 7ae1458ab0 Remove the deprecated AuthPath from KubeletServer
It has been deprecated for two releases (1.2 and 1.3).
2016-08-25 10:57:31 -07:00
Michael Taufen 0afaeab9b1 Only try to connect to docker if we're actually using the docker runtime 2016-08-25 10:57:31 -07:00
Michael Taufen f277205f4f Kubelet Refactoring
This refactor removes the legacy KubeletConfig object and adds a new
KubeletDeps object, which contains injected runtime objects and
separates them from static config. It also reduces NewMainKubelet to two
arguments: a KubeletConfiguration and a KubeletDeps.

Some mesos and kubemark code was affected by this change, and has been
modified accordingly.

And a few final notes:

KubeletDeps:
KubeletDeps will be a temporary bin for things we might consider
"injected dependencies", until we have a better dependency injection
story for the Kubelet. We will have to discuss this eventually.

RunOnce:
We will likely not pull new KubeletConfiguration from the API server
when in runonce mode, so it doesn't make sense to make this something
that can be configured centrally. We will leave it as a flag-only option
for now. Additionally, it is increasingly looking like nobody actually uses the
Kubelet's runonce mode anymore, so it may be a candidate for deprecation
and removal.
2016-08-25 10:57:31 -07:00
Dr. Stefan Schimanski e356e52247 Add sysctl whitelist on the node 2016-08-25 13:22:01 +02:00
Minhan Xia c1d3c89cfa fix #30376 that broken cross-build 2016-08-24 13:18:18 -07:00
Kris 1740358573 Split the version metric out to its own package 2016-08-24 11:47:16 -07:00
Michael Taufen 2e989a3c38 Revert "Merge pull request #31297 from mikedanese/revert-kubelet"
This reverts the revert of #30090 and #31282.
2016-08-24 09:06:12 -07:00
Kubernetes Submit Queue 3544f8a717 Merge pull request #29836 from rootfs/azuredd
Automatic merge from submit-queue

support Azure data disk volume

This is a WIP of supporting azure data disk volume. Will add test and dynamic provisioning support once #29006 is merged

replace #25915
fix #23259

@kubernetes/sig-storage 
@colemickens @brendandburns
2016-08-24 02:49:54 -07:00
Huamin Chen dea4b0226d support Azure data disk volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-08-23 13:23:07 +00:00
Justin Santa Barbara 902ba4e249 Add network-plugin-mtu option for MTU selection
MTU selection is difficult, and if there is a transport such as IPSEC in
use may be impossible.  So we allow specification of the MTU with the
network-plugin-mtu flag, and we pass this down into the network
provider.

Currently implemented by kubenet.
2016-08-23 01:50:58 -04:00
Kubernetes Submit Queue b51d5c3cc0 Merge pull request #30638 from krousey/metrics_registration
Automatic merge from submit-queue

Remove implicit Prometheus metrics from client

**What this PR does / why we need it**: This PR starts to cut away at dependencies that the client has.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
The implicit registration of Prometheus metrics for request count and latency have been removed, and a plug-able interface was added. If you were using our client libraries in your own binaries and want these metrics, add the following to your imports in the main package: "k8s.io/pkg/client/metrics/prometheus". 
```

cc: @kubernetes/sig-api-machinery @kubernetes/sig-instrumentation @fgrzadkowski  @wojtek-t
2016-08-21 16:47:05 -07:00
Kubernetes Submit Queue 5d54c55710 Merge pull request #30212 from feiskyer/kuberuntime-flag
Automatic merge from submit-queue

Kubelet: add --container-runtime-endpoint and --image-service-endpoint

Flag `--container-runtime-endpoint` (overrides `--container-runtime`) is introduced to identify the unix socket file of the remote runtime service. And flag `--image-service-endpoint` is introduced to identify the unix socket file of the image service.

This PR is part of #28789 Milestone 0. 

CC @yujuhong @Random-Liu
2016-08-21 12:03:10 -07:00
Kubernetes Submit Queue a41e6e3817 Merge pull request #30922 from yifan-gu/tls_bootstrap_refactor
Automatic merge from submit-queue

Implement TLS bootstrap for kubelet using `--experimental-bootstrap-kubeconfig`  (2nd take)

Ref kubernetes/features#43 (comment)

cc @gtank @philips @mikedanese @aaronlevy @liggitt @deads2k @errordeveloper @justinsb 


Continue on the older PR https://github.com/kubernetes/kubernetes/pull/30094 as there are too many comments on that one and it's not loadable now.
2016-08-21 03:47:07 -07:00
Kubernetes Submit Queue e9815020eb Merge pull request #30475 from derekwaynecarr/pod-cgroup
Automatic merge from submit-queue

Unblock iterative development on pod-level cgroups

In order to allow forward progress on this feature, it takes the commits from #28017 #29049 and then it globally disables the flag that allows these features to be exercised in the kubelet.  The flag can be re-added to the kubelet when its actually ready.

/cc @vishh @dubstack @kubernetes/rh-cluster-infra
2016-08-19 21:06:48 -07:00
Jordan Liggitt 26a6623261 kubelet: '--experimental-bootstrap-kubeconfig' refactor.
Move bootstrap functions to separate files.
Split some of the functions into small sub-functions for reusability.
Other cleanups
2016-08-19 15:27:23 -07:00
Yifan Gu 2e631d811c crypto.go: Rename ShouldGenSelfSignedCerts() to FoundCertOrKey().
Since the function only tests whether the files are on the disk,
the original name is a little bit misleading.
2016-08-19 13:51:34 -07:00
Yifan Gu 26babd4eba kubelet: Add --bootstrap-kubeconfig to get TLS client cert.
Add --bootstrap-kubeconfig flag to kubelet. If the flag is non-empty
and --kubeconfig doesn't exist, then the kubelet will use the bootstrap
kubeconfig to create rest client and generate certificate signing request
to request a client cert from API server.

Once succeeds, the result cert will be written down to
--cert-dir/kubelet-client.crt, and the kubeconfig will be populated with
certfile, keyfile path pointing to the result certificate file, key file.
(The key file is generated before creating the CSR).
2016-08-19 13:51:33 -07:00
Kris 8d6ce0dcc6 Remove implicit Prometheus metrics from client 2016-08-19 10:11:45 -07:00
Jeff Lowdermilk 51198f59da Add --feature-gates to kube-system components
apiserver,scheduler,controller-manager,proxy,kubelet all get
flag. Using one variable to plumb through config via salt/init
scripts for GCE and GKE
2016-08-19 09:07:43 -07:00
derekwaynecarr fde285cd8f Disable cgroups-per-qos flag until implementation is stabilized 2016-08-19 11:08:59 -04:00
Kubernetes Submit Queue c19e9cc89d Merge pull request #26044 from smarterclayton/multiversion_encode
Automatic merge from submit-queue

Guarantee that Encode handles nested objects again
2016-08-18 21:10:55 -07:00
Pengfei Ni b36ace9a57 Kubelet: add --container-runtime-endpoint and --image-service-endpoint
New flag --container-runtime-endpoint (overrides --container-runtime)
is introduced to kubelet which identifies the unix socket file of
the remote runtime service. And new flag --image-service-endpoint is
introduced to kubelet which identifies the unix socket file of the
image service.
2016-08-19 10:22:44 +08:00
Kubernetes Submit Queue 7523669699 Merge pull request #30814 from freehan/lbsrcrevert
Automatic merge from submit-queue

Revert "Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE

Reverts kubernetes/kubernetes#30729
2016-08-18 15:34:10 -07:00
Clayton Coleman 5f8366aac3
Convert() should accept the new conversion Context value
Allows Convert() to reuse the same conversions as ConvertToVersion
without being overly coupled to the version.
2016-08-18 14:45:20 -04:00
Minhan Xia 1acaa1db09 Revert "Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE"" 2016-08-18 10:19:48 -07:00
Johannes Scheuermann eed42380f9 Initial Quobyte support 2016-08-18 17:13:50 +02:00
Clayton Coleman a66828d73e
Allow a flag that forces kubelet to have a valid kubeconfig
--require-kubeconfig forces the kubelet to use the kubeconfig for all
APIserver communication, and exit cleanly.
2016-08-17 16:26:52 -04:00
Kubernetes Submit Queue 622db63282 Merge pull request #30435 from hodovska/1328441-non-k8scontainers
Automatic merge from submit-queue

Add note: kubelet manages only k8s containers.

Kubelet wrote log when accesing container which was not created in k8s, what could confuse users. That's why we added note about it in documentation and lowered log level of the message to 5.

Here is example of the message: 
```
> Apr 19 11:50:32 openshift-114.lab.sjc.redhat.com atomic-openshift-node[9551]: 
I0419 11:50:32.194020    9600 docker.go:363] 
Docker Container: /tiny_babbage is not managed by kubelet.
```

bug 1328441
Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1328441
2016-08-17 00:54:33 -07:00
Daniel Smith 2aa0bb2dfc Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE" 2016-08-16 18:12:28 -07:00
Kubernetes Submit Queue d412d5721d Merge pull request #30486 from freehan/lbsrcfix
Automatic merge from submit-queue

syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE

fixes: #29997 #29039

@yujuhong Can you take a look at the kubelet part?

@girishkalele KUBE-MARK-DROP is the chain for dropping connections. Marked connection will be drop  in INPUT/OUTPUT chain of filter table. Let me know if this is good enough for your use case.
2016-08-16 15:22:34 -07:00
Minhan Xia 3bf8679232 add syncNetworkUtil in kubelet 2016-08-15 17:42:35 -07:00
Kubernetes Submit Queue 921c4604b1 Merge pull request #30466 from vishh/kubelet-as-root
Automatic merge from submit-queue

[Kubelet] Check if kubelet is running as uid 0

Related to #30176
2016-08-15 15:04:59 -07:00
Minhan Xia 85fdeb4742 add iptables util parameters to kubelet config type 2016-08-15 15:04:11 -07:00
Kubernetes Submit Queue 79ed7064ca Merge pull request #27970 from jingxu97/restartKubelet-6-22
Automatic merge from submit-queue

Add volume reconstruct/cleanup logic in kubelet volume manager

Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.

Fixes https://github.com/kubernetes/kubernetes/issues/27653
2016-08-15 13:48:43 -07:00
Jing Xu f19a1148db This change supports robust kubelet volume cleanup
Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.
2016-08-15 11:29:15 -07:00
Dominika Hodovska 08945a9b6a Add note: kubelet manages only k8s containers.
bug 1328441
Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1328441
2016-08-15 12:36:29 +02:00
Kubernetes Submit Queue f279e61e4a Merge pull request #27874 from ingvagabund/kubelet-kernel-tunning-behaviour-new-flags
Automatic merge from submit-queue

[kubelet] Introduce --protect-kernel-defaults flag to make the tunable behaviour configurable

Let's make the default behaviour of kernel tuning configurable. The default behaviour is kept modify as has been so far.
2016-08-12 14:11:26 -07:00
Vishnu kannan c75b61ed48 check if kubelet is running as uid 0
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-08-12 14:06:10 -07:00
Kubernetes Submit Queue f5861b9e49 Merge pull request #30176 from dims/check-for-root-access
Automatic merge from submit-queue

Check for CAP_SYS_ADMIN in Kubelet

Comment from nsenter_mount.go header:
The Kubelet process must have CAP_SYS_ADMIN (required by nsenter); at
the present, this effectively means that the kubelet is running in a
privileged container.

Related to #26093

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30176)
<!-- Reviewable:end -->
2016-08-11 08:46:19 -07:00
Jan Chaloupka eb967ad143 kubelet: introduce --protect-kernel-defaults to make the KernelTunableBehavior configurable 2016-08-11 13:08:27 +02:00
Michael Taufen e43ccdbf2c Rename KubeletConfiguration.Config to PodManifestPath for clarity
Also provide a new --pod-manifest-path flag and deprecate the old
--config one.

This field holds the location of a manifest file or directory of manifest
files for pods the Kubelet is supposed to run. The name of the field
should reflect that purpose.
2016-08-10 09:40:21 -07:00
Davanum Srinivas 2616fc9cf5 Check for CAP_SYS_ADMIN in Kubelet
The Kubelet process must have CAP_SYS_ADMIN, which implies that
the kubelet process must be either running as root or in a privileged
container. Make this check early in the startup sequence and bail out
if necessary.

Related to #26093
2016-08-09 13:40:07 -04:00
Chao Xu a771578a1c move pkg/util/ files to their own package to reduce client-go dependencies 2016-08-05 23:32:02 -07:00
bindata-mockuser 0c76d85cc8 moving image gc to images 2016-08-04 12:26:06 -07:00
Kubernetes Submit Queue 804109d349 Merge pull request #29950 from andreykurilin/kubelet_typos
Automatic merge from submit-queue

Fix various typos in kubelet
2016-08-03 10:05:46 -07:00
Kubernetes Submit Queue 24216fe02f Merge pull request #26958 from resouer/util-line
Automatic merge from submit-queue

Refactoring runner resource container linedelimiter to it's own pkg

Continuing my work ref #15634

Anyone is ok to review this fix.
2016-08-03 02:26:12 -07:00
Andrey Kurilin 9f1c3a4c56 Fix various typos in kubelet 2016-08-03 01:14:44 +03:00
k8s-merge-robot 88172c4815 Merge pull request #29658 from ping035627/ping035627-patch-0727-2
Automatic merge from submit-queue

optimise some code style in server.go

The PR modified some code style for authPathClientConfig and parseReservation function in server.go.
2016-08-01 23:36:14 -07:00
Harry Zhang e0ab76019e Rename runnter pkg name 2016-07-29 02:37:00 -04:00
Harry Zhang 94c6994ab3 Move rlimit to it's own pkg 2016-07-29 02:34:54 -04:00
Harry Zhang 15d0f5cfd5 Move linedelimiter to it's own pkg
Refactoring resource container
2016-07-29 02:29:26 -04:00
PingWang bb191a07ea optimise the style for parseReservation function
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

optimise some code style in server.go

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-07-28 11:29:24 +08:00
k8s-merge-robot 5064306808 Merge pull request #29254 from ping035627/ping035627-patch-0718
Automatic merge from submit-queue

Judge the cloud isn't nil before use it in server.go

The PR add a judgement for the cloud before use it, because cloudprovider.InitCloudProvider maybe return nil for the cloud.
2016-07-27 01:24:21 -07:00
PingWang a7d3c73bbc add a judgement for the cloud in server.go
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update server.go

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-07-26 08:29:12 +08:00
derekwaynecarr 2f4a4ea4cf Kubelet parses and validates eviction-minimum-reclaim flag 2016-07-21 16:46:12 -04:00
derekwaynecarr 99bddd23c4 Add eviction minimum reclaim option to kubelet 2016-07-21 10:06:17 -04:00
Lucas Käldström 88ea80b572 Remove GOMAXPROCS() calls because they are unnecessary 2016-07-19 11:08:21 +03:00
Buddha Prakash 5000e74664 Inject top level QoS cgroup creation in the Kubelet 2016-07-15 10:02:22 -07:00
Michael Taufen e52718bbc6 Clean up API
Move SystemReserved and KubeReserved into KubeletConfiguration struct
Convert int64 to int32 for some external type fields so they match internal ones
tLS* to tls* for JSON field names
Fix dependency on removed options.AutoDetectCloudProvider
Change floats in KubeletConfiguration API to ints
2016-07-14 18:40:11 -07:00
Michael Taufen 2e49f6b64a Make it build!
Update external KubeletConfiguration type
Add defaults for new KubeletConfiguration fields
Modify some defaults to match upstream settings
Add/rename some conversion functions
Updated codegen
Fixed typos
Mike Danese caught that s.NodeLabels wasn't allocated, fix on line 118
of cmd/kubelet/app/options/options.go.
Provide list of valid sources in comment for HostNetworkSources field
2016-07-14 18:38:58 -07:00
Mike Danese e070cb617a componentconfig: add external kubelet configuration type 2016-07-14 18:38:58 -07:00
k8s-merge-robot 5504c58ce2 Merge pull request #28607 from derekwaynecarr/default_eviction
Automatic merge from submit-queue

Enable memory eviction by default

```release-note
Enable memory based pod evictions by default on the kubelet.  

Trigger pod eviction when available memory falls below 100Mi.
```

See: https://github.com/kubernetes/kubernetes/issues/28552

/cc @kubernetes/rh-cluster-infra @kubernetes/sig-node
2016-07-08 04:46:37 -07:00
k8s-merge-robot 715d2f2358 Merge pull request #26611 from ZJU-SEL/clean-up-dup
Automatic merge from submit-queue

clean up dup code for kubelet

`RunKubelet` is called elsewhere, hence we should keep it that way.
Fixes #25345
2016-07-07 13:21:53 -07:00
derekwaynecarr 4e6a52d872 Enable memory eviction by default 2016-07-07 11:47:16 -04:00
k8s-merge-robot ab37fbf4c2 Merge pull request #28258 from vishh/28231
Automatic merge from submit-queue

[kubelet] Allow opting out of automatic cloud provider detection in kubelet. By default kubelet will auto-detect cloud providers

fixes #28231
2016-06-30 12:27:26 -07:00
Vishnu Kannan ea789e8612 Allow opting out of automatic cloud provider detection in kubelet
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-06-29 18:04:29 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Ron Lai 095e04d562 Marking container gc policy deprecated in the future and changing the default value 2016-06-22 13:32:13 -07:00