Commit Graph

44000 Commits

Author SHA1 Message Date
Jordan Liggitt
308fdcd13f
Pass typed options to dynamic client 2017-02-19 22:12:55 -05:00
Anirudh Ramanathan
3a73d23e33 Merge pull request #41716 from Random-Liu/revert-kubemark-npd-change
Revert the npd change in kubemark.
2017-02-19 11:32:15 -07:00
Random-Liu
47fc1d684d Revert the npd change in kubemark. 2017-02-19 04:14:30 -08:00
Kubernetes Submit Queue
070ebfe622 Merge pull request #41414 from kevin-wangzefeng/tolerationseconds-admission-controller
Automatic merge from submit-queue (batch tested with PRs 41043, 39058, 41021, 41603, 41414)

add defaultTolerationSeconds admission controller

**What this PR does / why we need it**:
Splited from #34825, add a new admission-controller that
1. adds toleration (with tolerationSeconds = 300) for taint `notReady:NoExecute` to every pod that does not already have a toleration for that taint, and
2. adds toleration (with tolerationSeconds = 300) for taint `unreachable:NoExecute` to every pod that does not already have a toleration for that taint.

**Which issue this PR fixes**: 
Related issue: #1574
Related PR: #34825

**Special notes for your reviewer**:

**Release note**:

```release-note
add defaultTolerationSeconds admission controller
```
2017-02-19 00:58:47 -08:00
Kubernetes Submit Queue
f69570c92e Merge pull request #41603 from luxas/kubeadm_reorder_kubeconfig
Automatic merge from submit-queue (batch tested with PRs 41043, 39058, 41021, 41603, 41414)

kubeadm: Make a separate util package for kubeconfig logic

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

There are a lot of packages that need to consume kubeconfig logic, so it should be in a central place.
Having it in `kubeadmutil` is suboptimal, because then it get mixed with everything else.

This splits that logic out to a generic place so it then also can be consumed in https://github.com/kubernetes/kubernetes/pull/41417, from where it's broken out.

 - Move {admin,kubelet}.conf out as constants
 - Make a separate util package for kubeconfig logic

**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**:

**Release note**:

```release-note
NONE
```
2017-02-19 00:58:46 -08:00
Kubernetes Submit Queue
eb8e1dd5f1 Merge pull request #41021 from jcbsmpsn/rotate-certificate
Automatic merge from submit-queue (batch tested with PRs 41043, 39058, 41021, 41603, 41414)

Rotate the kubelet certificate when about to expire.

Changes the kubelet so it doesn't use the cert/key files directly for
starting the TLS server. Instead the TLS server reads the cert/key from
the new CertificateManager component, which is responsible for
requesting new certificates from the Certificate Signing Request API on
the API Server.
2017-02-19 00:58:45 -08:00
Kubernetes Submit Queue
55dd8249c1 Merge pull request #39058 from k82cn/add_cscope_git_ignore
Automatic merge from submit-queue (batch tested with PRs 41043, 39058, 41021, 41603, 41414)

Add cscope related files into .gitignore.
2017-02-19 00:58:43 -08:00
Kubernetes Submit Queue
4bae7f18a5 Merge pull request #41043 from soltysh/issue20208
Automatic merge from submit-queue (batch tested with PRs 41043, 39058, 41021, 41603, 41414)

Allow setting replace patchStrategy for structs

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

@liggitt and @ymqytw ptal, you were in the original issue
2017-02-19 00:58:37 -08:00
Anirudh Ramanathan
8c8dca052d Merge pull request #41703 from Random-Liu/fix-kubemark-npd
Fix kubemark hollow-npd.
2017-02-18 23:21:02 -07:00
Random-Liu
cd194bd9cc Fix kubemark hollow-npd. 2017-02-18 21:01:56 -08:00
Anirudh Ramanathan
8911e2a377 Merge pull request #41693 from kubernetes/revert-41524-fix-cri-kubemark
Revert "Generate valid container id in fake docker client."
2017-02-18 15:35:58 -07:00
Kevin
83545a65f1 add defaultTolerationSeconds admission controller 2017-02-18 23:48:03 +08:00
Jordan Liggitt
66dec96735 Revert "Generate valid container id in fake docker client." 2017-02-18 10:06:24 -05:00
Kubernetes Submit Queue
ff12e5688c Merge pull request #40206 from Random-Liu/add-standalone-npd
Automatic merge from submit-queue

Add standalone npd on GCI.

This PR added standalone NPD in GCE GCI cluster. I already verified the PR, and it should work.

/cc @dchen1107 @fabioy @andyxning @kubernetes/sig-node-misc
2017-02-18 02:00:20 -08:00
Kubernetes Submit Queue
4d11cbc577 Merge pull request #39364 from zhouhaibing089/nodeports
Automatic merge from submit-queue

