Commit Graph

15350 Commits (c43a106b261ebdb9022fbd9bb3d60aeb6499b738)

Author SHA1 Message Date
Kubernetes Submit Queue 1070a51830 Merge pull request #31388 from yifan-gu/fix_kubenet_getRunningPods
Automatic merge from submit-queue

kubenet: SyncHostports for both running and ready to run pods.

This fixes the race that happens in rktnetes when pod B invokes
'kubenet.SetUpPod()' before another pod A becomes actually running.

The second 'kubenet.SetUpPod()' call will not pick up the pod A
and thus overwrite the host port iptable rules that breaks pod A.

This PR fixes the case by listing all 'active pods' (all non-exited
pods) instead of only running pods.

Fix https://github.com/kubernetes/kubernetes/issues/27975 

Originally discussed in https://github.com/kubernetes/kubernetes/pull/27914#issuecomment-228140108

cc @euank @freehan @dcbw
2016-09-20 04:24:41 -07:00
Kubernetes Submit Queue c97246247a Merge pull request #30199 from dims/re-add-roadmap-extend-all
Automatic merge from submit-queue

Extend all to more resources

Added more things from the list here:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cmd.go#L159

Update the devel/kubectl-conventions.md with the rules mentioned by
a few folks on which resources could be added to the special 'all' alias
2016-09-20 01:49:45 -07:00
Kubernetes Submit Queue 76f2ddf4e8 Merge pull request #32292 from pmorie/subresource-fake
Automatic merge from submit-queue

Add godoc on using FakeClient with subresources

Add a little godoc on using FakeClient with subresources, hoping to prevent future occurences of #32127.
2016-09-19 23:51:23 -07:00
Kubernetes Submit Queue 8d0518d4d2 Merge pull request #32897 from deads2k/api-07-remove-dead-mapper
Automatic merge from submit-queue

remove dead mapper

Removing a write-only field I found looking at the registration code.
2016-09-19 23:12:06 -07:00
Kubernetes Submit Queue 2941069307 Merge pull request #32894 from deads2k/cli-01-remove-arg
Automatic merge from submit-queue

make --include-extended-apis deprecated and remove plumbing

Marks a dead CLI parameter as deprecated and removes the plumbing for it.
2016-09-19 21:11:04 -07:00
d00369826 3de4695057 fix petset update(pet) retries bug
Change-Id: I92e2b653ab78fca72ae41cf87945d90fbbc67f44
2016-09-20 11:35:58 +08:00
Kubernetes Submit Queue b4d5177c23 Merge pull request #32816 from pmorie/kubelet-godoc
Automatic merge from submit-queue

Add missing kubelet godoc

Adds some missing godoc to Kubelet, which I found while triaging a bug.
2016-09-19 20:33:21 -07:00
lojies 5c532dc683 fix a spell mistake 2016-09-20 11:21:25 +08:00
Kubernetes Submit Queue aa60583ea1 Merge pull request #33001 from kargakis/fix-requeueing-in-csr-controller
Automatic merge from submit-queue

controller: a couple of fixes for csr

Fixes:
* delete resource handler wasn't taking into account tombstones
* csr would requeue twice on update failure

@deads2k @mikedanese ptal
2016-09-19 17:13:46 -07:00
Morgan Bauer fa28ee8683
delete private interface with no references in package 2016-09-20 00:13:16 +00:00
Dawn Chen 4c4623e5be Fix backward compatibility issue caused by promoting initcontainers from alpha to beta. 2016-09-19 16:33:25 -07:00
Kubernetes Submit Queue 3802a9ba35 Merge pull request #31529 from deads2k/rbac-05-bootstrapping
Automatic merge from submit-queue

add GenericAPIServer posthooks for initialization

Adds the concept of a `PostStartHook` to the `GenericAPIServer` to allow post-server start hooks.  This gives a standard location to perform post-start bootstrapping tasks.  The common case usage we have downstream are security related bootstrapping tasks that are performed on the "empty etcd" initialization cases.  The RBAC authorizer is a good example of this in kube.  It needs a location to create default policies to start a server which is capable of being accessed.

