Commit Graph

1445 Commits (9118a1252f427aac59079c04a46bbd9640d73692)

Author SHA1 Message Date
Daniel Smith 9dcef2e3cd Revert "Enable v3 Client as the default on UTs" 2016-08-24 13:16:40 -07:00
Wojciech Tyczynski d5a596bca1 More efficient field selectors 2016-08-24 09:08:38 +02:00
Girish Kalele b82c028f77 GCE Cloud provider changes for ESIPP
Add feature gate (ExternalTrafficLocalOnly) for alpha feature
2016-08-23 16:16:39 -07:00
Janet Kuo 90557ec56c Handle overlapping deployments gracefully
1. When overlapping deployments are discovered, annotate them
2. Expose those overlapping annotations as warnings in kubectl describe
3. Only respect the earliest updated one (skip syncing all other overlapping deployments)
4. Use indexer instead of store for deployment lister
2016-08-23 14:33:30 -07:00
Kubernetes Submit Queue f297ea966e Merge pull request #30838 from caesarxuchao/per-resource-orphan-behavior
Automatic merge from submit-queue

[GarbageCollector] Allow per-resource default garbage collection behavior

What's the bug:
When deleting an RC with `deleteOptions.OrphanDependents==nil`, garbage collector is supposed to treat it as `deleteOptions.OrphanDependents==true", and orphan the pods created by it. But the apiserver is not doing that.

What's in the pr:
Allow each resource to specify the default garbage collection behavior in the registry. For example, RC registry's default GC behavior is Orphan, and Pod registry's default GC behavior is CascadingDeletion.
2016-08-23 08:46:32 -07:00
Kubernetes Submit Queue 9484b2c0a0 Merge pull request #30890 from timothysc/etcd3_v3client
Automatic merge from submit-queue

Enable v3 Client as the default on UTs

Updates the default initialization to use clientv3 interface to etcd3, and fixes the UTs.  

This PR includes a cherry-pick of https://github.com/kubernetes/kubernetes/pull/30634 so we can validate the tests, so do not merge until that PR is complete.
2016-08-23 08:04:02 -07:00
Timothy St. Clair 49b7ebd791 Switch UT default settings to leverage etcd3.v3client 2016-08-22 22:17:55 -05:00
Matt Liggett c86b84ccc0 Add /eviction subresource.
This is for #12611.
2016-08-22 16:38:00 -07:00
Chao Xu 67b7c7290a Allow per-resource default garbage collection behavior 2016-08-22 11:37:04 -07:00
Kubernetes Submit Queue 5b5a4145da Merge pull request #30821 from ardnaxelarak/21076_change_isEmpty_to_Empty
Automatic merge from submit-queue

Rename IsEmpty to Empty

addresses #21076
2016-08-22 00:54:28 -07:00
Jordan Liggitt 6524fd0727
Add metadata.name fieldSelector support to csr API 2016-08-20 21:34:33 -04:00
Kubernetes Submit Queue b18b56d5b3 Merge pull request #30658 from hongchaodeng/r2
Automatic merge from submit-queue

Make labels, fields expose selectable requirements

What?
This is to change the labels/fields Selector interface and make them expose selectable requirements. We reuse labels.Requirement struct for label selector and add fields.Requirement for field selector.

Why?
In order to index labels/fields, we need them to tell us three things: index key (a field or a label), operator (greater, less, or equal), and value (string, int, etc.). By getting selectable requirements, we are able to pass them down and use them for indexing in storage layer.
2016-08-20 11:36:35 -07:00
Kubernetes Submit Queue e9947d9ad7 Merge pull request #30813 from bprashanth/kubectl_petset
Automatic merge from submit-queue

Basic scaler/reaper for petset

Currently scaling or upgrading a petset is more complicated than it should be. Would be nice if this made code freeze on friday. I'm planning on a follow up change with generation number and e2es post freeze.
2016-08-20 10:51:07 -07:00
Hongchao Deng 1871a22039 make labels, fields expose selectable requirements 2016-08-20 10:10:51 -07:00
Kubernetes Submit Queue 5caf74c517 Merge pull request #30529 from hongchaodeng/r1
Automatic merge from submit-queue

change all PredicateFunc to use SelectionPredicate

What?
- This PR changes all PredicateFunc in registry to return SelectionPredicate instead of Matcher interface.

Why?
- We want to pass SelectionPredicate to storage layer. Matcher interface did not expose enough information for indexing.
2016-08-20 00:24:40 -07:00
Kara Alexandra d12a66a422 Rename IsEmpty to Empty
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
2016-08-19 14:19:19 -07:00
bprashanth 05aa040b0f Allow changes to container image for updates 2016-08-18 16:33:51 -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
Clayton Coleman 12a5eeea17
Introduce GroupVersioner for capturing desired target version
Convert single GV and lists of GVs into an interface that can handle
more complex scenarios (everything internal, nothing supported). Pass
the interface down into conversion.
2016-08-18 14:45:00 -04:00
Kubernetes Submit Queue 4b5fd43e24 Merge pull request #30250 from krousey/kctl_dynamic
Automatic merge from submit-queue

Change kubectl create to use dynamic client

https://github.com/kubernetes/kubernetes/issues/16764 https://github.com/kubernetes/kubernetes/issues/3955

This is a series of changes to allow kubectl create to use discovery-based REST mapping and dynamic clients.

cc @kubernetes/sig-api-machinery

**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
kubectl will no longer do client-side defaulting on create and replace.
```
2016-08-17 14:48:56 -07:00
Kris d1aa3dd0b4 Fix thirdparty codec to return GVK 2016-08-15 22:07:54 -07:00
Hongchao Deng a607a69f4a pkg/storage: cleanup Codec() from interface 2016-08-15 20:46:13 -07:00
Hongchao Deng eb516fbc0a optimize field.Set{} -> nil 2016-08-15 11:41:25 -07:00
Hongchao Deng 75fe25e717 generic.Matcher -> *generic.SelectionPredicate 2016-08-13 21:52:11 -07:00
Hongchao Deng d4afb781c3 change all PredicateFunc to use SelectionPredicate 2016-08-13 10:11:35 -07:00
Kubernetes Submit Queue e39d7f71e6 Merge pull request #30251 from hongchaodeng/r2
Automatic merge from submit-queue

Move new etcd storage (low level storage) into cacher

In an effort for #29888, we are pushing forward this:

What?
- It changes creating etcd storage.Interface impl into creating config
- In creating cacher storage (StorageWithCacher), it passes config created above and new etcd storage inside.

Why?
- We want to expose the information of (etcd) kv client to cacher. Cacher storage uses this information to talk to remote storage.
2016-08-13 10:09:49 -07:00
Kubernetes Submit Queue df1abb40ec Merge pull request #30246 from liggitt/certificates
Automatic merge from submit-queue

Set user info in CertificateSigningRequest.Spec on create

Fixes #30239
2016-08-12 23:03:18 -07:00
Hongchao Deng d0938094d9 move new etcd storage into cacher 2016-08-12 18:40:20 -07:00
Kubernetes Submit Queue cc7d509e47 Merge pull request #30227 from soltysh/remove_seconds
Automatic merge from submit-queue

Remove seconds from scheduled jobs cron format

@erictune @janetkuo as promised this removes the seconds from the cron format

<!-- 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/30227)
<!-- Reviewable:end -->
2016-08-10 03:50:30 -07:00
Maciej Szulik 902ecd85fc Remove seconds from scheduled jobs cron format 2016-08-10 11:15:33 +02:00
Kubernetes Submit Queue 4d9762e7a0 Merge pull request #29722 from AdoHe/range_registry
Automatic merge from submit-queue

move RangeRegistry to a separate package for generic usage

Fix #29668, @smarterclayton @lavalamp ptal.

<!-- 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/29722)
<!-- Reviewable:end -->
2016-08-09 09:47:57 -07:00
Kubernetes Submit Queue 15ad9be67f Merge pull request #30249 from hongchaodeng/fix
Automatic merge from submit-queue

make reousrce prefix assignment consistent

Make reousrce prefix assignment consistent with other registries

<!-- 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/30249)
<!-- Reviewable:end -->
2016-08-09 03:40:29 -07:00
Wojciech Tyczynski 8a8cd06ea4 Configurable cache sizes of cachers 2016-08-09 09:41:48 +02:00
Hongchao Deng 5bf2efc581 make reousrce prefix consistent with other registries 2016-08-08 22:19:39 -07:00
AdoHe a6539f846a move RangeRegistry to a separate package for generic usage 2016-08-09 13:10:48 +08:00
Jordan Liggitt d756b29654
Set user info in CertificateSigningRequest.Spec on create 2016-08-08 23:33:41 -04:00
Jordan Liggitt 4db004972a
Plumb context to strategy methods 2016-08-08 22:33:25 -04:00
Kubernetes Submit Queue 148b74881b Merge pull request #30181 from mikedanese/csr-delete
Automatic merge from submit-queue

add delete strategy to certificates registry

So that CSRs can be deleted.

cc @gtank 

