Commit Graph

15291 Commits (073fc28c2442cffacbbe9ebac1b710c30c858083)

Author SHA1 Message Date
Kubernetes Submit Queue 4a176600fc Merge pull request #32482 from m1093782566/m109-pet-set-fix-update-bug
Automatic merge from submit-queue

[Pet Set] Fix losing pet updated information between update retries

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

Address #32481

@bprashanth
2016-09-20 05:16:04 -07:00
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
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
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
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
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
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
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