Kube is also likely to hit this for things like PSP and breaking the monolithic controller user into separate, scoped service accounts.

@kubernetes/sig-api-machinery for the `GenericAPIServer` bits
@kubernetes/sig-auth for the particular clusterrole bootstrapping. I've only done one to start, but I suspect we'll start making more and probably introduce a binding so that the RBAC super-user doesn't remain a special case forever.
2016-09-19 16:29:26 -07:00
Clayton Coleman c0b9528365
Pass a value for versioned.Event, not a pointer 2016-09-19 18:33:45 -04:00
Kubernetes Submit Queue 30ff1f495a Merge pull request #32914 from yujuhong/limit_names
Automatic merge from submit-queue

Limit the number of names per image reported in the node status

This fixes #32908
2016-09-19 15:10:52 -07:00
Kubernetes Submit Queue 80f0f82903 Merge pull request #32934 from yifan-gu/fix_pod_sandbox
Automatic merge from submit-queue

CRI: Add missing sandbox in runningPod.

Add a container that represents pod sandbox when converting the
pod status to runningPod.

Without the change, `kubeGenericRuntimeManager.killPodWithSyncResult()` will not kill any sandboxes.

cc @feiskyer @Random-Liu @yujuhong
2016-09-19 13:48:40 -07:00
Yu-Ju Hong bd357e9761 Various fixes to enable kubelet to switch to kuberuntime/dockershim 2016-09-19 13:09: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
Kubernetes Submit Queue 4bfebf0add Merge pull request #32907 from hongchaodeng/etcd_fix
Automatic merge from submit-queue

etcd watcher: centralize error handling

We should centralize error handling in watcher in run(). Otherwise this could silently return.

Also we don't need the grpc code checking anymore. It's fixed.
2016-09-19 13:07:11 -07:00
Matthew Wong 7ba1410521 Generate clientset 1.5 2016-09-19 15:54:08 -04:00
deads2k 7d1f13d3e0 add GenericAPIServer posthooks for initialization 2016-09-19 14:58:27 -04:00
Yifan Gu 27d4866c4e CRI: Add missing sandbox in runningPod.
Append containers that represent pod sandboxes when converting the
pod status to runningPod.
2016-09-19 11:52:00 -07:00
Kubernetes Submit Queue a089791f3e Merge pull request #32989 from lojies/fixspellerr
Automatic merge from submit-queue

fix a spell mistake

**What this PR does / why we need it**:
fixed a spell mistake

**Which issue this PR fixes** :

**Special notes for your reviewer**:

**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
```
2016-09-19 11:41:00 -07:00
Davanum Srinivas e1373cf516 Extend all to more resources
Added more things from the list here:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cmd.go#L159

Update the devel/kubectl-conventions.md with the rules mentioned by
a few folks on which resources could be added to the special 'all' alias
2016-09-19 13:01:59 -04:00
deads2k 4aa61ddcb2 remove dead mapper 2016-09-19 09:57:19 -04:00
Kubernetes Submit Queue 87b40782c9 Merge pull request #31150 from ncdc/handle-init-container-terminated-pod-running-condition
Automatic merge from submit-queue

Check init containers in PodContainerRunning

Sometimes when an init container runs and terminates quickly, PodContainerRunning can go into a
state where the pod indicates it's still running, but the container is already terminated. Handle
that condition by returning ErrContainerTerminated when it happens.

See also #29952

@smarterclayton @fabianofranz
2016-09-19 05:43:21 -07:00
Kubernetes Submit Queue aa0e8b9cc1 Merge pull request #31434 from johscheuer/quobyte-dynamic-prov
Automatic merge from submit-queue

Support Quobyte as StorageClass

This PR allows Users to use Quobyte as StorageClass for dynamic volume provisioning and implements the Provisioner/Deleter Interface. 

@quolix @kubernetes/sig-storage @rootfs
2016-09-19 02:39:41 -07:00
Kubernetes Submit Queue 3d82251e92 Merge pull request #32745 from abrarshivani/vsphere_storage_class
Automatic merge from submit-queue

Support for storage class for vSphere volume plugin. Custom disk format for dynamic provisioning.

This PR does following,

1.  Add support for storage class for vSphere volume plugin.
2. Add option for user to provision disk with different disk formats. Format choices are
    "thin" (default), "zeroedthick", "eagerzeroedthick".

Sample storageclass (yaml):
```
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: slow
provisioner: kubernetes.io/vsphere-volume
parameters:
  diskformat: thin