```console
$ kubectl delete certificatesigningrequest foo
error: error when deleting "foo": http: server closed connection
```
and on the apiserver:
```
E0806 00:11:53.791039       5 runtime.go:64] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:70
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:63
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:49
/usr/local/go/src/runtime/asm_amd64.s:472
/usr/local/go/src/runtime/panic.go:443
/usr/local/go/src/runtime/panic.go:62
/usr/local/go/src/runtime/sigpanic_unix.go:24
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/create.go:115
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/delete.go:50
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/registry/generic/registry/store.go:634
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:799
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:953
/usr/local/go/src/runtime/asm_amd64.s:1998
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0xa268ee]

goroutine 1161 [running]:
panic(0x2a00240, 0xc820014070)
        /usr/local/go/src/runtime/panic.go:481 +0x3e6
k8s.io/kubernetes/pkg/util/runtime.HandleCrash(0xc821ecbef8, 0x1, 0x1)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:56 +0x153
panic(0x2a00240, 0xc820014070)
        /usr/local/go/src/runtime/panic.go:443 +0x4e9
k8s.io/kubernetes/pkg/api/rest.objectMetaAndKind(0x0, 0x0, 0x7faf1332ee78, 0xc8220f0600, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/create.go:115 +0x1ee
k8s.io/kubernetes/pkg/api/rest.BeforeDelete(0x0, 0x0, 0x7faf13188338, 0xc821e218f0, 0x7faf1332ee78, 0xc8220f0600, 0xc821eb11c0, 0x0, 0x0, 0x0)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/delete.go:50 +0x94
k8s.io/kubernetes/pkg/registry/generic/registry.(*Store).Delete(0xc82013c9a0, 0x7faf13188338, 0xc821e218f0, 0xc821e0bdde, 0xa, 0xc821eb11c0, 0x0, 0x0, 0x0, 0x0)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/registry/generic/registry/store.go:634 +0x3b8
k8s.io/kubernetes/pkg/apiserver.DeleteResource.func1.1(0x0, 0x0, 0x0, 0x0)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:799 +0xa4
k8s.io/kubernetes/pkg/apiserver.finishRequest.func1(0xc821e081e0, 0xc821eb12c0, 0xc821e08000, 0xc821e0bf80)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:953 +0xd9
created by k8s.io/kubernetes/pkg/apiserver.finishRequest
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:958 +0xf1
```
2016-08-07 13:04:35 -07:00
Mike Danese d2ff93d19d add delete strategy to certificates registry
so that csrs can be deleted.
2016-08-05 17:34:03 -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
Kubernetes Submit Queue 5f9447a91a Merge pull request #20573 from deads2k/plumb-in-SAR
Automatic merge from submit-queue

add subjectaccessreviews resource

Adds a subjectaccessreviews endpoint that uses the API server's authorizer to determine if a subject is allowed to perform an action.

Part of kubernetes/features#37
2016-08-05 14:39:28 -07:00
Kubernetes Submit Queue f9cadb290b Merge pull request #22919 from liggitt/http-test-etcd
Automatic merge from submit-queue

Allow starting test etcd with http

There are cases where we'll want to start a test etcd without https (external tools monitoring tests, tests with lots of parallelism, etc). This makes it an option.

Helps with https://github.com/kubernetes/kubernetes/issues/23127

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/22919)
<!-- Reviewable:end -->
2016-08-05 12:06:12 -07:00
deads2k 32920b5617 add subjectaccessreviews resource 2016-08-05 11:20:56 -04:00
Davanum Srinivas e7a46a7c81 Fix Incorrect response model for pods/{name}/log
The swagger spec for pods/{name}/log does not include
"text/plain" as a possible content-type for the the response.
So we implement ProducesMIMETypes to make sure "text/plain"
gets added to the default list ot content-types.

the v1.json was generated by running:
hack/update-generated-swagger-docs.sh;./hack/update-swagger-spec.sh;

Fixes #14071
2016-08-05 08:54:14 -04:00
Kubernetes Submit Queue 996df923a1 Merge pull request #30020 from hongchaodeng/fix
Automatic merge from submit-queue

make reousrce prefix consistent with other registries

Storage class registry was added recently in #29694.
In other registries, resource prefix was changed to a more generic way using RESTOptions.ResourcePrefix.

This PR is an attempt to make both consistent.
2016-08-04 21:56:09 -07:00
Hongchao Deng fc47f08183 make reousrce prefix consistent with other registries 2016-08-03 13:31:56 -07:00
deads2k 60dd4a5d26 interesting changes to add tokenreviews endpoint to implement webhook 2016-08-03 08:37:45 -04:00
Kubernetes Submit Queue 1edf254efb Merge pull request #25458 from errm/env-var-style-config-keys
Automatic merge from submit-queue

Allow Secret & ConfigMap keys to contain caps, dots, and underscores

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

Re: #23722

This makes loosens the regex used in in Secrets and ConfigMap,
in order to make environment variable style keys valid
2016-08-02 21:00:52 -07:00
Lucas Käldström c88a07ce1a Run goimports 2016-08-02 15:12:39 +03:00
Ed Robinson d4969ff032
Allows Secret & ConfigMap Keys to look like Environment Variables
This makes environment variable style keys (uppercase with underscores) valid
in Secrets and ConfigMap.
2016-08-01 20:56:40 +01:00
Harry Zhang c495397cae Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
childsb f5bd7d471e API Changes for StorageClass 2016-07-28 19:01:01 -04:00
k8s-merge-robot 2817674715 Merge pull request #29557 from deads2k/make-prefx-configurable
Automatic merge from submit-queue

make the resource prefix in etcd configurable for cohabitation

This looks big, its not as bad as it seems.

When you have different resources cohabiting, the resource name used for the etcd directory needs to be configurable.  HPA in two different groups worked fine before.  Now we're looking at something like RC<->RS.  They normally store into two different etcd directories.  This code allows them to be configured to store into the same location.

To maintain consistency across all resources, I allowed the `StorageFactory` to indicate which `ResourcePrefix` should be used inside `RESTOptions` which already contains storage information.

@lavalamp affects cohabitation.
@smarterclayton @mfojtik prereq for our rc<->rs and d<->dc story.
2016-07-28 03:01:28 -07:00
deads2k aa3db4d995 make the resource prefix in etcd configurable for cohabitation 2016-07-27 07:51:40 -04:00
k8s-merge-robot b38271b6d5 Merge pull request #29518 from hongchaodeng/cleanup
Automatic merge from submit-queue

cleanup wrong naming: limitrange -> hpa

The code is in `horizontalpodautoscaler/strategy.go`, but the parameter is "limitrange". This is legacy copy-paste issue...
2016-07-25 11:43:36 -07:00
Hongchao Deng f431d4c209 rename: limitrange -> hpa 2016-07-23 22:10:58 -07:00
Klaus Ma 2ee0f69ebd Corrected comments of node.NewStorage 2016-07-23 19:44:55 +08:00
Wojciech Tyczynski 4d0d115690 Revert "add tokenreviews endpoint to implement webhook" 2016-07-21 09:40:35 +02:00
deads2k 2c4a9f2e8d interesting changes to add tokenreviews endpoint to implement webhook 2016-07-20 15:11:56 -04:00
k8s-merge-robot 1026eecc9d Merge pull request #26012 from sitepod/third-party-resource-list-json-fix
Automatic merge from submit-queue

include metadata in third party resource list serialization

Third party resource listing does not include important metadata such as resourceVersion and apiVersion. This commit includes the missing metadata and also replaces the string templating with an anonymous struct.
2016-07-19 04:00:34 -07:00
k8s-merge-robot be8abdabf8 Merge pull request #27157 from soltysh/scheduledjob_test_2
Automatic merge from submit-queue

Scheduledjob test cont.

This continuation of #25737.

@erictune @caesarxuchao ptal

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-19 02:52:19 -07:00
Maciej Szulik 647124bf5e ScheduledJob client and storage tests 2016-07-18 21:01:21 +02:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
Clayton Coleman c077bac341
Implement a RESTMappings method
With the introduction of batch/v1 and batch/v2alpha1, any
MultiRESTMapper that has per groupversion mappers (as a naive discovery
client would create) would end up being unable to call RESTMapping() on
batch.Jobs. As we finish up discovery we will need to be able to choose
prioritized RESTMappings based on the service discovery doc.

This change implements RESTMappings(groupversion) which returns all
possible RESTMappings for that kind.  That allows a higher level call to
prioritize the returned mappings by server or client preferred version.
2016-07-13 21:18:53 -04:00
Wojciech Tyczynski 1d9bc58328 Extend Filter interface with Trigger() and use it for pods and nodes 2016-07-13 08:45:18 +02:00
Wojciech Tyczynski 7f7ef0879f Change filter to interface in storage.Interface 2016-07-13 08:44:22 +02:00
k8s-merge-robot 6a4de0927c Merge pull request #28524 from hongchaodeng/listopt
Automatic merge from submit-queue

ListOptions: add test for ResourceVersion > 0 in List

ref: #28472 

Done:
- Add a test for ResourceVersion > 0 in registry (cache) store List()
- Fix the docs.
2016-07-12 03:41:39 -07:00
markturansky 3ddb8470b9 make PVCs immutable (except volumeName) post-creation 2016-07-11 11:50:16 -04:00
Jordan Liggitt d4d6a0ee4c
Allow starting test etcd with http 2016-07-10 22:28:01 -04:00
Hongchao Deng 2d30a967ea ListOptions: add test for ResourceVersion > 0 in List 2016-07-06 14:44:33 -07:00
Hongchao Deng 8582ebb4be allocator ETCD: remove unused Refresh() 2016-07-05 12:46:53 -07:00
Wojciech Tyczynski 3f288e365d Simplify registries initialization 2016-07-04 14:20:29 +02:00
gmarek 638f4e1192 Setting deletion timestamp bumps object's generation 2016-07-01 16:45:43 +02:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot 32eccd413f Merge pull request #25562 from gtank/certificates-api-v9
Automatic merge from submit-queue

TLS bootstrap API group (alpha)