nodeports usage should be part of LoadBalancer service type

Since a creation of Service of type LoadBalancer will allocate NodePorts as well, so it makes more sense to account for the NodePort usage in the LoadBalancer switch case.

check here: https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/core/service/rest.go#L553 for the logic on whether it should assign a nodeport for the service.
2017-02-17 20:34:32 -08:00
Kubernetes Submit Queue
4c5b22d4c6 Merge pull request #41651 from shashidharatd/kubefed-3
Automatic merge from submit-queue (batch tested with PRs 41401, 41195, 41664, 41521, 41651)

[Federation][kubefed] Add label selector for etcd pvc

Currently, etcd pvc created for federation etcd does not have a label selector. without a label selector etcd pvc will bind to any pv created statically, this may be problematic in real environments comprising multiple pv's.

Also, verified that we can create a pv statically with labels as below
 ```
  labels:
    "app": "federated-cluster"
    "module": "federation-apiserver"
```
and federation etcd pvc will be bound to the pv matching label.
This is one of the side task, that we discussed in [here](https://github.com/kubernetes/kubernetes/issues/41127#issuecomment-278881319)

cc @madhusudancs @kubernetes/sig-federation-bugs
2017-02-17 19:46:44 -08:00
Kubernetes Submit Queue
112aa327ac Merge pull request #41521 from spiffxp/osx-make-test
Automatic merge from submit-queue (batch tested with PRs 41401, 41195, 41664, 41521, 41651)

Allow `make test` to pass on OSX

**What this PR does / why we need it**: `make test` doesn't pass on my OSX setup (10.11.6, go1.7, docker 1.13.1) on `master`, `release-1.5`, nor `release-1.4`.  Our [docs on unit tests](https://github.com/kubernetes/community/blob/master/contributors/devel/testing.md#unit-tests) say they should always pass on OS X.  This PR allows them to pass.

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

ref: #24717 for the motivation behind dereferencing mount symlinks

/cc @kubernetes/sig-testing-pr-reviews
2017-02-17 19:46:42 -08:00
Kubernetes Submit Queue
a574c85e60 Merge pull request #41664 from ixdy/make-test-bazel
Automatic merge from submit-queue (batch tested with PRs 41401, 41195, 41664, 41521, 41651)

Ignore bazel-* directories when looking for tests to run

**What this PR does / why we need it**: if you do a Bazel build and then try to run `make test` without `bazel clean`, the test script blows up. cc @cheftako

**Special notes for your reviewer**: there are probably other scripts (e.g. some of `hack/verify-*`) that mishandle the bazel-* convenience symlinks, but I'm not sure if it's worth the effort to fix those unless people complain.

**Release note**:

```release-note
NONE
```
2017-02-17 19:46:41 -08:00
Kubernetes Submit Queue
97921ff38e Merge pull request #41195 from wojtek-t/remove_default_failure_domains
Automatic merge from submit-queue (batch tested with PRs 41401, 41195, 41664, 41521, 41651)

Remove default failure domains from anti-affinity feature

Removing it is necessary to make performance of this feature acceptable at some point.

With default failure domains (or in general when multiple topology keys are possible), we don't have transitivity between node belonging to a topology. And without this, it's pretty much impossible to solve this effectively.

@timothysc
2017-02-17 19:46:40 -08:00
Kubernetes Submit Queue
5edac4f840 Merge pull request #41401 from wojtek-t/detect_bad_unstructured_conversions
Automatic merge from submit-queue (batch tested with PRs 41401, 41195, 41664, 41521, 41651)

Detect bad unstructured conversions

Ref https://github.com/kubernetes/kubernetes/issues/39017

This PR also speed up the conversion:
before:
```
BenchmarkToFromUnstructured-12           	    1000	   1201132 ns/op	   15335 B/op	     268 allocs/op
BenchmarkToFromUnstructuredViaJSON-12    	    1000	   2127384 ns/op	   29669 B/op	     457 allocs/op
```
after:
```
BenchmarkToFromUnstructured-12           	    2000	    911243 ns/op	   10472 B/op	     196 allocs/op
BenchmarkToFromUnstructuredViaJSON-12    	    1000	   2243216 ns/op	   29665 B/op	     457 allocs/op
```
2017-02-17 19:46:38 -08:00
Kubernetes Submit Queue
34bf25fe49 Merge pull request #41524 from Random-Liu/fix-cri-kubemark
Automatic merge from submit-queue

Generate valid container id in fake docker client.

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

This PR generates valid container id by hashing container name. So that dockershim checkpoint won't report `checkpoint key XXX is not valid` error.

This PR also reverts #41460.

@yujuhong @freehan /cc @kubernetes/sig-node-pr-reviews
2017-02-17 17:45:14 -08:00
Jacob Simpson
855627e5cb Rotate the kubelet certificate when about to expire.
Changes the kubelet so it doesn't use the cert/key files directly for
starting the TLS server. Instead the TLS server reads the cert/key from
the new CertificateManager component, which is responsible for
requesting new certificates from the Certificate Signing Request API on
the API Server.
2017-02-17 17:42:35 -08:00
Kubernetes Submit Queue
4b3a097ecd Merge pull request #41525 from yujuhong/fix_output
Automatic merge from submit-queue

Fix the output of health-mointor.sh

The script show prints the errors/response of the health check, but not
show the progress of `curl`.
2017-02-17 16:57:29 -08:00
shashidharatd
a3270b1321 Add label selector for etcd pvc 2017-02-18 06:22:52 +05:30
Kubernetes Submit Queue
7bbafd259c Merge pull request #41626 from derekwaynecarr/improve-kubelet-volume-logging
Automatic merge from submit-queue (batch tested with PRs 41649, 41658, 41266, 41371, 41626)

Understand why kubelet cannot cleanup orphaned pod dirs

**What this PR does / why we need it**:
Understand if we are unable to clean up orphaned pod directories due to a failure to read the directory versus paths still existing to improve ability to debug error situations.
2017-02-17 16:38:41 -08:00
Kubernetes Submit Queue
abcff2dfc1 Merge pull request #41371 from jcbsmpsn/split-request-node-certificate
Automatic merge from submit-queue (batch tested with PRs 41649, 41658, 41266, 41371, 41626)

Split request node certificate

Split the `RequestNodeCertificate` function so the behavior can also be used by non-node callers.
2017-02-17 16:38:40 -08:00
Kubernetes Submit Queue
64fe9e11f4 Merge pull request #41266 from spiffxp/build-run-make-help
Automatic merge from submit-queue (batch tested with PRs 41649, 41658, 41266, 41371, 41626)

Allow `build/run.sh make help` to run

**What this PR does / why we need it**: typo fix; `build/run.sh make help` doesn't work for me on OS X w/ docker 1.13.x, this PR fixes that

**Release note**:

```release-note
NONE
```
 /cc @spxtr
2017-02-17 16:38:38 -08:00
Kubernetes Submit Queue
b584e9419d Merge pull request #41658 from janetkuo/cronjob-panic
Automatic merge from submit-queue (batch tested with PRs 41649, 41658, 41266, 41371, 41626)

Fix cronjob controller panic on status update failure

#41655

@kubernetes/sig-apps-bugs @soltysh @erictune
2017-02-17 16:38:35 -08:00
Random-Liu
d40c0a7099 Add standalone npd on GCI. 2017-02-17 16:18:08 -08:00
Kubernetes Submit Queue
77a6338170 Merge pull request #41649 from Crassirostris/disable-flaky-cluster-logging-test
Automatic merge from submit-queue

Mark cluster logging tests for Stackdriver flaky

Disable Stackdriver cluster logging tests until https://github.com/kubernetes/kubernetes/issues/41647 is resolved
2017-02-17 16:03:28 -08:00
Random-Liu
ac97fc22f6 Revert #41460. 2017-02-17 14:08:57 -08:00
Random-Liu
201866af20 Small bug fixes in fake docker client. 2017-02-17 14:08:57 -08:00
Jeff Grafton
3dc0c748c8 Ignore bazel-* directories when looking for tests to run 2017-02-17 14:03:56 -08:00
Kubernetes Submit Queue
56afb95641 Merge pull request #41465 from bruceauyeung/k8s-branch-fix-kubectl-create-configmap-help-messages
Automatic merge from submit-queue

fix kubectl create configmap help messages

Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>

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

1. the first example command actually doesn't specify any keys. i think `with keys for each file` is incorrect.
2. `names on disk` is confusing.  in usage the word `NAME` means configmap, so i think it's better saying `file basenames on disk`
3. in this context, `--from-file` can be specified multiple times, but in each occurance only one key file can be specified, besides we should keep consistent with the later case (key is specified). so i changed words in this sentence to singular. and to avoid confusing, i use `key` instead of `name`
2017-02-17 13:56:36 -08:00
Wojciech Tyczynski
924e9a5b3a Unified unstructured converter interface and setup 2017-02-17 21:07:04 +01:00
Lucas Käldström
60b789b1c7
kubeadm: Move {admin,kubelet}.conf out as constants and make a separate util package for kubeconfig logic 2017-02-17 21:36:58 +02:00
Janet Kuo
6753544949 Fix cronjob panic on status update failure 2017-02-17 11:29:39 -08:00
Kubernetes Submit Queue
6d5b2ef49e Merge pull request #41080 from shyamjvs/etcd-version-monitor
Automatic merge from submit-queue

Added a basic monitor for providing etcd version related info

Fixes #41071 

This tool scrapes metrics partly from etcd's /version and /metrics endpoints and partly using etcdctl and exposes them as prometheus metrics at `http://localhost:9101/metrics` endpoint on the master. Here is a summary of the metrics it exposes (self-explanatory from the code):
-        etcdVersionFetchCount   = prometheus.NewCounterVec(
                prometheus.CounterOpts{
                        Namespace: "etcd",
                        Name: "version_info_fetch_count",
                        Help: "Number of times etcd's version info was fetched, labeled by etcd's server binary and cluster version",
                },
                []string{"serverversion", "clusterversion"})
-         etcdGRPCRequestsTotal   = prometheus.NewCounterVec(
                prometheus.CounterOpts{
                        Namespace: namespace,
                        Name: "grpc_requests_total",
                        Help: "Counter of received grpc requests, labeled by grpc method and grpc service names",
                },
                []string{"grpc_method", "grpc_service"})

For further info on how to run this as a binary/docker-container/kubernetes-pod and checking the metrics, have a look at the README.md file.

cc @fgrzadkowski @wojtek-t @piosz
2017-02-17 10:18:48 -08:00
Wojciech Tyczynski
975db6ff9a Detection of failed unstructured conversions. 2017-02-17 18:58:16 +01:00
Wojciech Tyczynski
edb36d4df7 Minor cleanup in unstructured converter 2017-02-17 18:56:55 +01:00
Mik Vyatskov
86c9591ea6 Mark cluster logging tests for Stackdriver flaky 2017-02-17 18:06:44 +01:00
Kubernetes Submit Queue
58ec5cce28 Merge pull request #41355 from ncdc/shared-informers-09-service
Automatic merge from submit-queue

Switch service controller to shared informers

Originally part of #40097 

cc @deads2k @smarterclayton @gmarek @wojtek-t @timothysc @sttts @liggitt @kubernetes/sig-scalability-pr-reviews
2017-02-17 09:04:28 -08:00
Kubernetes Submit Queue
46cd8ec91b Merge pull request #41637 from wojtek-t/expose_storage_format_as_env
Automatic merge from submit-queue

Expose storage media type as env variable

Ref #40636

@mml
2017-02-17 08:15:27 -08:00
Jacob Simpson
b9f3e91041 Split RequestNodeCertificate function.
Split the `RequestNodeCertificate` function so it can be called with
different arguments.
2017-02-17 07:40:48 -08:00
Kubernetes Submit Queue
b2df7e5397 Merge pull request #41547 from xilabao/remove-validNonResourceVerbs-in-create-role
Automatic merge from submit-queue (batch tested with PRs 41604, 41273, 41547)

remove validNonResourceVerbs in create role

non-resource-url is only reasonable for clusterroles
2017-02-17 07:20:39 -08:00
Kubernetes Submit Queue
7da78faf06 Merge pull request #41273 from wongma7/pv-controller-shared
Automatic merge from submit-queue (batch tested with PRs 41604, 41273, 41547)

Switch pv controller to shared informer

This is WIP because I still need to do something with bazel? and add 'get storageclasses' to the controller-manager rbac role

@jsafrane PTAL and make sure I did not break anything in the PV controller. Do we need to clone the volumes/claims we get from the shared informer before we use them? I could not find a place where we modify them but you would know for certain.

cc @ncdc because I copied what you did in your other PRs.
2017-02-17 07:20:35 -08:00
Kubernetes Submit Queue
3b14667afe Merge pull request #41604 from shyamjvs/kubemark-num-nodes
Automatic merge from submit-queue

Reduce default value of kubemark's NUM_NODES to 10

Changing the default value of kubemark's NUM_NODES from 100 to 10, as it would then be possible to start kubemark on gce clusters that have been started using kube-up that uses the default config of three n1-standard-2 nodes. I've already been asked by a couple of people about why kubemark is not starting on their cluster because of this. More people shouldn't be facing this issue in future.

cc @kubernetes/sig-scalability-misc @wojtek-t @gmarek
2017-02-17 06:49:21 -08:00
Derek Carr
f1b7621f42 kubelet volumes cleanupOrphanedPodDirs does not distinguish error from found volume paths 2017-02-17 09:07:54 -05:00
Kubernetes Submit Queue
b7717e74e7 Merge pull request #36198 from Crassirostris/logging-load-test
Automatic merge from submit-queue

Add cluster logging load test for GCL

Changed code around logging tests a little to avoid duplication. Added GCL go library, because command line tool cannot handle required number of logs effectively.

Related to https://github.com/kubernetes/kubernetes/issues/34310

@piosz
2017-02-17 05:52:21 -08:00
Wojciech Tyczynski
3695e85b34 Expose storage media type as env variable 2017-02-17 14:16:55 +01:00