```
2016-09-19 01:51:15 -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 892a6d7af5 Merge pull request #32937 from philips/document-node-id-fields
Automatic merge from submit-queue

api: types: document NodeSpec ID fields

Document MachineID as the preferred field from the discussion here:
https://groups.google.com/d/msg/kubernetes-sig-node/_3mXXB1ohZs/EuYtCzHvBgAJ

I couldn't get the generated things to update. I ran:

```
hack/update-generated-runtime.sh
hack/update-codegen.sh
hack/update-generated-swagger-docs.sh
hack/update-generated-protobuf.sh
hack/update-codecgen.sh
```

What did I miss?!

cc @dchen1107 @thockin
2016-09-18 21:29:29 -07:00
Michail Kargakis 2fd3c490df controller: a couple of fixes for csr
Fixes:
* delete resource handler wasn't taking into account tombstones
* csr would requeue twice on update failure
2016-09-18 22:48:46 +02:00
lojies fc9f029e5a fix a spell mistake 2016-09-18 15:04:59 +08:00
Wojciech Tyczynski 27d75054b3 Avoid unnecessary API calls from GC 2016-09-18 07:09:11 +02:00
Kubernetes Submit Queue 920581d964 Merge pull request #32664 from m1093782566/m109-certificates-hot-loop
Automatic merge from submit-queue

[Controller Manager] Fix certificates controller hotloop and use utilruntime.HandleError to replace glog.Errorf

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

Fix certificates controller hotloop on unexpected API server rejections.

**Which issue this PR fixes** 

Related issue is #30629

**Special notes for your reviewer**:

@deads2k @derekwaynecarr PTAL.

I find there is no unit test for certificates controller, and I will implement unit tests for it later.
2016-09-17 21:00:59 -07:00
Kubernetes Submit Queue 41fc0a4506 Merge pull request #32776 from m1093782566/m109-fix-endpoint-controller-hotloop
Automatic merge from submit-queue

[Controller Manager] Fix endpoint controller hot loop and use utilruntime.HandleError to replace glog.Errorf

<!--  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
-->

**Why**:

Fix endpoint controller hot loop and use `utilruntime.HandleError` to replace `glog.Errorf`

**What**

1. Fix endpoint controller hot loop in `pkg/controller/endpoint`

2.  Fix endpoint controller hot loop in `contrib/mesos/pkg/service`

3. Sweep cases of `glog.Errorf` and use `utilruntime.HandleError` instead.

**Which issue this PR fixes**

Fixes #32843
Related issue is #30629 

**Special notes for your reviewer**:

@deads2k @derekwaynecarr 

The changes on `pkg/controller/endpoints_controller.go` and `contrib/mesos/pkg/service/endpoints_controller.go` are almost the same except `contrib/mesos/pkg/service/endpoints_controller.go` does not pass `podInformer` as the parameter of `NewEndpointController()`. 

So, I didn't wait `podStoreSynced` before `syncService()`(Just leave it as it was). Will it lead to a problem?
2016-09-17 20:01:41 -07:00
Brandon Philips 080b3d0a8c api: types: document NodeSpec ID fields
Document MachineID as the preferred field from the discussion here:
https://groups.google.com/d/msg/kubernetes-sig-node/_3mXXB1ohZs/EuYtCzHvBgAJ
2016-09-17 16:37:29 -07:00
Kubernetes Submit Queue 3aa72fa480 Merge pull request #32926 from kubernetes/revert-32841-revert-32251-fix-oom-policy
Automatic merge from submit-queue

[kubelet] Fix oom-score-adj policy in kubelet

Fixes #32238 

We have been having this regression since v1.3. It is critical for GKE/GCE deployments of k8s because docker daemon has a high likelihood of being OOM killed which will end up nuking all containers. 
The reason for moving from mnt to pid is that docker daemon moves itself into a new mnt namespace with systemd based deployments.
2016-09-17 13:00:20 -07:00
Kubernetes Submit Queue af0b973fba Merge pull request #32885 from janetkuo/kubectl-rollingupdate-garbage-collector-error
Automatic merge from submit-queue

Improve error message when kubectl rolling-update fail due to version skew

<!--  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**: follow up #32751, we should print the real error message first, the workaround later 

**Before:**
```console
$ kubectl rolling-update nginx --image=redis 
Created nginx-6ee4372891ec51a97dfbf83ed0846886
Scaling up nginx-6ee4372891ec51a97dfbf83ed0846886 from 0 to 1, scaling down nginx from 1 to 0 (keep 1 pods available, don't exceed 2 pods)
Scaling nginx-6ee4372891ec51a97dfbf83ed0846886 up to 1
Scaling nginx down to 0
Update succeeded. Deleting old controller: nginx
Renaming nginx-6ee4372891ec51a97dfbf83ed0846886 to nginx
Error from server: Note: if you are using "kubectl rolling-update" and your kubectl version is older than v1.4.0, your rolling-update has probably failed, though the pods are correctly updated. Please see https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#kubectl-rolling-update for a workaround. : object is being deleted: replicationcontrollers "nginx" already exists
```

**After:** (see the error message)
```console
$ kubectl rolling-update nginx --image=redis
Created nginx-12b5782bcdff627fca46537e9e1045f8
Scaling up nginx-12b5782bcdff627fca46537e9e1045f8 from 0 to 1, scaling down nginx from 1 to 0 (keep 1 pods available, don't exceed 2 pods)
Scaling nginx-12b5782bcdff627fca46537e9e1045f8 up to 1
Scaling nginx down to 0
Update succeeded. Deleting old controller: nginx
Renaming nginx-12b5782bcdff627fca46537e9e1045f8 to nginx
Error from server: object is being deleted: replicationcontrollers "nginx" already exists: if you're using "kubectl rolling-update" with kubectl version older than v1.4.0, your rolling update has failed, though the pods are correctly updated. Please see https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#kubectl-rolling-update for a workaround
```

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

**Special notes for your reviewer**:

**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
NONE
```

Print the real error message first, the workaround later

@lavalamp @gmarek
2016-09-17 12:20:33 -07:00
Kubernetes Submit Queue 8fd414537b Merge pull request #32823 from nikhiljindal/descNs
Automatic merge from submit-queue

Allow kubectl describe ns to pass if server does not support resource quotas and limit ranges

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

Context: federation-apiserver does not support limit ranges and resource quotas. Hence `kubectl describe ns` fails right now.
Fixing it so that `kubectl describe ns` does not error out and atleast prints information about the namespace.

cc @kubernetes/sig-cluster-federation @kubernetes/kubectl
2016-09-17 04:04:20 -07:00
Johannes Scheuermann 02db13b620 Update quobyteApiServer to quobyteAPIServer 2016-09-17 10:08:52 +02:00
Kubernetes Submit Queue 9fc8ebdafa Merge pull request #32891 from wojtek-t/route_controller_fix
Automatic merge from submit-queue

Don't update NodeNetworkUnavailable condition if it's already set cor…

Ref #32571
2016-09-17 00:39:34 -07:00
Kubernetes Submit Queue f84e1387a0 Merge pull request #31423 from miaoyq/delete-a-unused-func
Automatic merge from submit-queue

delete a unused function in the 'pkg/kubectl/cmd/util/helpers.go'

Delete the function `getFlag` in the `pkg/kubectl/cmd/util/helpers.go`, because it is not used anywhere in the project.

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-09-16 23:59:47 -07:00
Kubernetes Submit Queue 06fac3b09e Merge pull request #32813 from deads2k/rbac-07-authorizer
Automatic merge from submit-queue

make rbac authorizer use rule comparison, not covers

Updates the rbac authorizer to use rule comparisons and not a covers check to perform authorization.
2016-09-16 23:19:54 -07:00
Kubernetes Submit Queue cd051703b3 Merge pull request #32877 from deads2k/client-09-fixup-lister
Automatic merge from submit-queue

change factorization of listers to make them easier to add

`Listers` have a tremendous amount of duplicate code.  This factors that out.

@smarterclayton ptal.
2016-09-16 22:39:37 -07:00
Yanqiang Miao ed3b3ad47d delete a unused function in the 'pkg/kubectl/cmd/util/helpers.go'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-09-17 12:43:59 +08:00
Kubernetes Submit Queue 051ee17094 Merge pull request #30815 from ymqytw/refactoring
Automatic merge from submit-queue

Fixes #30562: Refactor kubectl command options to use common struct for common file params

Fixes #30562 : Refactor common go struct options in pkg/kubectl/cmd/*.go.
@pwittrock
2016-09-16 19:48:22 -07:00
Yifan Gu 5389a74388 kubenet: SyncHostports for both running and ready to run pods.
This fixes the race that happens in rktnetes when pod B invokes
'kubenet.SetUpPod()' before another pod A becomes actually running.

The second 'kubenet.SetUpPod()' call will not pick up the pod A
and thus overwrite the host port iptable rules that breaks pod A.

This PR fixes the case by listing all 'active pods' (all non-exited
pods) instead of only running pods.
2016-09-16 17:29:44 -07:00
Abrar Shivani 57180093af Support for storage class for vSphere volume plugin. Custom disk format for dynamic provisioning. 2016-09-16 17:15:38 -07:00
Vish Kannan a1fe3adbc7 Revert "Revert "[kubelet] Fix oom-score-adj policy in kubelet"" 2016-09-16 16:32:58 -07:00
Hongchao Deng 5a4a095e29 etcd watcher: centralize error handling 2016-09-16 15:31:49 -07:00
Yu-Ju Hong 7ada99181c Limit the number of names per image reported in the node status 2016-09-16 15:16:08 -07:00
Kubernetes Submit Queue af3050dd15 Merge pull request #32835 from yujuhong/docker_annotations
Automatic merge from submit-queue

dockershim: support annotations and filtering by sandbox ID
2016-09-16 14:17:03 -07:00
deads2k 862415aaa2 make --include-extended-apis deprecated and remove plumbing 2016-09-16 16:05:52 -04:00
Janet Kuo 30512f909d Improve error message when kubectl rolling-update fail due to version skew
Print the real error message first, the workaround later
2016-09-16 13:00:55 -07:00
deads2k 1943d256d2 make rbac authorizer use rule comparison, not covers 2016-09-16 15:53:42 -04:00
Wojciech Tyczynski d7d6249781 Don't update NodeNetworkUnavailable condition if it's already set correctly 2016-09-16 21:03:20 +02:00
deads2k 1bf17eb4e9 change factorization of listers to make them easier to add 2016-09-16 14:49:00 -04:00
Yu-Ju Hong 73f30b18e4 dockershim: support filter containers by sandbox ID 2016-09-16 11:31:15 -07:00
Yu-Ju Hong 2f60b72dd3 dockershim: add support for annotations 2016-09-16 11:31:15 -07:00
Kubernetes Submit Queue 791116476f Merge pull request #32348 from asalkeld/metrics-nil-spammy
Automatic merge from submit-queue

Disambiguate unsupported metrics from metrics errors

**What this PR does / why we need it**:
Stop logging "metrics are not supported for MetricsNil Volumes" as it spams the log.

**Which issue this PR fixes** 
fixes #20676, fixes #27373

**Special notes for your reviewer**:
None

**Release note**:
```release-note
Don't log "metrics are not supported for MetricsNil Volumes"
```
2016-09-16 11:27:15 -07:00
Yu-Ju Hong 5e318cd749 CRI: add annotations to PodSandbox
Both Container and ContainerStatus includes labels and annotations. PodSandbox
should be consistent with that.
2016-09-16 11:09:24 -07:00
Yu-Ju Hong fd70d94330 dockershim: fix sandbox/container filtering 2016-09-16 11:09:24 -07:00
Kubernetes Submit Queue e5a84398db Merge pull request #32836 from yujuhong/fix_nil_ptr
Automatic merge from submit-queue

kuberuntime: fix nil pointer dereference in killPodWithSyncResult

This fixes #32742
2016-09-16 09:40:03 -07:00
Kubernetes Submit Queue 2ca15b9f76 Merge pull request #32815 from deads2k/controller-02-daemonset-informer
Automatic merge from submit-queue

convert daemonset controller to shared informers

Convert the daemonset controller completely to `SharedInformers` for its list/watch resources.

@kubernetes/rh-cluster-infra @ncdc
2016-09-16 09:39:57 -07:00
Kubernetes Submit Queue 12d916750e Merge pull request #32387 from sttts/sttts-handler-cleanup
Automatic merge from submit-queue

Cleanup non-rest apiserver handlers

- rename MuxHelper -> PathRecorderMux
- move non-rest handlers into routes packages within genericapiserver and `pkg/routes` (those from master)
- move ui and logs handlers out of genericapiserver (they are
  not generic)
- make version handler configurable (`config.EnableVersion`)
2016-09-16 08:58:06 -07:00
Yu-Ju Hong 18f230c524 kuberuntime: fix nil pointer dereference in killPodWithSyncResult 2016-09-16 08:38:11 -07:00
deads2k 234d68be83 convert daemonset controller to shared informers 2016-09-16 10:40:46 -04:00
Hai Huang 192825bc5e fix a typo 2016-09-16 09:42:29 -04:00
d00369826 a3888335f7 fix endpoint controller hot loop
Change-Id: I0f667006f310fdca6abe324f9ea03537679e9163
2016-09-16 21:41:22 +08:00
Kubernetes Submit Queue a665002d80 Merge pull request #29684 from bprashanth/log_tun
Automatic merge from submit-queue

Change log level to reduce spam

Periodically dumping ips of all nodes in large clusters is a little spammy
2016-09-16 05:51:07 -07:00
Kubernetes Submit Queue e8fbcb1669 Merge pull request #32654 from soltysh/sj_clientset
Automatic merge from submit-queue

Switch ScheduledJob controller to use clientset

**What this PR does / why we need it**:
This is part of #25442. I've applied here the same fix I've applied in the manual client in #29187, see the 1st commit for that (@caesarxuchao we've talked about it in #29856).

@deads2k as promised 
@janetkuo ptal
2016-09-16 05:03:57 -07:00
Johannes Scheuermann 0b7cb5f2ae Inital Quobyte dynamic provision 2016-09-16 13:26:18 +02:00
Kubernetes Submit Queue 0d9685b0b5 Merge pull request #32805 from caesarxuchao/more-gc-optimization
Automatic merge from submit-queue

Add the uid in a delete event to the absentOwnerCache

This is a small optimization to further reduce the traffic sent by the GC.

In #31167, GC caches the non-existent owners when it processes the dirtyQueue. As discovered in #32571, there is still small inefficiency, because there are multiple goroutines processing the dirtyQueue, many of them might send a GET to the apiserver before the cache gets populated.

This PR populates the cache when GC observes an object gets deleted, which happens before the processing of the dirtyQueue, so it avoids the simultaneous GET sent by the GC workers.

cc @lavalamp
2016-09-16 00:40:24 -07:00
Kubernetes Submit Queue dfe3a46672 Merge pull request #31847 from feiskyer/syncpod
Automatic merge from submit-queue

Kubelet: add SyncPod for new runtime API

This PR adds implements of `SyncPod` for new runtime API. Note that init containers is not included, it will in another following PR.

**DO-NOT-MERGE**. Based on #31322 and #31395, only last commit is for review.

CC @yujuhong @Random-Liu and @kubernetes/sig-node @kubernetes/sig-rktnetes
2016-09-15 22:26:52 -07:00
Kubernetes Submit Queue a39cee990c Merge pull request #32751 from caesarxuchao/specific-error-rolling-update
Automatic merge from submit-queue

Specific error message on failed rolling update issued by older kubectl against 1.4 master

Fix #32706

`kubernetes-e2e-gke-1.4-1.3-kubectl-skew` (1.3 kubectl and 1.4 master) test suite failed with:
```
k8s.io] Kubectl client [k8s.io] Kubectl rolling-update should support rolling-update to same image [Conformance]
...
Error from server: object is being deleted: replicationcontrollers "e2e-test-nginx-rc" already exists error: exit status 1 not to have occurred
```

It's because the old RC had an orphanFinalizer, so it is not deleted from the key-value store immediately. In turn, the creation of the new RC of the same name failed. 

In this failure, the RC and pods are updated, it's just that the RC is of different name, i.e., original name + a hash generated based on podTemplate. The error is confusing to user, but not that bad. So this PR just prints a warning message to instruct users how to work around.

1.4 kubectl rolling-update uses different logic so it's working.

@lavalamp @gmarek @janetkuo @pwittrock 

cc @liggitt for the ctx changes.
2016-09-15 21:41:56 -07:00
Vish Kannan 173fd499cf Merge pull request #32841 from kubernetes/revert-32251-fix-oom-policy
Revert "[kubelet] Fix oom-score-adj policy in kubelet"
2016-09-15 21:12:03 -07:00
Kubernetes Submit Queue a2c186dbd0 Merge pull request #32786 from aofry/issue-32747
Automatic merge from submit-queue

prevent printing of stack trace when proxying 304 requests in api gateway

partially addresses #32747.
2016-09-15 20:58:38 -07:00
Kubernetes Submit Queue 27c093ea90 Merge pull request #32048 from smarterclayton/consistent_errors
Automatic merge from submit-queue

Handle Stream() errors consistently in restclient

We should be following the same rules for Stream() as the normal body
request flow.

Also add slightly more output on a server error - in the future we may
want to clean this up but it's potentially hiding bad responses.

Related to #32009 but isn't the fix (so far)
2016-09-15 20:13:48 -07:00
Vish Kannan 492ca3bc9c Revert "[kubelet] Fix oom-score-adj policy in kubelet" 2016-09-15 19:28:59 -07:00
Kubernetes Submit Queue 0d8db69660 Merge pull request #32831 from hongchaodeng/deb
Automatic merge from submit-queue

etcd3/watcher: logging error

To debug #32770

If error happened, the watcher might just stop/exit silently.
2016-09-15 18:48:39 -07:00
Kubernetes Submit Queue 2c6620b1ee Merge pull request #32563 from ZTE-PaaS/zhangke-patch-045
Automatic merge from submit-queue

Check kubeClient nil in Kubelet and bugfix

1. check kubeClient nil first before using as it maybe nil
2. configMaps and secrets map do not be used properly and should use it as cache
2016-09-15 18:48:34 -07:00
Kubernetes Submit Queue 9a3429829c Merge pull request #32662 from humblec/glusterfs-default-volume
Automatic merge from submit-queue

Change the default volume type of GlusterFS provisioner.

At  present provisioner creates 'Distribute' Volume and  this patch change the default
volume type 'Distribute Replica:(3)' volume.
2016-09-15 18:07:14 -07:00
Hongchao Deng 3e9af272d5 etcd3/watcher: logging error 2016-09-15 17:23:04 -07:00
Chao Xu c4ea205aeb print instruction in case of failed kubectl 1.3 rolling-update against 1.4 cluster 2016-09-15 17:20:39 -07:00
Kubernetes Submit Queue fcc97f37ee Merge pull request #32718 from mikedanese/mv-informer
Automatic merge from submit-queue

move informer and controller to pkg/client/cache

@kubernetes/sig-api-machinery
2016-09-15 16:44:30 -07:00
Kubernetes Submit Queue 5fe3bd449f Merge pull request #30565 from lavalamp/improve-registered
Automatic merge from submit-queue

Centralize install code

Trying to figure out a way to do this that makes the changes as painless to roll out as possible. This is going to be a multi-step process...
2016-09-15 16:03:39 -07:00
Saad Ali cb88d88b3e Merge pull request #32251 from vishh/fix-oom-policy
[kubelet] Fix oom-score-adj policy in kubelet
2016-09-15 15:24:54 -07:00
nikhiljindal b84e53bc2b Allow describe ns to pass if server does not support resource quotas and limit ranges 2016-09-15 15:16:49 -07:00
Kubernetes Submit Queue 1c10f53863 Merge pull request #32493 from deads2k/client-06-discoveryrestmapper
Automatic merge from submit-queue

use discovery restmapper for kubectl

Updates the `kubectl` factory to use a discovery rest mapper for locating resources.  This allows generic gets.

@kargakis @sttts @fabianofranz I'll let you guys fight over it. :)
2016-09-15 14:39:58 -07:00
Chao Xu d122de5371 add the uid in a delete event to the absentOwnerCache 2016-09-15 13:53:47 -07:00
Paul Morie 703cc16403 Add missing kubelet godoc 2016-09-15 16:27:09 -04:00
Mike Danese a765d59932 move informer and controller to pkg/client/cache
Signed-off-by: Mike Danese <mikedanese@google.com>
2016-09-15 12:50:08 -07:00
Chao Xu 21896dac4b add the uid in a delete event to the absentOwnerCache 2016-09-15 11:22:22 -07:00
Kubernetes Submit Queue 9f0dc7fe27 Merge pull request #32744 from yujuhong/fix_shim
Automatic merge from submit-queue

Clarify the "version" requirement in CRI and fix various bugs in dockershim

This fixes #32741
2016-09-15 08:50:59 -07:00
Pengfei Ni d65309399a Kubelet: add SyncPod for new runtime API 2016-09-15 23:32:36 +08:00
deads2k 771915c6c4 make shortcut expanding restmapper handle all 2016-09-15 11:03:51 -04:00
deads2k 4359c79f53 add FirstHitRESTMapper for adding thirdparty resources 2016-09-15 10:26:39 -04:00
deads2k 500cddc5c3 use discovery restmapper for kubectl 2016-09-15 10:26:39 -04:00
Humble Chirammal b4fd7e5591 Change the default volume type of GlusterFS provisioner.
At present, provisioner creates Distribute Volume and this patch
change the default volume type to Distribute-Replica(3) volume.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-09-15 19:00:21 +05:30
Kubernetes Submit Queue 0a62dab566 Merge pull request #32645 from wojtek-t/fix_cacher_logging
Automatic merge from submit-queue

Fix logging in cacher

@smarterclayton @liggitt @hongchaodeng
2016-09-15 05:56:39 -07:00
Kubernetes Submit Queue e3f0ce2347 Merge pull request #32586 from deads2k/api-05-restrict-versions
Automatic merge from submit-queue

restrict discoverable versions to those that have resources

Prevents versions with no resources from appearing in discovery.

@soltysh ptal.  I think you have some issues for this, mind wiring them up?

```
kubectl api-versions
apps/v1alpha1
authentication.k8s.io/v1beta1
authorization.k8s.io/v1beta1
autoscaling/v1
batch/v1
certificates.k8s.io/v1alpha1
extensions/v1beta1
policy/v1alpha1
rbac.authorization.k8s.io/v1alpha1
storage.k8s.io/v1beta1
v1
```
Fixes  #29998.
2016-09-15 05:56:34 -07:00