This PR only covers the new types and related client/storage code- the vast majority of the line count is codegen. The implementation differs slightly from the current proposal document based on discussions in design thread (#20439). The controller logic and kubelet support mentioned in the proposal are forthcoming in separate requests.

I submit that #18762 ("Creating a new API group is really hard") is, if anything, understating it. I've tried to structure the commits to illustrate the process.

@mikedanese @erictune @smarterclayton @deads2k

```release-note-experimental
An alpha implementation of the the TLS bootstrap API described in docs/proposals/kubelet-tls-bootstrap.md.
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-28 13:25:22 -07:00
k8s-merge-robot d689a1f58b Merge pull request #27122 from lukaszo/uxlogs
Automatic merge from submit-queue

Include init containers in error messages
2016-06-27 23:14:36 -07:00
George Tankersley 2802f55c18 pkg/registry: add certificate storage 2016-06-27 14:29:16 -07:00
Matt Freeman 8eef335dec implement code review changes and add basic test 2016-06-27 08:27:04 +00:00
k8s-merge-robot 00b5b548d6 Merge pull request #26854 from xiang90/cacher
Automatic merge from submit-queue

cacher.go: remove NewCacher func

NewCacher is a wrapper of NewCacherFromConfig. NewCacher understands
how to create a key func from scopeStrategy. However, it is not the
responsibility of cacher. So we should remove this function, and
construct the config in its caller, which should understand scopeStrategy.
2016-06-25 11:10:06 -07:00
Matt Freeman 742447f8ce include metadata in third party res list output 2016-06-22 02:30:57 +00:00
Matt Freeman 3758df1681 handle watch event serialization for third party resources 2016-06-21 07:30:08 +00:00
k8s-merge-robot ba771e7135 Merge pull request #27192 from smarterclayton/signature_change
Automatic merge from submit-queue

Remove EncodeToStream(..., []unversioned.GroupVersion)

Was not being used. Is a signature change and is necessary for post 1.3 work on Templates and other objects that nest objects.

Extracted from #26044
2016-06-19 16:13:07 -07:00
k8s-merge-robot 6b9400d789 Merge pull request #26388 from caseydavenport/cd-networkpolicy-uts
Automatic merge from submit-queue

NetworkPolicy unit tests

- [x] Validation tests
- [x] storage tests
- [x] strategy tests
- [ ] test-cmd.sh

CC @thockin
2016-06-18 00:30:00 -07:00
Łukasz Oleś 038bb130b8 Include init containers in error messages
fixes: #27040
2016-06-13 12:20:20 +02:00
Clayton Coleman 36a5ffbe2f
Remove EncodeToStream(..., []unversioned.GroupVersion)
Was not being used.
2016-06-10 18:43:12 -04:00
Janet Kuo c160f75157 Fix deployment strategy validation 2016-06-10 11:14:32 -07:00
Casey Davenport 9f2c3a677b Validation, etcd, strategy UTs for NetworkPolicy 2016-06-09 15:16:31 -07:00
Xiang Li e2aab093aa cacher.go: remove NewCacher func
NewCacher is a wrapper of NewCacherFromConfig. NewCacher understands
how to create a key func from scopeStrategy. However, it is not the
responsibility of cacher. So we should remove this function, and
construct the config in its caller, which should understand scopeStrategy.
2016-06-04 22:46:58 -07:00
k8s-merge-robot 421c16addd Merge pull request #25894 from brendandburns/thirdparty-watch
Automatic merge from submit-queue

Fix third party

Fixes https://github.com/kubernetes/kubernetes/issues/25421
Fixes https://github.com/kubernetes/kubernetes/issues/25422

@AdoHe @sjenning @caesarxuchao @lavalamp 

@kubernetes/sig-api-machinery 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-04 15:42:41 -07:00
k8s-merge-robot 525140a278 Merge pull request #26693 from AdoHe/init_containers
Automatic merge from submit-queue

exec support init containers

Partially fixes #25818 
@smarterclayton ptal.
2016-06-03 10:13:49 -07:00
k8s-merge-robot dbaf18026f Merge pull request #26529 from gitfred/deep-copy-svc
Automatic merge from submit-queue

DeepCopy Service instead of shallow copy #2049 

fixes #2049
2016-06-03 00:18:19 -07:00
AdoHe 1cfcb24f37 exec support init container 2016-06-03 02:05:15 -04:00
k8s-merge-robot 0e9d809171 Merge pull request #26462 from mikedanese/fix-build-2
Automatic merge from submit-queue

fix go install ./pkg/...


appearantly this package is not imported
2016-06-02 20:51:41 -07:00
Brendan Burns 328a8392b1 Fix third party 2016-06-02 10:24:14 -07:00
Maciej Szulik d8b9495ea0 Change suspend to be pointer for ScheduledJob and modify validation to forbid setting job selectors 2016-05-30 15:43:23 +02:00
Sylwester Brzeczkowski af0f053cdf #2049 DeepCopy Service instead of shallow copy 2016-05-30 14:54:45 +02:00
k8s-merge-robot e543bd6452 Merge pull request #26007 from smarterclayton/watch_opt
Automatic merge from submit-queue

Additional optimizations to the encode/decode paths

Builds on top of #25983 with a number of other optimizations.
2016-05-28 06:27:00 -07:00
k8s-merge-robot dd6d616190 Merge pull request #26381 from caesarxuchao/subresource-patch
Automatic merge from submit-queue

Expose GET and PATCH for status subresource

We can do this for other status subresource. I only updated node/status in this PR to unblock https://github.com/kubernetes/node-problem-detector/issues/9.

cc @Random-Liu @lavalamp
2016-05-27 18:53:33 -07:00
Mike Danese d6852c1d0f fix go install ./pkg/...
appearantly this package is not imported
2016-05-27 15:54:50 -07:00
k8s-merge-robot 35922bdcbd Merge pull request #26378 from pwittrock/fix-26138
Automatic merge from submit-queue

Retry concurrency exceptions in e2e/kubectl.go.  Fixes #26138





[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-27 02:21:21 -07:00
Phillip Wittrock feaa3aba82 Retry concurrency exceptions in e2e/kubectl.go. Fixes #26138 2016-05-26 14:44:51 -07:00
Chao Xu 5a9e5be4c6 expose GET and PATCH for status subresource 2016-05-26 14:33:54 -07:00
Alex Mohr edda837142 Merge pull request #25599 from caesarxuchao/orphaning-finalizer
Add orphaning finalizer logic to GC
2016-05-26 13:19:19 -07:00
Eric Chiang 6f312f145d pkg/registry: add rbac storage 2016-05-25 14:19:55 -07:00
Chao Xu 1665546d2d add finalizer logics to the API server and the garbage collector; handling DeleteOptions.OrphanDependents in the API server 2016-05-24 13:07:28 -07:00
Jordan Liggitt 29252acd1a Change rest storage Update interface to retrieve updated object
Add OldObject to admission attributes

Update resthandler Patch/Update admission plumbing
2016-05-23 21:09:26 -04:00
Clayton Coleman c6961d6fd6
Remove runtime.Typer, reduce to ObjectKinds(1) (3)
Remove the unnecessary variants, which avoids allocations in several
core paths.
2016-05-21 23:55:42 -04:00
Maciej Szulik db08dedf5e ScheduledJob storage 2016-05-21 23:23:29 +02:00
Casey Davenport 47248f3698 v1beta1 NetworkPolicy API definition and client support 2016-05-19 19:02:54 -07:00
Tim Hockin 152c86ab06 Make name validators return string slices 2016-05-18 00:48:01 -07:00
k8s-merge-robot 272674b2a6 Merge pull request #25007 from liggitt/third-party-resource-validation
Automatic merge from submit-queue

validate third party resources

addresses validation portion of https://github.com/kubernetes/kubernetes/issues/22768

* ThirdPartyResource: validates name (3 segment DNS subdomain) and version names (single segment DNS label)
* ThirdPartyResourceData: validates objectmeta (name is validated as a DNS label)
* removes ability to use GenerateName with thirdpartyresources (kind and api group should not be randomized, in my opinion)

test improvements:
* updates resttest to clean up after create tests (so the same valid object can be used)
* updates resttest to take a name generator (in case "foo1" isn't a valid name for the object under test)

action required for alpha thirdpartyresource users:
* existing thirdpartyresource objects that do not match these validation rules will need to be removed/updated (after removing thirdpartyresourcedata objects stored under the disallowed versions, kind, or group names)
* existing thirdpartyresourcedata objects that do not match the name validation rule will not be able to be updated, but can be removed
2016-05-15 03:38:29 -07:00
Matt Liggett f5e8d41431 Finish implementing policy API.
Registry implementation and addition to the master.
2016-05-13 17:27:58 -07:00
Clayton Coleman 51b624103f
Change ConvertToVersion to use GroupVersion
Long delayed refactor, avoids a few more allocations.
2016-05-12 10:10:35 -04:00
k8s-merge-robot 132ebb091a Merge pull request #24459 from fgrzadkowski/unschedulable_pod
Automatic merge from submit-queue

Add pod condition PodScheduled to detect situation when scheduler tried to schedule a Pod, but failed

Set `PodSchedule` condition to `ConditionFalse` in `scheduleOne()` if scheduling failed and to `ConditionTrue` in `/bind` subresource.

Ref #24404

@mml (as it seems to be related to "why pending" effort)

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24459)
<!-- Reviewable:end -->
2016-05-12 05:54:06 -07:00
Filip Grzadkowski a80b1798c4 Add pod condition PodScheduled to detect situation
when scheduler tried to schedule a Pod, but failed.

Ref #24404
2016-05-12 10:21:21 +02:00
Paul Weil 56193b7140 PSP types 2016-05-11 18:07:35 -04:00
Jordan Liggitt 6c323a4f72 Remove name generation from thirdpartyresource 2016-05-09 09:27:54 -04:00
Piotr Szczesniak 212b459817 Move internal types of hpa from pkg/apis/extensions to pkg/apis/autoscaling 2016-05-09 09:18:13 +02:00
k8s-merge-robot 3ee833ca3b Merge pull request #25006 from liggitt/third-party-root-scope
Automatic merge from submit-queue

Make ThirdPartyResource a root scoped object

ThirdPartyResource (the registration of a third party type) belongs at the cluster scope. It results in resource handlers installed in every namespace, and the same name in two namespaces collides (namespace is ignored when determining group/kind).

ThirdPartyResourceData (an actual instance of that type) is still namespace-scoped.

This PR moves ThirdPartyResource to be a root scope object. Someone previously using ThirdPartyResource definitions in alpha should be able to move them from namespace to root scope like this:

setup (run on 1.2):
```
kubectl create ns ns1

echo '{"kind":"ThirdPartyResource","apiVersion":"extensions/v1beta1","metadata":{"name":"foo.example.com"},"versions":[{"name":"v8"}]}' | kubectl create -f - --namespace=ns1

echo '{"kind":"Foo","apiVersion":"example.com/v8","metadata":{"name":"MyFoo"},"testkey":"testvalue"}' | kubectl create -f - --namespace=ns1
```

export:
```
kubectl get thirdpartyresource --all-namespaces -o yaml > tprs.yaml
```

remove namespaced kind registrations (this shouldn't remove the data of that type, which is another possible issue):
```
kubectl delete -f tprs.yaml
```

... upgrade ...

re-register the custom types at the root scope:
```
kubectl create -f tprs.yaml
```

Additionally, pre-1.3 clients that expect to read/write ThirdPartyResource at a namespace scope will not be compatible with 1.3+ servers, and 1.3+ clients that expect to read/write ThirdPartyResource at a root scope will not be compatible with pre-1.3 servers.
2016-05-06 20:50:35 -07:00
Clayton Coleman e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
k8s-merge-robot f5e1e9a227 Merge pull request #24912 from bprashanth/petset_controller
Automatic merge from submit-queue

Petset controller

Took longer than I expected. Main parts of this pr are:
1. Identity generation based on petset spec (volumes are mapped per discussion in #18016)
2. Ensure that we create/delete pets in sequence
3. Ensuring that we create, wait for healthy, create; or delete, wait for terminationGrace, delete
4. Controller that watches apiserver and drives actual -> desired

PVCs are not deleted, yet.
2016-05-05 08:58:23 -07:00
k8s-merge-robot 3faf214506 Merge pull request #24924 from mqliang/pv-prepare-update
Automatic merge from submit-queue

fix PrepareForUpdate bug for PV and PVC
2016-05-05 01:46:21 -07:00
Prashanth Balasubramanian 6bc3052551 PetSet alpha controller 2016-05-04 18:39:17 -07:00
mqliang 0109c08b9b fix PrepareForUpdate bug for HPA 2016-05-05 09:39:03 +08:00
Jordan Liggitt e41d504739 Move ThirdPartyResource to root scoped object 2016-04-30 01:06:07 -04:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Jordan Liggitt 1e5815872e Validate deletion timestamp doesn't change on update 2016-04-28 11:50:48 -04:00
mqliang 3bcd5b1648 fix PrepareForUpdate bug for PV and PVC 2016-04-28 19:13:02 +08:00
k8s-merge-robot d0b887e4e0 Merge pull request #24595 from zhouhaibing089/httpserverclose
Automatic merge from submit-queue

Uncomment the code that caused by #19254

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

@lavalamp
2016-04-28 01:41:16 -07:00
k8s-merge-robot 28bc4b32c2 Merge pull request #24532 from rsc/master
Automatic merge from submit-queue

apiserver latency reductions

Combined effect of these two commits on the latency observed by the 1000-node kubemark benchmark:

```
name                               old ms/op  new ms/op   delta
LIST_nodes_p50                      127 ±16%    121 ± 9%   -4.58%  (p=0.000 n=29+27)
LIST_nodes_p90                      326 ±12%    266 ±12%  -18.48%  (p=0.000 n=29+27)
LIST_nodes_p99                      453 ±11%    400 ±14%  -11.79%  (p=0.000 n=29+28)
LIST_replicationcontrollers_p50    29.4 ±49%   26.2 ±54%     ~     (p=0.085 n=30+29)
LIST_replicationcontrollers_p90    83.0 ±78%   68.6 ±59%  -17.33%  (p=0.013 n=30+28)
LIST_replicationcontrollers_p99     216 ±43%    177 ±49%  -17.68%  (p=0.000 n=29+29)
DELETE_pods_p50                    24.5 ±14%   24.3 ±13%     ~     (p=0.562 n=30+29)
DELETE_pods_p90                    30.7 ± 1%   30.7 ± 1%   -0.30%  (p=0.011 n=29+29)
DELETE_pods_p99                    77.2 ±34%   54.2 ±23%  -29.76%  (p=0.000 n=30+27)
PUT_replicationcontrollers_p50     5.86 ±26%   5.94 ±32%     ~     (p=0.734 n=29+29)
PUT_replicationcontrollers_p90     15.8 ± 7%   15.5 ± 6%   -2.06%  (p=0.010 n=29+29)
PUT_replicationcontrollers_p99     57.8 ±35%   39.5 ±55%  -31.60%  (p=0.000 n=29+29)
PUT_nodes_p50                      14.9 ± 2%   14.8 ± 2%   -0.68%  (p=0.012 n=30+27)
PUT_nodes_p90                      16.5 ± 1%   16.3 ± 2%   -0.90%  (p=0.000 n=27+28)
PUT_nodes_p99                      57.9 ±47%   41.3 ±35%  -28.61%  (p=0.000 n=30+28)
POST_replicationcontrollers_p50    6.35 ±29%   6.34 ±20%     ~     (p=0.944 n=30+28)
POST_replicationcontrollers_p90    15.4 ± 5%   15.0 ± 5%   -2.18%  (p=0.001 n=29+29)
POST_replicationcontrollers_p99    52.2 ±71%   32.9 ±46%  -36.99%  (p=0.000 n=29+27)
POST_pods_p50                      8.99 ±13%   8.95 ±16%     ~     (p=0.903 n=30+29)
POST_pods_p90                      16.2 ± 4%   16.1 ± 4%     ~     (p=0.287 n=29+29)
POST_pods_p99                      30.9 ±21%   26.4 ±12%  -14.73%  (p=0.000 n=28+28)
POST_bindings_p50                  9.34 ±12%   8.92 ±15%   -4.54%  (p=0.013 n=30+28)
POST_bindings_p90                  16.6 ± 1%   16.5 ± 3%   -0.73%  (p=0.017 n=28+29)
POST_bindings_p99                  23.5 ± 9%   21.1 ± 4%  -10.09%  (p=0.000 n=27+28)
PUT_pods_p50                       10.8 ±11%   10.2 ± 5%   -5.47%  (p=0.000 n=30+27)
PUT_pods_p90                       16.1 ± 1%   16.0 ± 1%   -0.64%  (p=0.000 n=29+28)
PUT_pods_p99                       23.4 ± 9%   20.9 ± 9%  -10.93%  (p=0.000 n=28+27)
DELETE_replicationcontrollers_p50  2.42 ±16%   2.50 ±13%     ~     (p=0.054 n=29+28)
DELETE_replicationcontrollers_p90  11.5 ±12%   11.8 ±13%     ~     (p=0.141 n=30+28)
DELETE_replicationcontrollers_p99  19.5 ±21%   19.1 ±21%     ~     (p=0.397 n=29+29)
GET_nodes_p50                      0.77 ±10%   0.76 ±10%     ~     (p=0.317 n=28+28)
GET_nodes_p90                      1.20 ±16%   1.14 ±24%   -4.66%  (p=0.036 n=28+29)
GET_nodes_p99                      11.4 ±48%    7.5 ±46%  -34.28%  (p=0.000 n=28+29)
GET_replicationcontrollers_p50     0.74 ±17%   0.73 ±17%     ~     (p=0.222 n=30+28)
GET_replicationcontrollers_p90     1.04 ±25%   1.01 ±27%     ~     (p=0.231 n=30+29)
GET_replicationcontrollers_p99     12.1 ±81%  10.0 ±145%     ~     (p=0.063 n=28+29)
GET_pods_p50                       0.78 ±12%   0.77 ±10%     ~     (p=0.178 n=30+28)
GET_pods_p90                       1.06 ±19%   1.02 ±19%     ~     (p=0.120 n=29+28)
GET_pods_p99                       3.92 ±43%   2.45 ±38%  -37.55%  (p=0.000 n=27+25)
LIST_services_p50                  0.20 ±13%   0.20 ±16%     ~     (p=0.854 n=28+29)
LIST_services_p90                  0.28 ±15%   0.27 ±14%     ~     (p=0.219 n=29+28)
LIST_services_p99                  0.49 ±20%   0.47 ±24%     ~     (p=0.140 n=29+29)
LIST_endpoints_p50                 0.19 ±14%   0.19 ±15%     ~     (p=0.709 n=29+29)
LIST_endpoints_p90                 0.26 ±16%   0.26 ±13%     ~     (p=0.274 n=29+28)
LIST_endpoints_p99                 0.46 ±24%   0.44 ±21%     ~     (p=0.111 n=29+29)
LIST_horizontalpodautoscalers_p50  0.16 ±15%   0.15 ±13%     ~     (p=0.253 n=30+27)
LIST_horizontalpodautoscalers_p90  0.22 ±24%   0.21 ±16%     ~     (p=0.152 n=30+28)
LIST_horizontalpodautoscalers_p99  0.31 ±33%   0.31 ±38%     ~     (p=0.817 n=28+29)
LIST_daemonsets_p50                0.16 ±20%   0.15 ±11%     ~     (p=0.135 n=30+27)
LIST_daemonsets_p90                0.22 ±18%   0.21 ±25%     ~     (p=0.135 n=29+28)
LIST_daemonsets_p99                0.29 ±28%   0.29 ±32%     ~     (p=0.606 n=28+28)
LIST_jobs_p50                      0.16 ±16%   0.15 ±12%     ~     (p=0.375 n=29+28)
LIST_jobs_p90                      0.22 ±18%   0.21 ±16%     ~     (p=0.090 n=29+26)
LIST_jobs_p99                      0.31 ±28%   0.28 ±35%  -10.29%  (p=0.005 n=29+27)
LIST_deployments_p50               0.15 ±16%   0.15 ±13%     ~     (p=0.565 n=29+28)
LIST_deployments_p90               0.22 ±22%   0.21 ±19%     ~     (p=0.107 n=30+28)
LIST_deployments_p99               0.31 ±27%   0.29 ±34%     ~     (p=0.068 n=29+28)
LIST_namespaces_p50                0.21 ±25%   0.21 ±26%     ~     (p=0.768 n=29+27)
LIST_namespaces_p90                0.28 ±29%   0.26 ±25%     ~     (p=0.101 n=30+28)
LIST_namespaces_p99                0.30 ±48%   0.29 ±42%     ~     (p=0.339 n=30+29)
LIST_replicasets_p50               0.15 ±18%   0.15 ±16%     ~     (p=0.612 n=30+28)
LIST_replicasets_p90               0.22 ±19%   0.21 ±18%   -5.13%  (p=0.011 n=28+27)
LIST_replicasets_p99               0.31 ±39%   0.28 ±29%     ~     (p=0.066 n=29+28)
LIST_persistentvolumes_p50         0.16 ±23%   0.15 ±21%     ~     (p=0.124 n=30+29)
LIST_persistentvolumes_p90         0.21 ±23%   0.20 ±23%     ~     (p=0.092 n=30+25)
LIST_persistentvolumes_p99         0.21 ±24%   0.20 ±23%     ~     (p=0.053 n=30+25)
LIST_resourcequotas_p50            0.16 ±12%   0.16 ±13%     ~     (p=0.175 n=27+28)
LIST_resourcequotas_p90            0.20 ±22%   0.20 ±24%     ~     (p=0.388 n=30+28)
LIST_resourcequotas_p99            0.22 ±24%   0.22 ±23%     ~     (p=0.575 n=30+28)
LIST_persistentvolumeclaims_p50    0.15 ±21%   0.15 ±29%     ~     (p=0.079 n=30+28)
LIST_persistentvolumeclaims_p90    0.19 ±26%   0.18 ±34%     ~     (p=0.446 n=29+29)
LIST_persistentvolumeclaims_p99    0.19 ±26%   0.18 ±34%     ~     (p=0.446 n=29+29)
LIST_pods_p50                      68.0 ±16%   56.3 ± 9%  -17.19%  (p=0.000 n=29+28)
LIST_pods_p90                       119 ±19%     93 ± 8%  -21.88%  (p=0.000 n=28+28)
LIST_pods_p99                       230 ±18%    202 ±14%  -12.13%  (p=0.000 n=27+28)
```
2016-04-27 08:32:18 -07:00
Timothy St. Clair 24b4286960 In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
k8s-merge-robot 293b0d0815 Merge pull request #23493 from soltysh/move_job_internals
Automatic merge from submit-queue

Move internal types of job from pkg/apis/extensions to pkg/apis/batch

This addressed the job part of #23216, this is still WIP. Will notify once finished. I'd like to have it in before starting working on ScheduledJob. 

@lavalamp @erictune fyi
2016-04-25 20:58:49 -07:00
zhouhaibing089 bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
Maciej Szulik a3b4447305 Move internal types of job from pkg/apis/extensions to pkg/apis/batch 2016-04-25 11:03:54 +02:00
Clayton Coleman 3111985564 Handle streaming serializers more consistently
Add tests to watch behavior in both protocols (http and websocket)
against all 3 media types. Adopt the
`application/vnd.kubernetes.protobuf;stream=watch` media type for the
content that comes back from a watch call so that it can be
distinguished from a Status result.
2016-04-22 11:07:24 -04:00
Russ Cox 58629a28e4 pkg/registry/pod: avoid allocation in common pod search
PodToSelectableFields creates a map of field attributes
for a particular pod filter query to use. If the result
of the query does not depend on the fields at all, avoid
creating the map.

This is the source of about half the allocated memory
(by byte volume) during the kubemark benchmark, and it
is in turn the main driver of CPU usage during the benchmark,
because of the many background pod watches going on,
as well as the occasional list pods.

These benchmarks for 1000-node kubemark show the difference
from my previous CL (caching timers) to this CL:

name                               old ms/op   new ms/op   delta
LIST_nodes_p50                       124 ±13%    121 ± 9%     ~     (p=0.136 n=29+27)
LIST_nodes_p90                       278 ±15%    266 ±12%   -4.26%  (p=0.031 n=29+27)
LIST_nodes_p99                       405 ±19%    400 ±14%     ~     (p=0.864 n=28+28)
LIST_pods_p50                       65.3 ±13%   56.3 ± 9%  -13.75%  (p=0.000 n=29+28)
LIST_pods_p90                        115 ±12%     93 ± 8%  -18.75%  (p=0.000 n=27+28)
LIST_pods_p99                        226 ±21%    202 ±14%  -10.52%  (p=0.000 n=28+28)
LIST_replicationcontrollers_p50     26.6 ±43%   26.2 ±54%     ~     (p=0.487 n=29+29)
LIST_replicationcontrollers_p90     68.7 ±63%   68.6 ±59%     ~     (p=0.931 n=29+28)
LIST_replicationcontrollers_p99      173 ±41%    177 ±49%     ~     (p=0.618 n=28+29)
PUT_replicationcontrollers_p50      5.83 ±36%   5.94 ±32%     ~     (p=0.818 n=28+29)
PUT_replicationcontrollers_p90      15.9 ± 6%   15.5 ± 6%   -2.23%  (p=0.019 n=28+29)
PUT_replicationcontrollers_p99      56.7 ±41%   39.5 ±55%  -30.29%  (p=0.000 n=28+29)
DELETE_pods_p50                     24.3 ±17%   24.3 ±13%     ~     (p=0.855 n=28+29)
DELETE_pods_p90                     30.6 ± 0%   30.7 ± 1%     ~     (p=0.140 n=28+29)
DELETE_pods_p99                     56.3 ±27%   54.2 ±23%     ~     (p=0.188 n=28+27)
PUT_nodes_p50                       14.9 ± 1%   14.8 ± 2%     ~     (p=0.781 n=28+27)
PUT_nodes_p90                       16.4 ± 2%   16.3 ± 2%     ~     (p=0.321 n=28+28)
PUT_nodes_p99                       44.6 ±42%   41.3 ±35%     ~     (p=0.361 n=29+28)
POST_replicationcontrollers_p50     6.33 ±23%   6.34 ±20%     ~     (p=0.993 n=28+28)
POST_replicationcontrollers_p90     15.2 ± 6%   15.0 ± 5%     ~     (p=0.106 n=28+29)
POST_replicationcontrollers_p99     53.4 ±52%   32.9 ±46%  -38.41%  (p=0.000 n=27+27)
POST_pods_p50                       9.33 ±13%   8.95 ±16%     ~     (p=0.069 n=29+29)
POST_pods_p90                       16.3 ± 4%   16.1 ± 4%   -1.43%  (p=0.044 n=29+29)
POST_pods_p99                       28.4 ±23%   26.4 ±12%   -7.05%  (p=0.004 n=29+28)
DELETE_replicationcontrollers_p50   2.50 ±13%   2.50 ±13%     ~     (p=0.649 n=29+28)
DELETE_replicationcontrollers_p90   11.7 ±10%   11.8 ±13%     ~     (p=0.863 n=28+28)
DELETE_replicationcontrollers_p99   19.0 ±22%   19.1 ±21%     ~     (p=0.818 n=28+29)
PUT_pods_p50                        10.3 ± 5%   10.2 ± 5%     ~     (p=0.235 n=28+27)
PUT_pods_p90                        16.0 ± 1%   16.0 ± 1%     ~     (p=0.380 n=29+28)
PUT_pods_p99                        21.6 ±14%   20.9 ± 9%   -3.15%  (p=0.010 n=28+27)
POST_bindings_p50                   8.98 ±17%   8.92 ±15%     ~     (p=0.666 n=29+28)
POST_bindings_p90                   16.5 ± 2%   16.5 ± 3%     ~     (p=0.840 n=26+29)
POST_bindings_p99                   21.4 ± 5%   21.1 ± 4%   -1.21%  (p=0.049 n=27+28)
GET_nodes_p90                       1.18 ±19%   1.14 ±24%     ~     (p=0.137 n=29+29)
GET_nodes_p99                       8.29 ±40%   7.50 ±46%     ~     (p=0.106 n=28+29)
GET_replicationcontrollers_p90      1.03 ±21%   1.01 ±27%     ~     (p=0.489 n=29+29)
GET_replicationcontrollers_p99     10.0 ±123%  10.0 ±145%     ~     (p=0.794 n=28+29)
GET_pods_p90                        1.08 ±21%   1.02 ±19%     ~     (p=0.083 n=29+28)
GET_pods_p99                        2.81 ±39%   2.45 ±38%  -12.78%  (p=0.021 n=28+25)

Overall the two CLs combined have this effect:

name                               old ms/op  new ms/op   delta
LIST_nodes_p50                      127 ±16%    121 ± 9%   -4.58%  (p=0.000 n=29+27)
LIST_nodes_p90                      326 ±12%    266 ±12%  -18.48%  (p=0.000 n=29+27)
LIST_nodes_p99                      453 ±11%    400 ±14%  -11.79%  (p=0.000 n=29+28)
LIST_replicationcontrollers_p50    29.4 ±49%   26.2 ±54%     ~     (p=0.085 n=30+29)
LIST_replicationcontrollers_p90    83.0 ±78%   68.6 ±59%  -17.33%  (p=0.013 n=30+28)
LIST_replicationcontrollers_p99     216 ±43%    177 ±49%  -17.68%  (p=0.000 n=29+29)
DELETE_pods_p50                    24.5 ±14%   24.3 ±13%     ~     (p=0.562 n=30+29)
DELETE_pods_p90                    30.7 ± 1%   30.7 ± 1%   -0.30%  (p=0.011 n=29+29)
DELETE_pods_p99                    77.2 ±34%   54.2 ±23%  -29.76%  (p=0.000 n=30+27)
PUT_replicationcontrollers_p50     5.86 ±26%   5.94 ±32%     ~     (p=0.734 n=29+29)
PUT_replicationcontrollers_p90     15.8 ± 7%   15.5 ± 6%   -2.06%  (p=0.010 n=29+29)
PUT_replicationcontrollers_p99     57.8 ±35%   39.5 ±55%  -31.60%  (p=0.000 n=29+29)
PUT_nodes_p50                      14.9 ± 2%   14.8 ± 2%   -0.68%  (p=0.012 n=30+27)
PUT_nodes_p90                      16.5 ± 1%   16.3 ± 2%   -0.90%  (p=0.000 n=27+28)
PUT_nodes_p99                      57.9 ±47%   41.3 ±35%  -28.61%  (p=0.000 n=30+28)
POST_replicationcontrollers_p50    6.35 ±29%   6.34 ±20%     ~     (p=0.944 n=30+28)
POST_replicationcontrollers_p90    15.4 ± 5%   15.0 ± 5%   -2.18%  (p=0.001 n=29+29)
POST_replicationcontrollers_p99    52.2 ±71%   32.9 ±46%  -36.99%  (p=0.000 n=29+27)
POST_pods_p50                      8.99 ±13%   8.95 ±16%     ~     (p=0.903 n=30+29)
POST_pods_p90                      16.2 ± 4%   16.1 ± 4%     ~     (p=0.287 n=29+29)
POST_pods_p99                      30.9 ±21%   26.4 ±12%  -14.73%  (p=0.000 n=28+28)
POST_bindings_p50                  9.34 ±12%   8.92 ±15%   -4.54%  (p=0.013 n=30+28)
POST_bindings_p90                  16.6 ± 1%   16.5 ± 3%   -0.73%  (p=0.017 n=28+29)
POST_bindings_p99                  23.5 ± 9%   21.1 ± 4%  -10.09%  (p=0.000 n=27+28)
PUT_pods_p50                       10.8 ±11%   10.2 ± 5%   -5.47%  (p=0.000 n=30+27)
PUT_pods_p90                       16.1 ± 1%   16.0 ± 1%   -0.64%  (p=0.000 n=29+28)
PUT_pods_p99                       23.4 ± 9%   20.9 ± 9%  -10.93%  (p=0.000 n=28+27)
DELETE_replicationcontrollers_p50  2.42 ±16%   2.50 ±13%     ~     (p=0.054 n=29+28)
DELETE_replicationcontrollers_p90  11.5 ±12%   11.8 ±13%     ~     (p=0.141 n=30+28)
DELETE_replicationcontrollers_p99  19.5 ±21%   19.1 ±21%     ~     (p=0.397 n=29+29)
GET_nodes_p50                      0.77 ±10%   0.76 ±10%     ~     (p=0.317 n=28+28)
GET_nodes_p90                      1.20 ±16%   1.14 ±24%   -4.66%  (p=0.036 n=28+29)
GET_nodes_p99                      11.4 ±48%    7.5 ±46%  -34.28%  (p=0.000 n=28+29)
GET_replicationcontrollers_p50     0.74 ±17%   0.73 ±17%     ~     (p=0.222 n=30+28)
GET_replicationcontrollers_p90     1.04 ±25%   1.01 ±27%     ~     (p=0.231 n=30+29)
GET_replicationcontrollers_p99     12.1 ±81%  10.0 ±145%     ~     (p=0.063 n=28+29)
GET_pods_p50                       0.78 ±12%   0.77 ±10%     ~     (p=0.178 n=30+28)
GET_pods_p90                       1.06 ±19%   1.02 ±19%     ~     (p=0.120 n=29+28)
GET_pods_p99                       3.92 ±43%   2.45 ±38%  -37.55%  (p=0.000 n=27+25)
LIST_services_p50                  0.20 ±13%   0.20 ±16%     ~     (p=0.854 n=28+29)
LIST_services_p90                  0.28 ±15%   0.27 ±14%     ~     (p=0.219 n=29+28)
LIST_services_p99                  0.49 ±20%   0.47 ±24%     ~     (p=0.140 n=29+29)
LIST_endpoints_p50                 0.19 ±14%   0.19 ±15%     ~     (p=0.709 n=29+29)
LIST_endpoints_p90                 0.26 ±16%   0.26 ±13%     ~     (p=0.274 n=29+28)
LIST_endpoints_p99                 0.46 ±24%   0.44 ±21%     ~     (p=0.111 n=29+29)
LIST_horizontalpodautoscalers_p50  0.16 ±15%   0.15 ±13%     ~     (p=0.253 n=30+27)
LIST_horizontalpodautoscalers_p90  0.22 ±24%   0.21 ±16%     ~     (p=0.152 n=30+28)
LIST_horizontalpodautoscalers_p99  0.31 ±33%   0.31 ±38%     ~     (p=0.817 n=28+29)
LIST_daemonsets_p50                0.16 ±20%   0.15 ±11%     ~     (p=0.135 n=30+27)
LIST_daemonsets_p90                0.22 ±18%   0.21 ±25%     ~     (p=0.135 n=29+28)
LIST_daemonsets_p99                0.29 ±28%   0.29 ±32%     ~     (p=0.606 n=28+28)
LIST_jobs_p50                      0.16 ±16%   0.15 ±12%     ~     (p=0.375 n=29+28)
LIST_jobs_p90                      0.22 ±18%   0.21 ±16%     ~     (p=0.090 n=29+26)
LIST_jobs_p99                      0.31 ±28%   0.28 ±35%  -10.29%  (p=0.005 n=29+27)
LIST_deployments_p50               0.15 ±16%   0.15 ±13%     ~     (p=0.565 n=29+28)
LIST_deployments_p90               0.22 ±22%   0.21 ±19%     ~     (p=0.107 n=30+28)
LIST_deployments_p99               0.31 ±27%   0.29 ±34%     ~     (p=0.068 n=29+28)
LIST_namespaces_p50                0.21 ±25%   0.21 ±26%     ~     (p=0.768 n=29+27)
LIST_namespaces_p90                0.28 ±29%   0.26 ±25%     ~     (p=0.101 n=30+28)
LIST_namespaces_p99                0.30 ±48%   0.29 ±42%     ~     (p=0.339 n=30+29)
LIST_replicasets_p50               0.15 ±18%   0.15 ±16%     ~     (p=0.612 n=30+28)
LIST_replicasets_p90               0.22 ±19%   0.21 ±18%   -5.13%  (p=0.011 n=28+27)
LIST_replicasets_p99               0.31 ±39%   0.28 ±29%     ~     (p=0.066 n=29+28)
LIST_persistentvolumes_p50         0.16 ±23%   0.15 ±21%     ~     (p=0.124 n=30+29)
LIST_persistentvolumes_p90         0.21 ±23%   0.20 ±23%     ~     (p=0.092 n=30+25)
LIST_persistentvolumes_p99         0.21 ±24%   0.20 ±23%     ~     (p=0.053 n=30+25)
LIST_resourcequotas_p50            0.16 ±12%   0.16 ±13%     ~     (p=0.175 n=27+28)
LIST_resourcequotas_p90            0.20 ±22%   0.20 ±24%     ~     (p=0.388 n=30+28)
LIST_resourcequotas_p99            0.22 ±24%   0.22 ±23%     ~     (p=0.575 n=30+28)
LIST_persistentvolumeclaims_p50    0.15 ±21%   0.15 ±29%     ~     (p=0.079 n=30+28)
LIST_persistentvolumeclaims_p90    0.19 ±26%   0.18 ±34%     ~     (p=0.446 n=29+29)
LIST_persistentvolumeclaims_p99    0.19 ±26%   0.18 ±34%     ~     (p=0.446 n=29+29)
LIST_pods_p50                      68.0 ±16%   56.3 ± 9%  -17.19%  (p=0.000 n=29+28)
LIST_pods_p90                       119 ±19%     93 ± 8%  -21.88%  (p=0.000 n=28+28)
LIST_pods_p99                       230 ±18%    202 ±14%  -12.13%  (p=0.000 n=27+28)
2016-04-21 15:53:47 -04:00
Prashanth Balasubramanian 0ac10c6cc2 PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00
Clayton Coleman a5ff573263 ThirdPartyResourceCodec should implement streaming.Framer
Wrappers must proxy NewFrameReader|Writer for now (until we potentially
refactor the codec factory to separate them).
2016-04-18 21:24:26 -04:00
k8s-merge-robot 2bf52175f9 Merge pull request #23923 from hongchaodeng/exp
Automatic merge from submit-queue

Decouple etcd node.expiration logic from DeleitonTimestamp

ref: https://github.com/kubernetes/kubernetes/issues/23902
2016-04-17 04:12:26 -07:00
k8s-merge-robot a275a045d1 Merge pull request #23914 from sky-uk/make-etcd-cache-size-configurable
Automatic merge from submit-queue

Make etcd cache size configurable

Instead of the prior 50K limit, allow users to specify a more sensible size for their cluster.

I'm not sure what a sensible default is here. I'm still experimenting on my own clusters. 50 gives me a 270MB max footprint. 50K caused my apiserver to run out of memory as it exceeded >2GB. I believe that number is far too large for most people's use cases.

There are some other fundamental issues that I'm not addressing here:
- Old etcd items are cached and potentially never removed (it stores using modifiedIndex, and doesn't remove the old object when it gets updated)
- Cache isn't LRU, so there's no guarantee the cache remains hot. This makes its performance difficult to predict. More of an issue with a smaller cache size.
- 1.2 etcd entries seem to have a larger memory footprint (I never had an issue in 1.1, even though this cache existed there). I suspect that's due to image lists on the node status.

This is provided as a fix for #23323
2016-04-17 00:06:31 -07:00
Hongchao Deng b9745999c9 Decouple etcd node.expiration logic from DeleitonTimestamp 2016-04-13 15:11:53 -07:00
Daniel Smith 4c539bf082 Merge pull request #23490 from wojtek-t/remove_set_from_storage_interface
Remove Set() from storage.Interface.
2016-04-13 14:22:05 -07:00
k8s-merge-robot f5e8e7453b Merge pull request #23806 from smarterclayton/streaming_watch
Automatic merge from submit-queue

Implement a streaming serializer for watch

Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).

@wojtek-t @lavalamp
2016-04-13 05:18:17 -07:00
k8s-merge-robot acf9492cb1 Merge pull request #23660 from goltermann/vetclean
Automatic merge from submit-queue

Additional go vet fixes

Mostly:
- pass lock by value
- bad syntax for struct tag value
- example functions not formatted properly
2016-04-12 06:22:16 -07:00
James Ravn 5bb0595260 Make deserialization cache size configurable
Instead of the default 50K entries, allow users to specify more sensible
sizes for their cluster.
2016-04-12 13:42:27 +01:00
Clayton Coleman 3474911736 Implement a streaming serializer for watch
Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).
2016-04-11 11:22:05 -04:00
goltermann 696423e044 Vet fixes, mostly pass lock by value errors. 2016-04-06 11:27:40 -07:00
Wojciech Tyczynski 53f433f019 Remove Set() from storage.Interface. 2016-04-04 17:54:18 +02:00
k8s-merge-robot f5c93c8ddc Merge pull request #23472 from wojtek-t/fix_object_meta_for
Automatic merge from submit-queue

Switch from api.ObjectMetaFor to meta.Accessor in most of places

Fix #23278

@smarterclayton @lavalamp
2016-04-02 02:33:40 -07:00
Brendan Burns be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07:00
Wojciech Tyczynski 2699be2e7e Switch api.ObjetaMetaFor to meta.Accessor 2016-03-31 17:52:31 +02:00
Tommy Murphy 4d22c2fd6a IngressTLS: allow secretName to be blank for SNI routing 2016-03-28 21:25:54 -04:00
k8s-merge-robot 95e09e303f Merge pull request #22965 from caesarxuchao/delete-UID-precondition
Auto commit by PR queue bot
2016-03-26 09:36:28 -07:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
Chao Xu 31b425b3a1 add delete precondition 2016-03-25 11:21:39 -07:00
k8s-merge-robot 4e4ad61260 Merge pull request #23366 from goltermann/vet
Auto commit by PR queue bot
2016-03-24 21:50:56 -07:00
k8s-merge-robot 2777cd7e75 Merge pull request #23295 from hongchaodeng/error
Auto commit by PR queue bot
2016-03-23 02:27:36 -07:00
goltermann 34d4eaea08 Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
Hongchao Deng 189ce6e397 storage: add custom storage error 2016-03-22 08:19:16 -07:00
harry b0900bf0d4 Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
k8s-merge-robot 782ba437f1 Merge pull request #23003 from deads2k/no-proxy-cidr
Auto commit by PR queue bot
2016-03-17 14:16:11 -07:00
deads2k ab03317d96 support CIDRs in NO_PROXY 2016-03-16 16:22:54 -04:00
Timothy St. Clair d3da93c174 Renaming api/errors/etcd to api/errors/storage as it no longer
has any etcd specific dependencies.  Reference issue #17546
2016-03-15 20:23:47 -05:00
Jordan Liggitt a1c2267f20 Decrease parallelism in deletecollection test, lengthen test etcd certs 2016-03-12 18:30:12 -05:00
k8s-merge-robot 5f5ac27996 Merge pull request #22502 from caesarxuchao/ignore-notfound-etcd
Auto commit by PR queue bot
2016-03-11 15:53:51 -08:00
k8s-merge-robot 5db0feb202 Merge pull request #22017 from caesarxuchao/fix-21955
Auto commit by PR queue bot
2016-03-10 14:37:43 -08:00
Andy Goldstein cdd339505e Merge pull request #22758 from madhusudancs/replicaset-nonpointer-template
ReplicaSetSpec.Template shouldn't be a pointer.
2016-03-10 15:35:04 -05:00
Madhusudan.C.S db48dcf583 ReplicaSetSpec.Template shouldn't be a pointer.
PodTemplateSpec should be consistent for all the types in extensions/v1beta1.

See PR #19510.
2016-03-09 21:24:16 -08:00
Madhusudan.C.S e8ee3eda2a Pass ResourceVersion in Scale object back to RC before updating RC so that it can be used to check for conflicts. 2016-03-09 19:44:21 -08:00
Madhusudan.C.S fe26381c90 Support for both map-based and set-based selectors in extensions/v1beta1.Scale
Here are a list of changes along with an explanation of how they work:
1. Add a new string field called TargetSelector to the external version of
   extensions Scale type (extensions/v1beta1.Scale). This is a serialized
   version of either the map-based selector (in case of ReplicationControllers)
   or the unversioned.LabelSelector struct (in case of Deployments and
   ReplicaSets).
2. Change the selector field in the internal Scale type (extensions.Scale) to
   unversioned.LabelSelector.
3. Add conversion functions to convert from two external selector fields to a
   single internal selector field. The rules for conversion are as follows:
   i.   If the target resource that this scale targets supports LabelSelector
        (Deployments and ReplicaSets), then serialize the LabelSelector and
        store the string in the TargetSelector field in the external version
        and leave the map-based Selector field as nil.
   ii.  If the target resource only supports a map-based selector
        (ReplicationControllers), then still serialize that selector and
	store the serialized string in the TargetSelector field. Also,
	set the the Selector map field in the external Scale type.
   iii. When converting from external to internal version, parse the
        TargetSelector string into LabelSelector struct if the string isn't
	empty. If it is empty, then check if the Selector map is set and just
	assign that map to the MatchLabels component of the LabelSelector.
   iv.  When converting from internal to external version, serialize the
        LabelSelector and store it in the TargetSelector field. If only
	the MatchLabel component is set, then also copy that value to
	the Selector map field in the external version.
4. HPA now just converts the LabelSelector field to a Selector interface
   type to list the pods.
5. Scale Get and Update etcd methods for Deployments and ReplicaSets now
   return extensions.Scale instead of autoscaling.Scale.
6. Consequently, SubresourceGroupVersion override and is "autoscaling"
   enabled check is now removed from pkg/master/master.go
7. Other small changes to labels package, fuzzer and LabelSelector
   helpers to piece this all together.
8. Add unit tests to HPA targeting Deployments and ReplicaSets.
9. Add an e2e test to HPA targeting ReplicaSets.
2016-03-09 17:54:17 -08:00
k8s-merge-robot 89c9c24987 Merge pull request #21964 from caesarxuchao/fix-thirdparty-parameter
Auto commit by PR queue bot
2016-03-07 00:59:17 -08:00
Chao Xu ff446ece57 adding a test to make sure the ignore NotFound error patch is working 2016-03-05 22:32:58 -08:00
AdoHe 5fdfc4bde3 fix can not export service bug 2016-03-05 11:23:50 -05:00
k8s-merge-robot b198c820cd Merge pull request #22402 from erictune/psp-simplify
Auto commit by PR queue bot
2016-03-05 07:55:19 -08:00
k8s-merge-robot a435537e27 Merge pull request #21966 from madhusudancs/scale-deployment-replicaset
Auto commit by PR queue bot
2016-03-04 14:40:10 -08:00
Madhusudan.C.S fa0794098f Define etcd storage methods for replicationcontrollers/scale subresource.
Also register replicationcontrollers/scale subresource. Along with
registering the resource, also specify the cross-group override for the
subresource since Scale belongs belongs to autoscaling/v1 but
ReplicationController belongs to api/v1.
2016-03-04 11:02:37 -08:00
Madhusudan.C.S 9e99f9fa0e Register scale subresource for Deployments and ReplicaSets.
Define etcd registry methods for scale subresource in Deployments and
ReplicaSets. Register them with the API server.
2016-03-04 11:01:36 -08:00
Chao Xu a3a6130f44 ignore NotFound error in etcd 2016-03-03 13:26:40 -08:00
Eric Tune 4d090bfb09 Rename PodSecurityPolicy fields
In podSecurityPolicy:
1. Rename .seLinuxContext to .seLinux
2. Rename .seLinux.type to .seLinux.rule
3. Rename .runAsUser.type to .runAsUser.rule
4. Rename .seLinux.SELinuxOptions

1,2,3 as suggested by thockin in #22159.
I added 3 for consistency with 2.
2016-03-03 11:49:48 -08:00
k8s-merge-robot d81d823ca5 Merge pull request #22393 from eparis/blunderbuss
Auto commit by PR queue bot
2016-03-02 18:51:56 -08:00
Eric Paris 5e5a823294 Move blunderbuss assignees into tree 2016-03-02 20:46:32 -05:00
Chao Xu 8566056d18 revert 20202 2016-02-28 19:03:22 -08:00
k8s-merge-robot 43792754d8 Merge pull request #21469 from wojtek-t/parallel_namespace_deletion
Auto commit by PR queue bot
2016-02-27 07:26:49 -08:00
Fabio Yeon 375b4ca8d6 Revert "Revert 20202. Use other measures to prevent race in test-cmd.sh" 2016-02-26 19:25:08 -08:00
k8s-merge-robot a5ceafc48a Merge pull request #21175 from caesarxuchao/revert-20202
Auto commit by PR queue bot
2016-02-26 18:33:42 -08:00
Chao Xu 56bddbcae5 fix thirdparty discovery, add test 2016-02-25 14:13:28 -08:00
Eric Tune 875755f992 Added Selector Generation to Job.
Added selector generation to Job's
strategy.Validate, right before validation.
Can't do in defaulting since UID is not known.

Added a validation to Job to ensure that the generated
labels and selector are correct when generation was requested.
This happens right after generation, but validation is in a better
place to return an error.

Adds "manualSelector" field to batch/v1 Job to control selector generation.
Adds same field to extensions/__internal.  Conversion between those two
is automatic.

Adds "autoSelector" field to extensions/v1beta1 Job.  Used for storing batch/v1 Jobs
    - Default for v1 is to do generation.
    - Default for v1beta1 is to not do it.
    - In both cases, unset == false == do the default thing.

Release notes:
Added batch/v1 group, which contains just Job, and which is the next
version of extensions/v1beta1 Job.

The changes from the previous version are:
- Users no longer need to ensure labels on their pod template are unique to the enclosing
  job (but may add labels as needed for categorization).
- In v1beta1, job.spec.selector was defaulted from pod labels, with the user responsible for uniqueness.
  In v1, a unique label is generated and added to the pod template, and used as the selector (other
  labels added by user stay on pod template, but need not be used by selector).
- a new field called "manualSelector" field exists to control whether the new behavior is used,
  versus a more error-prone but more flexible "manual" (not generated) seletor.  Most users
  will not need to use this field and should leave it unset.

Users who are creating extensions.Job go objects and then posting them using the go client
will see a change in the default behavior.  They need to either stop providing a selector (relying on
selector generation) or else specify "spec.manualSelector" until they are ready to do the former.
2016-02-25 09:28:07 -08:00
Wojciech Tyczynski 506899008f Parallelization of namespace deletion 2016-02-25 16:33:25 +01:00
Chao Xu 5b108acb38 fix ParameterCodec for thirdparty resource 2016-02-24 21:45:30 -08:00
Dawn Chen a8c0ac88fc Merge pull request #21754 from kargakis/use-generation-for-deployments
Use generation for deployments
2016-02-23 16:42:16 -08:00
kargakis 418d79cb78 extensions: add observedGeneration for deployments 2016-02-23 18:47:40 +01:00
k8s-merge-robot d0ce85a6d1 Merge pull request #21687 from kargakis/generation-updates-for-label-annotation-changes
Auto commit by PR queue bot
2016-02-23 07:51:48 -08:00
kargakis 69cd75c6a8 registry: remove todos about rc/rs label/annotation updates 2016-02-23 10:24:02 +01:00
Wojciech Tyczynski 4eadc5e97b Introduce RESTOptions to configure per-resource storage 2016-02-22 16:28:28 +01:00
k8s-merge-robot 9b9d63ac5e Merge pull request #21340 from liggitt/delete-collection-not-found
Auto commit by PR queue bot
2016-02-22 03:37:42 -08:00
Chao Xu 4342a8c4f0 revert 20202 2016-02-19 11:37:54 -08:00
feihujiang ac9f890238 Support the subresource of service proxy 2016-02-18 15:16:05 +08:00
k8s-merge-robot ef505d8fa3 Merge pull request #19771 from derekwaynecarr/field_selector
Auto commit by PR queue bot
2016-02-17 09:20:40 -08:00
Jordan Liggitt d575a954fa Tolerate individual NotFound errors in DeleteCollection 2016-02-17 00:06:44 -05:00
derekwaynecarr 76f2cc6a11 Add field selector for pod.spec.restartPolicy 2016-02-16 16:51:42 -05:00
feihujiang e85253916f Support the subresource of node proxy 2016-02-16 17:02:45 +08:00
deads2k 9901a386c3 remove ResourceIsValid 2016-02-15 07:49:48 -05:00
k8s-merge-robot 957ce699af Merge pull request #20906 from kargakis/status-updates-in-deployments
Auto commit by PR queue bot
2016-02-13 18:24:36 -08:00
k8s-merge-robot dee94c5355 Merge pull request #20897 from wojtek-t/fix_identical_writes
Auto commit by PR queue bot
2016-02-13 06:24:34 -08:00
Wojciech Tyczynski 2e97793840 Don't store no-op updates in etcd. 2016-02-12 09:23:28 +01:00
Madhusudan.C.S 8c558088ee Allow a DaemonSet pod template to be updated in storage.
This should allow users to update DaemonSet pods by manually deleting
the corresponding running pods. Users can use this mechanism for
DaemonSet updates until we implement Deployment style rolling update
for DaemonSet.
2016-02-11 16:07:32 -08:00
Michail Kargakis 47a94fd051 registry: reject new labels on deployment status updates 2016-02-11 11:33:25 +01:00
Madhusudan.C.S ad9ba23995 Comment out DaemonSet update type fields and remove the code that depends on it.
Leaving the type fields as comments for reference and reminder. But
deleting the conversion, defaulting and validation code. They can
always be brough back from the previous PR once the types are
introduced. Because builds break without them anyway that serves as a
reminder, so there is no need to leave them commented out.
2016-02-10 15:44:01 -08:00
k8s-merge-robot 41a98b43e4 Merge pull request #19840 from madhusudancs/replicaset-deployment
Auto commit by PR queue bot
2016-02-09 18:57:42 -08:00
Madhusudan.C.S e7a9f30936 Address review comments. 2016-02-09 15:50:01 -08:00
k8s-merge-robot b98d9a21a1 Merge pull request #20818 from deads2k/remove-mixed-case
Auto commit by PR queue bot
2016-02-09 05:06:45 -08:00
Madhusudan.C.S ed7ad6dcf3 Make deployments work. 2016-02-08 21:27:49 -08:00
Madhusudan.C.S 518f08aa7c Move Deployments to ReplicaSets and switch the Deployment selector to the new LabelSelector.
Update the Deployments' API types, defaulting code, conversions, helpers
and validation to use ReplicaSets instead of ReplicationControllers and
LabelSelector instead of map[string]string for selectors.

Also update the Deployment controller, registry, kubectl subcommands,
client listers package and e2e tests to use ReplicaSets and
LabelSelector for Deployments.
2016-02-08 21:27:38 -08:00
k8s-merge-robot e5009bfdcd Merge pull request #19474 from endocode/container_names_in_kubectl_logs
Auto commit by PR queue bot
2016-02-08 14:22:22 -08:00
deads2k 6d71421ae1 eliminate mixed case from RESTMapper 2016-02-08 15:33:31 -05:00
Jan Chaloupka 4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
k8s-merge-robot b45a94bc78 Merge pull request #20765 from janetkuo/remove-podtemplate-key
Auto commit by PR queue bot
2016-02-06 00:44:47 -08:00
Janet Kuo 7e9fb97b7d Remove UniqueLabelKey from deployment spec 2016-02-05 16:21:44 -08:00
Madhusudan.C.S 0bcab9ab11 Implement ReplicaSet registry. 2016-02-05 16:14:10 -08:00
Prashanth Balasubramanian c56bebf594 Basic TLS support. 2016-02-05 11:00:04 -08:00
k8s-merge-robot 87fbfdc953 Merge pull request #20116 from Clarifai/http-headers
Auto commit by PR queue bot
2016-02-05 10:28:31 -08:00
k8s-merge-robot 266d7aa5b3 Merge pull request #19783 from magicwang-cn/master
Auto commit by PR queue bot
2016-02-05 08:53:30 -08:00
Rudi Chiarito a2d1bb7acf Add httpHeaders to httpGet liveness probe
Also update existing documentation and try to steer users away from 'host'.
Add validation.
2016-02-05 11:20:04 -05:00
Paul Weil 03261146b0 api 2016-02-05 08:45:50 -05:00
Wojciech Tyczynski 31a6f90da1 Don't mix RVs from different resources 2016-02-05 09:23:34 +01:00
magicwang-cn d2cf858560 make watch cache sizes configuratable of kube-apiserver 2016-02-05 15:47:27 +08:00
Eric Tune 6133cb1f21 Move extensions.LabelSelector to unversioned.
Move type LabelSelector and type LabelSelectorRequirement from pkg/apis/extensions
This avoids an import loop when Job (and later DaemonSet, Deployment, ReplicaSet)
are moved out of extensions to new api groups.

Also Move LabelSelectorAsSelector utility from pkg/apis/extensions/ to pkg/api/unversioned/
Also its test.
Also LabelSelectorOp* constants.
Also the pkg/apis/extensions/validation functions ValidateLabelSelectorRequirement and
ValidateLabelSelector move to pkg/api/unversioned

The related type in pkg/apis/extensions/v1beta1/ is staying there.  I might move
it in another PR if neccessary.
2016-02-04 13:46:34 -08:00
k8s-merge-robot 5914deeac8 Merge pull request #19380 from brendandburns/apiresource
Auto commit by PR queue bot
2016-02-03 00:49:47 -08:00
Jeff Lowdermilk ae2aece9af Merge pull request #20202 from caesarxuchao/skip-update
skip update when deleting with grace-period=0
2016-02-02 18:24:57 -08:00
Jeff Lowdermilk caa9433234 Merge pull request #20433 from lavalamp/fix-bad-rv
Add timeout, fix potential startup hang
2016-02-02 17:27:23 -08:00
Chao Xu fdf6a0f61c skip update when deleting with grace-period=0 2016-02-02 10:53:25 -08:00
k8s-merge-robot c5260c8c71 Merge pull request #20145 from mqliang/quorum-read
Auto commit by PR queue bot
2016-02-02 05:50:41 -08:00
Daniel Smith 5d713bb6aa don't cross-pollinate RVs 2016-02-01 15:36:15 -08:00
harry 1032067ff9 Replace runtime reference by pkg 2016-02-01 21:06:44 +08:00
k8s-merge-robot 9d9864486b Merge pull request #19342 from caesarxuchao/remove-resourceversion-check
Auto commit by PR queue bot
2016-01-31 18:11:47 -08:00
Chao Xu 90b4662d8d Add services/status path, and let the service controller uses Services.UpdateStatus() 2016-01-31 12:39:45 -08:00
Janet Kuo 3396db9510 Add rollback subresource; add rollback logic to deployment controller 2016-01-30 16:00:34 -08:00
mqliang b0e06c14e5 add a knob to enable quorum read 2016-01-30 20:32:12 +08:00
k8s-merge-robot dc3ee665a7 Merge pull request #19970 from caesarxuchao/namespaced-cacher
Auto commit by PR queue bot
2016-01-30 03:44:19 -08:00
Madhusudan.C.S 73fb6dca62 DaemonSetSpec.Template should not be a pointer.
Pod template for DaemonSets isn't optional, like Deployments and Jobs,
so the DaemonSetSpec.Template field should not be a pointer.
2016-01-28 22:51:58 -08:00
Chao Xu ebcff4b5e4 fix the namespaceScoped of cachers 2016-01-28 16:24:54 -08:00
Paul Morie 9030f16071 Move ConfigMap to main API 2016-01-28 17:07:05 -05:00
Michail Kargakis 436d2677f9 extensions: support paused deployments
This commit adds support for paused deployments so a user can choose
when to run a deployment that exists in the system instead of having
the deployment controller automatically reconciling it after every
change or sync interval.
2016-01-26 12:42:26 +01:00
k8s-merge-robot d3b869ae14 Merge pull request #17922 from smarterclayton/split_codec
Auto commit by PR queue bot
2016-01-25 06:30:39 -08:00
Julian Strobl 6cd10d4f87 add container names kubectl logs output
Present a list of container names one can choose from.
2016-01-25 13:35:47 +01:00
Clayton Coleman e2eb1b0dc4 19848: Retry service IP repair on conflict
Components can write services during startup, which results in the ip
allocator map being updated. Since core controllers *must* succeed for
the masters to start, we should retry a few times in order to pass.
2016-01-22 13:52:18 -05:00
Chao Xu db9b5c97fb fix e2e 2016-01-22 10:31:03 -08:00
Clayton Coleman 2fd38a7dc0 Break kubectl from assuming details of codecs
Most of the logic related to type and kind retrieval belongs in the
codec, not in the various classes. Make it explicit that the codec
should handle these details.

Factory now returns a universal Decoder and a JSONEncoder to assist code
in kubectl that needs to specifically deal with JSON serialization
(apply, merge, patch, edit, jsonpath). Add comments to indicate the
serialization is explicit in those places. These methods decode to
internal and encode to the preferred API version as previous, although
in the future they may be changed.

React to removing Codec from version interfaces and RESTMapping by
passing it in to all the places that it is needed.
2016-01-22 13:27:26 -05:00
Clayton Coleman 181dc7c64c Update thirdpartyresourcecodec with new Decoder 2016-01-22 13:27:25 -05:00
Chao Xu a248d1117b remove ResourceVersion validation in client 2016-01-22 10:14:39 -08:00