Kubernetes Submit Queue
69419a145a
Merge pull request #29802 from jfrazelle/fix-go-vet-errors
...
Automatic merge from submit-queue
fix go vet errors
<!--
Checklist for submitting a Pull Request
Please remove this comment block before submitting.
1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md ).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md ).
3. If you want this PR to automatically close an issue when it is merged,
add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests ).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes ) in the block below.
-->
```release-note
```
This fixes the `go vet` errors brought about by go 1.7 testing re (#28742 ).
The are all pretty trivial and mostly related to literal composites.
also related to #16086
2016-08-15 13:10:08 -07:00
Kubernetes Submit Queue
612e3c2634
Merge pull request #30222 from hodovska/port-forward-cmd-struct
...
Automatic merge from submit-queue
kubectl/port-forward: complete/validate/run structure
```kubectl port-forward``` command is converted to a complete/validate/run kubectl command structure specified here: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md#command-conventions
In this PR is also exposed the ready and stop channel for API consumer.
Fixes #16504
2016-08-12 20:58:53 -07:00
Dominika Hodovska
c5babe2396
expose ready/stop channel
2016-08-12 15:45:57 +02:00
Piotr Szczesniak
a53cfd28fb
Autogenerated changes
2016-08-12 15:13:44 +02:00
Kubernetes Submit Queue
d2543c30d8
Merge pull request #30277 from wojtek-t/optimize_controllers
...
Automatic merge from submit-queue
Avoid computing DeepEqual in controllers all the time
Computing DeepCopy was responsible for ~33% of cpu usage of controller-manager before this PR.
<!--
Checklist for submitting a Pull Request
Please remove this comment block before submitting.
1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md ).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md ).
3. If you want this PR to automatically close an issue when it is merged,
add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests ).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes ) in the block below.
-->
```release-note
* Use the release-note-* labels to set the release note state
* Clear this block to use the PR title as the release note
-OR-
* Enter your extended release note here (newlines are formatted as bullets)
```
<!-- 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/30277 )
<!-- Reviewable:end -->
2016-08-12 03:20:58 -07:00
Daniel Smith
f1fd638962
fix register.go files up + add test import
2016-08-11 17:06:54 -07:00
Kubernetes Submit Queue
035ec518af
Merge pull request #28387 from caesarxuchao/gc-latency-measure
...
Automatic merge from submit-queue
[GarbageCollector] measure latency
First commit is #27600 .
In e2e tests, I measure the average time an item spend in the eventQueue(~1.5 ms), dirtyQueue(~13ms), and orphanQueue(~37ms). There is no stress test in e2e yet, so the number may not be useful.
<!-- 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/28387 )
<!-- Reviewable:end -->
2016-08-11 02:33:55 -07:00
Wojciech Tyczynski
1c9e623045
Remove dead variable from reflector
2016-08-11 08:32:37 +02:00
Jess Frazelle
7e9d82129e
fix go vet errors
...
Signed-off-by: Jess Frazelle <jessfraz@google.com >
fix composites
Signed-off-by: Jess Frazelle <me@jessfraz.com >
2016-08-10 16:45:41 -07:00
Kubernetes Submit Queue
48b7aca2c9
Merge pull request #29672 from lixiaobing10051267/masterLen
...
Automatic merge from submit-queue
Add handling empty index key that may cause panic issue
if len(indexKeys) == 0, "return indexKeys[0]" will cause unexpected result.
<!-- 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/29672 )
<!-- Reviewable:end -->
2016-08-10 14:29:45 -07:00
Chao Xu
41572cb22d
add metrics to gc
2016-08-10 12:45:06 -07:00
Davanum Srinivas
b15219034d
Prevent panic in 'kubectl exec' when redirecting stdout
...
Just add some nil checks to make sure we don't trip over when
we redirect output from exec to a file.
Fixes #30290
2016-08-09 14:52:55 -04:00
Kubernetes Submit Queue
f218aa4b10
Merge pull request #30236 from mikedanese/csr-approval
...
Automatic merge from submit-queue
csr: add approval to the typed client
ref #30163
<!-- 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/30236 )
<!-- Reviewable:end -->
2016-08-08 22:54:19 -07:00
Chao Xu
4d2350632c
only store typeMeta and objectMeta in the gc store
2016-08-08 17:23:13 -07:00
Mike Danese
c131fbaf17
csr: add approval to the typed client
2016-08-08 16:05:05 -07:00
Chao Xu
58b6dee275
install authorization group in 1.4 client
2016-08-06 11:21:41 -07:00
Kubernetes Submit Queue
9083ee971e
Merge pull request #29137 from janetkuo/scheduledjob-controller
...
Automatic merge from submit-queue
Scheduledjob controller
Supersedes #25952 ; first 7 commits come from #25816
<!--
Checklist for submitting a Pull Request
Please remove this comment block before submitting.
1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md ).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md ).
3. If you want this PR to automatically close an issue when it is merged,
add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests ).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes ) in the block below.
-->
```release-note
```
2016-08-05 18:07:48 -07:00
Kubernetes Submit Queue
2537f66f0e
Merge pull request #29230 from luxas/goimport
...
Automatic merge from submit-queue
Run goimport for the whole repo
While removing GOMAXPROC and running goimports, I noticed quite a lot of other files also needed a goimport format. Didn't commit `*.generated.go`, `*.deepcopy.go` or files in `vendor`
This is more for testing if it builds.
The only strange thing here is the gopkg.in/gcfg.v1 => github.com/scalingdata/gcfg replace.
cc @jfrazelle @thockin
2016-08-05 16:22:01 -07:00
Janet Kuo
da57c93a8a
Fix errors, verification and test failures; add unit test for sj UpdateStatus
2016-08-05 13:35:39 -07:00
Eric Tune
8675e014fb
ScheduledJob controller
2016-08-05 13:34:50 -07:00
deads2k
d9a203409a
initial generated code for SAR
2016-08-05 11:37:43 -04:00
deads2k
32920b5617
add subjectaccessreviews resource
2016-08-05 11:20:56 -04:00
Kubernetes Submit Queue
e7d01097dc
Merge pull request #29971 from caesarxuchao/fix-kubectl-rolling-update-with-gc
...
Automatic merge from submit-queue
[GarbageCollector] Fix kubectl rolling-update to work with GC
This changes the order of the [Rename()](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/rolling_updater.go#L532 ) function. After the change, Rename() first deletes the old RC and orphans its pods, then creates the new RC, which will then have a chance to adopt the orphaned pods.
This also fixes the "should support rolling-update to same image" [test](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/kubectl.go#L915 ) when the garbage collector is on.
Here is the detailed explanation on why the test would have failed:
`kubectl rolling-update` will [rename](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/rolling_updater.go#L532-L546 ) the RC. It first creates the an identical RC (including spec.selectors) with the new name, then it deletes the existing RC. When GC is turned on, the newly created RC cannot adopt the existing pod, because it has a controllerRef pointing to the exising RC, so the new RC will create new pods and expect to see the creation. However, the new RC and the old RC have the same selector, so sometimes the old RC, instead of the new RC, has its [expectation lowered](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/replication/replication_controller.go#L346-L362 ), the new RC's expectation will stuck forever. The e2e test then times out when executing `kubectl delete newRC`, because there is the new RC will not scale down as its expectation is not fulfilled.
A side-note, we should fix [rm.getPodController()](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/replication/replication_controller.go#L346 ) to respect pod's controllerref, that will prevent similar bugs.
Also note that an old version `kubectl rolling-update` will not work with the GC. We cannot fix that.
2016-08-04 20:48:10 -07:00
Chao Xu
2558c239b8
remove logWatcher to logf
2016-08-04 10:28:18 -07:00
Kubernetes Submit Queue
c2340870c6
Merge pull request #29952 from fabianofranz/handle_container_terminated_pod_running_condition
...
Automatic merge from submit-queue
Handle container terminated but pod still running in conditions
Sometimes when you have a pod with more than one container, and the container runs and terminates really fast, `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.
2016-08-04 07:13:08 -07:00
Kubernetes Submit Queue
544851a19f
Merge pull request #29796 from deads2k/token-review
...
Automatic merge from submit-queue
Token review endpoint
Unrevert of #28788 , which was rolled back because of https://github.com/kubernetes/kubernetes/issues/29375
@cjcullen @wojtek-t I'd like to remerge if possible. Have we gotten the field checking mentioned here relaxed? https://github.com/kubernetes/kubernetes/pull/28788#discussion_r71918442
2016-08-03 20:48:31 -07:00
Kubernetes Submit Queue
c2614aee9a
Merge pull request #29500 from lixiaobing10051267/masterFound
...
Automatic merge from submit-queue
Check all places to break the loop when object found
Check all places to break the loop when object found.
2016-08-03 20:05:15 -07:00
Chao Xu
96c84303bd
fix kubectl rolling-update when GC is enabled
2016-08-03 15:57:03 -07:00
deads2k
60dd4a5d26
interesting changes to add tokenreviews endpoint to implement webhook
2016-08-03 08:37:45 -04:00
deads2k
eb79e2c859
generated code changes
2016-08-03 08:37:45 -04:00
Fabiano Franz
30cf0f9890
Handle container terminated but pod still running in conditions
2016-08-02 21:32:15 -03:00
Kris
a87377c7a9
Adding a defered RESTMapper
2016-08-02 10:35:44 -07:00
Kris
4e1f1c10ff
discovery: Adding a discover based RESTMapper
...
Added a PriorityRESTMapper that operates off of discovery information. I
made an auxiliary data type and function to help collect and organize
the information.
2016-08-02 10:35:44 -07:00
k8s-merge-robot
0fbd60fa30
Merge pull request #29187 from soltysh/multiversion_kubectl
...
Automatic merge from submit-queue
Create client from API version passed in config or use default
When creating a client read the `GroupVersion` value passed in the `restclient.Config`. If the passed `GroupVersion` does not match current group or is not enabled fallback to default `GroupVersion` for that group.
This PR should allow accessing `ScheduledJob` properly in `batch/v2alpha1`.
@smarterclayton @deads2k @caesarxuchao @lavalamp ptal
2016-08-02 06:10:26 -07:00
Lucas Käldström
c88a07ce1a
Run goimports
2016-08-02 15:12:39 +03:00
Timothy St. Clair
9a02bffe6d
Update acquire to use newer JitterUntil vs. sleep with 0 timer which may
...
have caused a race in Until.
2016-07-29 11:10:00 -05:00
childsb
f5bd7d471e
API Changes for StorageClass
2016-07-28 19:01:01 -04:00
k8s-merge-robot
aba7ae0d90
Merge pull request #29655 from smarterclayton/petset_client
...
Automatic merge from submit-queue
Add Apps() and PetSet client to client/unversioned
Also add a test fake
2016-07-28 13:54:16 -07:00
Harry Zhang
cb14b35bde
Refactor util clock into it's own pkg
2016-07-28 02:29:04 -04:00
Clayton Coleman
d67187856f
No PetSet client in client/unversioned
...
Also add fakes
2016-07-27 10:08:58 -04:00
lixiaobing10051267
a9d631665e
Add handling empty index key that may cause panic issue
2016-07-27 21:44:22 +08:00
k8s-merge-robot
d897db4ac5
Merge pull request #28933 from smarterclayton/accept_content_types
...
Automatic merge from submit-queue
Use response content-type on restclient errors
Also allow a new AcceptContentTypes field to allow the client to ask for
a fallback serialization when getting responses from the server. This
allows a new client to ask for protobuf and JSON, falling back to JSON
when necessary.
The changes to request.go allow error responses from non-JSON servers to
be properly decoded.
@wojtek-t - also alters #28910 slightly (this is better output)
2016-07-26 22:56:53 -07:00
k8s-merge-robot
ffff1ab63c
Merge pull request #28319 from grodrigues3/revert-comments-tLogf
...
Automatic merge from submit-queue
reverted the code from 23688 that cause race condition with older version of Go
```release-note
* release-note-None
```
[]()
2016-07-26 19:56:47 -07:00
Maciej Szulik
1e496fd8ce
Create client from API version passed in config or use default
...
When creating a client read the GroupVersion value passed in the
restclient.Config. If the passed GroupVersion does not match current
group or is not enabled fallback to default GroupVersion for that group.
2016-07-26 11:54:25 +02:00
Clayton Coleman
203cf2be6f
Use response content-type on restclient errors
...
Also allow a new AcceptContentTypes field to allow the client to ask for
a fallback serialization when getting responses from the server. This
allows a new client to ask for protobuf and JSON, falling back to JSON
when necessary.
The changes to request.go allow error responses from non-JSON servers to
be properly decoded.
2016-07-24 12:08:40 -04:00
lixiaobing10051267
be8d081539
Check all places to break the loop when object found
2016-07-23 13:49:04 +08:00
k8s-merge-robot
df2cf16ddb
Merge pull request #26709 from hodovska/master
...
Automatic merge from submit-queue
Allow shareable resources for admission control plugins.
Changes allow admission control plugins to share resources. This is done via new PluginInitialization structure. The structure can be extended for other resources, for now it is an shared informer for namespace plugins (NamespiceLifecycle, NamespaceAutoProvisioning, NamespaceExists).
If a plugins needs some kind of shared resource e.g. client, the client shall be added to PluginInitializer and Wants methods implemented to every plugin which will use it.
2016-07-22 11:07:05 -07:00
Dominika Hodovska
037d116add
Factory for SharedIndexInformers
2016-07-21 14:04:48 +02:00
Wojciech Tyczynski
4d0d115690
Revert "add tokenreviews endpoint to implement webhook"
2016-07-21 09:40:35 +02:00
k8s-merge-robot
8ead63f127
Merge pull request #28788 from deads2k/wire-authentication
...
Automatic merge from submit-queue
add tokenreviews endpoint to implement webhook
Wires up an API resource under `apis/authentication.k8s.io/v1beta1` to expose the webhook token authentication API as an API resource. This allows one API server to use another for authentication and uses existing policy engines for the "authoritative" API server to controller access to the endpoint.
@cjcullen you wrote the initial type
2016-07-20 22:23:45 -07:00