Commit Graph

1204 Commits (179d8e108e81ff189727659b4fd72b01f501d6f0)

Author SHA1 Message Date
Kubernetes Submit Queue 29f8ff32c2 Merge pull request #48073 from wanghaoran1988/e2e_bootstrap
Automatic merge from submit-queue (batch tested with PRs 49316, 46117, 49064, 48073, 49323)

add e2e tests for the bootstrapsigner and tokencleaner controllers, integration testing for bootstrap token auth

**What this PR does / why we need it**:
Add e2e test for bootstrap signer

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

**Special notes for your reviewer**:

**Release note**:
```
None
```
2017-07-20 17:02:52 -07:00
Kubernetes Submit Queue fb5fbc944a Merge pull request #46117 from ravisantoshgudimetla/scheduler_perf_arch
Automatic merge from submit-queue (batch tested with PRs 49316, 46117, 49064, 48073, 49323)

Modular extensions for kube scheduler perf testing framework

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

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

**Special notes for your reviewer**:
It is not same as the existing one, the previous one has a single nodeaffinity key with multiple values. This one has multiple keys, values.

**Release note**:



```
NONE
```
2017-07-20 17:02:47 -07:00
Kubernetes Submit Queue 5644e3d770 Merge pull request #49227 from deads2k/quota-01-tighten
Automatic merge from submit-queue (batch tested with PRs 49107, 47177, 49234, 49224, 49227)

tighten quota controller interface

While debugging a quota performance problem, I had to chase some references deeper than necessary because the interfaces were overly broad. This tightens them.

```release-note
NONE
```
2017-07-20 15:08:27 -07:00
Bobby (Babak) Salamat 2612422a7f Addressed reviewer comments 2017-07-20 14:59:18 -07:00
Bobby (Babak) Salamat c6bf7b8f52 update bazel 2017-07-20 14:40:32 -07:00
Bobby (Babak) Salamat 238cb5bfc1 Converted a couple of e2e priority tests to integration tests. 2017-07-20 14:40:32 -07:00
Bobby (Babak) Salamat 684ac3f665 Added utility functions for scheduler integration testing and cleaned up
scheduler_test.go
2017-07-20 14:40:31 -07:00
Janet Kuo 767082e8e9 Add new API version apps/v1beta2
Add a new API version apps/v1beta2 and enable it by default.
apps/v1beta2 has a copy of apps/v1beta1 types, except for
ControllerRevision.
2017-07-20 10:25:21 -07:00
Daniel Fernandes Martins 81ba522bbe Make NodeRestriction admission allow evictions for bounded pods 2017-07-20 14:20:03 -03:00
Haoran Wang f02008338f add integration testing for bootstrap token auth 2017-07-20 22:34:21 +08:00
Kubernetes Submit Queue 8d26afa8a6 Merge pull request #48377 from bsalamat/priority_class
Automatic merge from submit-queue

Add PriorityClass API object under new "scheduling" API group

**What this PR does / why we need it**: This PR is a part of a series of PRs to add pod priority to Kubernetes. This PR adds a new API group called "scheduling" with a new API object called "PriorityClass". PriorityClass maps the string value of priority to its integer value.

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

**Special notes for your reviewer**: Given the size of this PR, I will add the admission controller for the PriorityClass in a separate PR.

**Release note**:

```release-note
Add PriorityClass API object under new "scheduling" API group
```

ref/ #47604
ref/ #48646
2017-07-19 19:04:29 -07:00
deads2k 62157572cf tighten quota controller interface 2017-07-19 15:36:45 -04:00
Kubernetes Submit Queue b78fc209a4 Merge pull request #49045 from ericchiang/remove-anytoken-authenticator-option
Automatic merge from submit-queue (batch tested with PRs 49058, 49072, 49137, 49182, 49045)

*: remove --insecure-allow-any-token option

~Since the authenticator is still used in e2e tests, don't remove
the actual package. Maybe a follow up?~

edit: e2e and integration tests have been switched over to the tokenfile
authenticator instead.

```release-note
The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging.
```

closes #49031

cc @kubernetes/sig-auth-pr-reviews
2017-07-19 10:27:29 -07:00
Irfan Ur Rehman 7779377305 [Federation] Update to enable all apis in integration tests 2017-07-19 21:26:25 +05:30
Kubernetes Submit Queue 36ade22a5a Merge pull request #49116 from sttts/sttts-authorative-api-v1-ref
Automatic merge from submit-queue (batch tested with PRs 49116, 49095)

Move pkg/api/v1/ref -> client-go/tools/reference

`pkg/api/v1/ref` is the only remaining package copied from pkg/api/v1 to client-go via staging/copy.sh.
2017-07-19 03:21:25 -07:00
ravisantoshgudimetla f81f8b56ef Build files generated 2017-07-19 00:29:05 -04:00
ravisantoshgudimetla 739bf4d85f # This is a combination of 2 commits.
# The first commit's message is:

Modular extensions for kube scheduler perf testing framework

# This is the 2nd commit message:

Modular extensions for kube scheduler perf testing framework
2017-07-19 00:28:40 -04:00
Bobby Salamat 33e6a476ba Add PriorityClass API
Add PriorityClass to pkg/registry

Add PriorityClass to pkg/master/master.go

Add PriorityClass to import_know_versions.go

Update linted packages

minor fix
2017-07-18 17:47:57 -07:00
Eric Chiang e2f2ab67f2 *: remove --insecure-allow-any-token option
e2e and integration tests have been switched over to the tokenfile
authenticator instead.

```release-note
The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging.
```
2017-07-18 16:03:15 -07:00
Dr. Stefan Schimanski 5925a0a1df Move pkg/api/v1/ref -> client-go/tools/reference 2017-07-18 22:45:43 +02:00
Harry Zhang 0e8517875e Update factory.go informers to update equivalence cache
Fix tombstone

Add e2e to verify equivalence cache

Addressing nits in factory,go and e2e

Update build files
2017-07-18 23:55:01 +08:00
Jacob Simpson 8bcbbd4d08 Migrate api.Registry to testapi.Groups in tests. 2017-07-17 15:05:38 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Kubernetes Submit Queue d54ab221cd Merge pull request #48991 from smarterclayton/cleanup_restclient
Automatic merge from submit-queue

Remove old, core/v1 specific constructs from RESTClient

Now that metav1 is abstracted from the APIs, RESTClient should also be agnostic to the core API.

* Remove `LabelSelectorParam` and `FieldSelectorParam` - use `VersionedParams` with `ListOptions`
* Remove `UintParam`
* Remove all legacy field selector logic from `VersionedParams` - ParameterCodec now handles that
* Remove special parameters (like `timeout`) which is no longer set by most clients
2017-07-17 06:50:18 -07:00
Kubernetes Submit Queue 0c74c36b70 Merge pull request #46930 from k82cn/sched_integ_test
Automatic merge from submit-queue (batch tested with PRs 47417, 47638, 46930)

Added scheduler integration test owners.

**What this PR does / why we need it**:
Add OWNER file into scheduler integration test.

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

**Release note**:
```release-note-none
```
2017-07-16 16:33:05 -07:00
Clayton Coleman b6d9815b95
Remove use of (Label|Field)SelectorParam 2017-07-16 15:56:11 -04:00
Kubernetes Submit Queue 87445c5c99 Merge pull request #47090 from mikedanese/bazel-integration
Automatic merge from submit-queue (batch tested with PRs 48572, 48838, 48931, 48783, 47090)

Start etcd in integration tests with TestMain

https://github.com/kubernetes/kubernetes/issues/47089
2017-07-14 10:53:53 -07:00
Maru Newby 6ba0e92bf4 fed: Enable the namespace controller in integration tests 2017-07-13 09:50:07 -07:00
Mike Danese 6ae11fdc5d use testmain in integration tests 2017-07-12 17:34:55 -07:00
Mike Danese 8e23c656ca add testmain setup func to the integration framework 2017-07-12 17:34:55 -07:00
Maru Newby 7e772ee3eb fed: Provide client config to adapter factory
This will allow the namespace adapter to initialize a namespaced
resource deleter.
2017-07-12 13:54:24 -07:00
Dr. Stefan Schimanski 5835cfbcce kube-apiserver: add integration test with real Run() func
- for simple Run()
- for aggregation API group priorities
- for CRD creation
2017-07-12 08:47:25 +02:00
Dr. Stefan Schimanski 1a714f377c integration-tests: remove unneeded post hook wait workaround 2017-07-12 08:47:25 +02:00
Kubernetes Submit Queue a2e463f6d0 Merge pull request #48546 from deads2k/tpr-19-ripples
Automatic merge from submit-queue (batch tested with PRs 48497, 48604, 48599, 48560, 48546)

remove dead code

This removes the dead code cruft since we stopped serving TPRs.

ref #48152
2017-07-08 07:09:38 -07:00
Kubernetes Submit Queue 823f31ec91 Merge pull request #47713 from ravisantoshgudimetla/scheduler_perf_test_fix
Automatic merge from submit-queue

Small fix for number of pods and nodes in test function

**What this PR does / why we need it**:
Small fix to have correct pods and nodes in test function.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
Scheduler perf, nodes and pods number fix for 100 nodes 3k pods.
**Release note**:

```release-note
NONE
```
2017-07-07 13:04:41 -07:00
deads2k 0801ded425 remove dead code 2017-07-07 09:12:29 -04:00
Kubernetes Submit Queue aef4010592 Merge pull request #46228 from jayunit100/scheduler_perf_owners
Automatic merge from submit-queue

Add ownership for the future of scheduler_perf and kubemark

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

The scheduler_perf project is cross-cutting with the other goals of the performance and scale initiatives, so, I've put together a list of interested parties who have been running, using, and contributing to it.

cc @kubernetes/sig-scheduling-pr-reviews @ravisantoshgudimetla @sjug
2017-07-06 10:02:21 -07:00
Kubernetes Submit Queue cfde9e5832 Merge pull request #48444 from p0lyn0mial/add_fisher_resource_to_wardle_group
Automatic merge from submit-queue (batch tested with PRs 47162, 48444, 48445)

Introducing a cluster-scoped resource in the wardle.k8s.io group.

**What this PR does / why we need it**:
This PR adds a cluster-scoped resource to the wardle.k8s.io group.
The cluster scoped resource has a field that indicates Flunder.Names that are disallowed.
The resource is going to be used by an admission plugin.
The admission plugin will list the cluster-scope resources and check against banned names.

**Special notes for your reviewer**:
Issue: #47868

**Release note**:

```
NONE
```
2017-07-05 06:39:29 -07:00
Kubernetes Submit Queue c10cc3decd Merge pull request #48353 from deads2k/tpr-17-delete-01
Automatic merge from submit-queue (batch tested with PRs 48480, 48353)

remove tpr api access

xref https://github.com/kubernetes/kubernetes/issues/48152

TPR tentacles go pretty deep. This gets us started by removing API access and we'll move down from there.

@kubernetes/sig-api-machinery-misc 
@ironcladlou this should free up the GC implementation since TPRs will no longer be present and failing.

```release-note
Removing TPR api access per https://github.com/kubernetes/kubernetes/issues/48152
```
2017-07-05 05:49:30 -07:00
Kubernetes Submit Queue c746680143 Merge pull request #47384 from shiywang/api403
Automatic merge from submit-queue (batch tested with PRs 48383, 47384)

Fix 401/403 apiserver errors do not return 'Status' objects

fixes https://github.com/kubernetes/kubernetes/issues/45970
2017-07-05 02:18:21 -07:00
p0lyn0mial 113e9ba1d3 Introducing a cluster-scoped resource in the wardle.k8s.io group.
The cluster scoped resource has a field that indicates Flunder.Names that are disallowed.
The resource is going to be used by an admission plugin.
The admission plugin will list the cluster-scope resources and check against banned names.

Issue: #47868
2017-07-04 15:43:45 +02:00
Shiyang Wang 3d6479f721 Fix 401/403 apiserver errors do not return 'Status' objects 2017-07-04 15:35:51 +08:00
deads2k 3ee458d246 remove tpr API access 2017-07-03 11:25:59 -04:00
Klaus Ma 7541496a4f Updated OWNERS_ALIASES for scheduler, and added scheduler integration test owners. 2017-07-01 09:28:52 +08:00
Kubernetes Submit Queue d19a2841e3 Merge pull request #47645 from jsafrane/integration-test-speedup
Automatic merge from submit-queue (batch tested with PRs 48139, 48042, 47645, 48054, 48003)

Speed up attach/detach controller integration tests

Internal attach/detach controller timers should be configurable and tests should use much shorter values.

`reconcilerSyncDuration` is deliberately left out of `TimerConfig` because it's the only one that's not a constant one, it's configurable by user.

Fixes #47129 

Before:
```
--- PASS: TestPodDeletionWithDswp (63.21s)
--- PASS: TestPodUpdateWithWithADC (13.68s)
--- PASS: TestPodUpdateWithKeepTerminatedPodVolumes (13.55s)
--- PASS: TestPodAddedByDswp (183.01s)
--- PASS: TestPersistentVolumeRecycler (12.55s)
--- PASS: TestPersistentVolumeDeleter (12.54s)
--- PASS: TestPersistentVolumeBindRace (3.51s)
--- PASS: TestPersistentVolumeClaimLabelSelector (12.50s)
--- PASS: TestPersistentVolumeClaimLabelSelectorMatchExpressions (12.54s)
--- PASS: TestPersistentVolumeMultiPVs (3.05s)
--- PASS: TestPersistentVolumeMultiPVsPVCs (4.36s)
--- PASS: TestPersistentVolumeControllerStartup (7.29s)
--- PASS: TestPersistentVolumeProvisionMultiPVCs (5.02s)
--- PASS: TestPersistentVolumeMultiPVsDiffAccessModes (12.48s)
ok  	k8s.io/kubernetes/test/integration/volume	359.727s
```

After:
```
--- PASS: TestPodDeletionWithDswp (3.71s)
--- PASS: TestPodUpdateWithWithADC (3.63s)
--- PASS: TestPodUpdateWithKeepTerminatedPodVolumes (3.70s)
--- PASS: TestPodAddedByDswp (5.68s)
--- PASS: TestPersistentVolumeRecycler (12.54s)
--- PASS: TestPersistentVolumeDeleter (12.55s)
--- PASS: TestPersistentVolumeBindRace (3.55s)
--- PASS: TestPersistentVolumeClaimLabelSelector (12.50s)
--- PASS: TestPersistentVolumeClaimLabelSelectorMatchExpressions (12.52s)
--- PASS: TestPersistentVolumeMultiPVs (3.98s)
--- PASS: TestPersistentVolumeMultiPVsPVCs (3.85s)
--- PASS: TestPersistentVolumeControllerStartup (7.18s)
--- PASS: TestPersistentVolumeProvisionMultiPVCs (5.23s)
--- PASS: TestPersistentVolumeMultiPVsDiffAccessModes (12.48s)
ok  	k8s.io/kubernetes/test/integration/volume	103.267s
```

PV controller tests are the slowest ones now.

@kubernetes/sig-storage-pr-reviews 
/assign @gnufied 

```release-note
NONE
```
2017-06-27 14:08:17 -07:00
Kubernetes Submit Queue d07a0200c7 Merge pull request #47656 from jsafrane/speed-up-volume-integration
Automatic merge from submit-queue

Speed up PV integration tests

Integration tests are ~20 seconds shorter. Before (with #47645 applied):
```
--- PASS: TestPodDeletionWithDswp (3.70s)
--- PASS: TestPodUpdateWithWithADC (3.61s)
--- PASS: TestPodUpdateWithKeepTerminatedPodVolumes (3.59s)
--- PASS: TestPodAddedByDswp (5.69s)
--- PASS: TestPersistentVolumeRecycler (2.68s)
--- PASS: TestPersistentVolumeDeleter (12.61s)
--- PASS: TestPersistentVolumeBindRace (12.53s)
--- PASS: TestPersistentVolumeClaimLabelSelector (12.52s)
--- PASS: TestPersistentVolumeClaimLabelSelectorMatchExpressions (2.62s)
--- PASS: TestPersistentVolumeMultiPVs (3.98s)
--- PASS: TestPersistentVolumeMultiPVsPVCs (3.67s)
--- PASS: TestPersistentVolumeControllerStartup (7.41s)
--- PASS: TestPersistentVolumeProvisionMultiPVCs (4.85s)
--- PASS: TestPersistentVolumeMultiPVsDiffAccessModes (2.71s)
ok  	k8s.io/kubernetes/test/integration/volume	82.304s
```

After:
```
--- PASS: TestPodDeletionWithDswp (3.70s)
--- PASS: TestPodUpdateWithWithADC (3.61s)
--- PASS: TestPodUpdateWithKeepTerminatedPodVolumes (3.63s)
--- PASS: TestPodAddedByDswp (5.73s)
--- PASS: TestPersistentVolumeRecycler (3.53s)
--- PASS: TestPersistentVolumeDeleter (4.56s)
--- PASS: TestPersistentVolumeBindRace (3.52s)
--- PASS: TestPersistentVolumeClaimLabelSelector (3.52s)
--- PASS: TestPersistentVolumeClaimLabelSelectorMatchExpressions (3.49s)
--- PASS: TestPersistentVolumeMultiPVs (3.07s)
--- PASS: TestPersistentVolumeMultiPVsPVCs (3.94s)
--- PASS: TestPersistentVolumeControllerStartup (7.64s)
--- PASS: TestPersistentVolumeProvisionMultiPVCs (6.25s)
--- PASS: TestPersistentVolumeMultiPVsDiffAccessModes (3.55s)
ok  	k8s.io/kubernetes/test/integration/volume	59.945s
```

/assign @gnufied 
@kubernetes/sig-storage-pr-reviews 

Release note
```release-note
NONE
```
2017-06-26 08:54:09 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
deads2k f525c0815e restore working aggregator and avoid duplicate informers 2017-06-21 15:14:59 -04:00
Daniel Smith 51562445de fix test 2017-06-19 11:17:41 -07:00
ravisantoshgudimetla 882c9b61bd Small fix for number of pods and nodes in test function 2017-06-18 16:38:56 -04:00
Jan Safranek 714545d61f Speed up PV integration tests 2017-06-16 16:02:45 +02:00
Jan Safranek b28790a63b Speed up attach/detach controller integration tests
Internal attach/detach controller timers should be configurable and tests
should use much shorter values.

reconcilerSyncDuration is deliberately left out of TimerConfig because it's
the only one that's not a constant one, it's configurable by user.
2017-06-16 12:15:04 +02:00
deads2k 963c85e1c8 sort current API versions and fallback for others 2017-06-14 09:29:44 -04:00
Kubernetes Submit Queue d97d80fbd7 Merge pull request #47141 from gnufied/speedup-volume-integration-test
Automatic merge from submit-queue (batch tested with PRs 46750, 47141)

Speed up volume integration test

Partly solves https://github.com/kubernetes/kubernetes/issues/47129 . 

On my local box:

before -  7m56.751s  
after - 5m53.132s  

So approx. 2m time saving. More saving will require refactoring of attach detach controller.

cc @mikedanese
2017-06-09 13:19:40 -07:00
Kubernetes Submit Queue 25aed0a631 Merge pull request #47251 from sttts/sttts-dynamic-client-getoptions
Automatic merge from submit-queue (batch tested with PRs 36376, 47251)

client-go: GetOptions for dynamic client

Looks like `GetOptions` were forgotten in the dynamic client. Without them it's hard to write a dynamic initializer controller (useful for custom resources).
2017-06-09 11:24:41 -07:00
Dr. Stefan Schimanski 30668b24fb client-go: GetOptions for dynamic client 2017-06-09 18:04:17 +02:00
Hemant Kumar 97368fc0f2 Speed up volume integration test 2017-06-08 15:44:09 -04:00
Dr. Stefan Schimanski 342a8fc657 kube-apiserver: cleanup node proxy setup code 2017-06-08 18:20:16 +02:00
Dr. Stefan Schimanski e2b50ac9b8 client-go: deprecate TPR example and add CRD example 2017-06-07 13:45:58 +02:00
Kubernetes Submit Queue 6ed4bc7b97 Merge pull request #46828 from cblecker/links-update
Automatic merge from submit-queue (batch tested with PRs 46718, 46828, 46988)

Update docs/ links to point to main site

**What this PR does / why we need it**:
This updates various links to either point to kubernetes.io or to the kubernetes/community repo instead of the legacy docs/ tree in k/k
Pre-requisite for #46813

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

**Special notes for your reviewer**:

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

@kubernetes/sig-docs-maintainers @chenopis @ahmetb @thockin
2017-06-06 11:43:18 -07:00
Kubernetes Submit Queue 8da89aeb00 Merge pull request #46112 from sttts/sttts-unversioned-to-meta
Automatic merge from submit-queue

apimachinery: move unversioned registration to metav1

Follow-up from the discussions in https://github.com/kubernetes/kubernetes/pull/43027:

We need `Status` as unversioned type which is hardcoded to `GroupVersion{Group: "", Version: "v1"}`. If the core group is not in the scheme, we miss `Status`.

Fixing https://github.com/kubernetes/kubernetes/issues/47030.
2017-06-06 03:13:01 -07:00
Christoph Blecker 1bdc7a29ae
Update docs/ URLs to point to proper locations 2017-06-05 22:13:54 -07:00
Ravi Gadde 7f179bf936 Added Bind method to Scheduler Extender
- only one extender can support the bind method
- if an extender supports bind, scheduler delegates the pod binding to the extender
2017-06-05 09:44:53 -07:00
Kubernetes Submit Queue f28fe811ad Merge pull request #46680 from cheftako/aggregate
Automatic merge from submit-queue (batch tested with PRs 46681, 46786, 46264, 46680, 46805)

Enable Dialer on the Aggregator

Centralize the creation of the dialer during startup.
Have the dialer then passed in to both APIServer and Aggregator.
Aggregator the uses the dialer as its Transport base.

**What this PR does / why we need it**:Enables the Aggregator to use the Dialer/SSHTunneler to connect to the user-apiserver.

**Which issue this PR fixes** : fixes ##46679

**Special notes for your reviewer**:

**Release note**: None
2017-06-03 21:16:46 -07:00
Kubernetes Submit Queue e837c3bbc2 Merge pull request #46388 from lavalamp/whitlockjc-generic-webhook-admission
Automatic merge from submit-queue (batch tested with PRs 46239, 46627, 46346, 46388, 46524)

Dynamic webhook admission control plugin

Unit tests pass.

Needs plumbing:
* [ ] service resolver (depends on @wfender PR)
* [x] client cert (depends on ????)
* [ ] hook source (depends on @caesarxuchao PR)

Also at least one thing will need to be renamed after Chao's PR merges.

```release-note
Allow remote admission controllers to be dynamically added and removed by administrators.  External admission controllers make an HTTP POST containing details of the requested action which the service can approve or reject.
```
2017-06-02 23:37:42 -07:00
Kubernetes Submit Queue 348bf1e032 Merge pull request #46627 from deads2k/api-12-labels
Automatic merge from submit-queue (batch tested with PRs 46239, 46627, 46346, 46388, 46524)

move labels to components which own the APIs

During the apimachinery split in 1.6, we accidentally moved several label APIs into apimachinery.  They don't belong there, since the individual APIs are not general machinery concerns, but instead are the concern of particular components: most commonly the kubelet.  This pull moves the labels into their owning components and out of API machinery.

@kubernetes/sig-api-machinery-misc @kubernetes/api-reviewers @kubernetes/api-approvers 
@derekwaynecarr  since most of these are related to the kubelet
2017-06-02 23:37:38 -07:00
Kubernetes Submit Queue 98e5496aa2 Merge pull request #46677 from enisoc/tpr-migrate-etcd
Automatic merge from submit-queue (batch tested with PRs 43505, 45168, 46439, 46677, 46623)

Add TPR to CRD migration helper.

This is a helper for migrating TPR data to CustomResource. It's rather hacky because it requires crossing apiserver boundaries, but doing it this way keeps the mess contained to the TPR code, which is scheduled for deletion anyway.

It's also not completely hands-free because making it resilient enough to be completely automated is too involved to be worth it for an alpha-to-beta migration, and would require investing significant effort to fix up soon-to-be-deleted TPR code. Instead, this feature will be documented as a best-effort helper whose results should be verified by hand.

The intended benefit of this over a totally manual process is that it should be possible to copy TPR data into a CRD without having to tear everything down in the middle. The process would look like this:

1. Upgrade to k8s 1.7. Nothing happens to your TPRs.
1. Create CRD with group/version and resource names that match the TPR. Still nothing happens to your TPRs, as the CRD is hidden by the overlapping TPR.
1. Delete the TPR. The TPR data is converted to CustomResource data, and the CRD begins serving at the same REST path.

Note that the old TPR data is left behind by this process, so watchers should not receive DELETE events. This also means the user can revert to the pre-migration state by recreating the TPR definition.

Ref. https://github.com/kubernetes/kubernetes/issues/45728
2017-06-01 05:43:44 -07:00
Walter Fender 5b3f4684ed Enable Dialer on the Aggregator
Centralize the creation of the dialer during startup.
Have the dialer then passed in to both APIServer and Aggregator.
Aggregator the sets the dialer on its Transport base.
This should allow the SSTunnel to be used but also allow the Aggregation
Auth to work with it.
Depending on Environment InsecureSkipTLSVerify *may* need to be set to
true.
Fixed as few tests to call CreateDialer as part of start-up.
2017-06-01 00:05:02 -07:00
Anthony Yeh ba59e14d44
Add TPR to CRD migration helper. 2017-05-31 19:07:38 -07:00
Daniel Smith d6e1140b5d Implement dynamic admission webhooks
Also fix a bug in rest client
2017-05-31 16:38:46 -07:00
deads2k 954eb3ceb9 move labels to components which own the APIs 2017-05-31 10:32:06 -04:00
Jordan Liggitt fc8e915a4b
Add Node authorization mode based on graph of node-related objects 2017-05-30 16:53:03 -04:00
Dr. Stefan Schimanski 3eca0b5ad0 integration test: check API version onf Status object 2017-05-29 11:53:45 +02:00
Dan Winship 0683e55fc1 Add networking.k8s.io v1 API, with NetworkPolicy 2017-05-28 10:11:01 -04:00
Chao Xu 262799f91f serve the api in kube-apiserver 2017-05-25 23:55:15 -07:00
Kenneth Owens ba128e6e41 Implements ControllerRevision API Object without codec and code
generation
2017-05-25 11:38:57 -07:00
Kubernetes Submit Queue fe5b303365 Merge pull request #45913 from enj/enj/t/etcd_cohabitating_resources
Automatic merge from submit-queue (batch tested with PRs 45913, 46065, 46352, 46363, 46373)

Detect cohabitating resources in etcd storage test

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

This change updates the etcd storage path test to detect cohabitating resources by looking at their expected location in etcd.  This was not detected in the past because the GVK check did not span across groups.

To limit noise from failures caused by multiple objects at the same location in etcd, the test now fails when different GVRs share the same expected path.  Thus every object is expected to have a unique path.

@liggitt PTAL

Signed-off-by: Monis Khan <mkhan@redhat.com>

**Release note**:

```
NONE
```
2017-05-25 00:10:59 -07:00
jayunit100 41d7655e11 Add ownership for the future of scheduler_perf and kubemark 2017-05-24 10:17:50 -04:00
Kubernetes Submit Queue 45b275d52c Merge pull request #45897 from ncdc/gc-require-list-watch
Automatic merge from submit-queue (batch tested with PRs 46149, 45897, 46293, 46296, 46194)

GC: update required verbs for deletable resources, allow list of ignored resources to be customized

The garbage collector controller currently needs to list, watch, get,
patch, update, and delete resources. Update the criteria for
deletable resources to reflect this.

Also allow the list of resources the garbage collector controller should
ignore to be customizable, so downstream integrators can add their own
resources to the list, if necessary.

cc @caesarxuchao @deads2k @smarterclayton @mfojtik @liggitt @sttts @kubernetes/sig-api-machinery-pr-reviews
2017-05-23 15:48:57 -07:00
Kubernetes Submit Queue 1602e2a338 Merge pull request #45587 from foxish/pdb-maxunavailab
Automatic merge from submit-queue (batch tested with PRs 45587, 46286)

PDB Max Unavailable Field

Completes https://github.com/kubernetes/features/issues/285

```release-note
Adds a MaxUnavailable field to PodDisruptionBudget
```


Individual commits are self-contained; Last commit can be ignored because it is autogenerated code.
cc @kubernetes/sig-apps-api-reviews @kubernetes/sig-apps-pr-reviews
2017-05-23 10:29:56 -07:00
Andy Goldstein d1a0384678 GC: allow ignored resources to be customized
Allow the list of resources the garbage collector controller should
ignore to be customizable, so downstream integrators can add their own
resources to the list, if necessary.
2017-05-23 12:05:09 -04:00
Kubernetes Submit Queue 8e07e61a43 Merge pull request #46223 from smarterclayton/scheduler_max
Automatic merge from submit-queue (batch tested with PRs 45766, 46223)

Scheduler should use a shared informer, and fix broken watch behavior for cached watches

Can be used either from a true shared informer or a local shared
informer created just for the scheduler.

Fixes a bug in the cache watcher where we were returning the "current" object from a watch event, not the historic event.  This means that we broke behavior when introducing the watch cache.  This may have API implications for filtering watch consumers - but on the other hand, it prevents clients filtering from seeing objects outside of their watch correctly, which can lead to other subtle bugs.

```release-note
The behavior of some watch calls to the server when filtering on fields was incorrect.  If watching objects with a filter, when an update was made that no longer matched the filter a DELETE event was correctly sent.  However, the object that was returned by that delete was not the (correct) version before the update, but instead, the newer version.  That meant the new object was not matched by the filter.  This was a regression from behavior between cached watches on the server side and uncached watches, and thus broke downstream API clients.
```
2017-05-23 07:42:00 -07:00
Anirudh 63e51dc66e PDB MaxUnavailable: e2e tests 2017-05-23 07:18:44 -07:00
Kubernetes Submit Queue cc6e51c6e8 Merge pull request #45427 from ncdc/gc-shared-informers
Automatic merge from submit-queue (batch tested with PRs 46201, 45952, 45427, 46247, 46062)

Use shared informers in gc controller if possible

Modify the garbage collector controller to try to use shared informers for resources, if possible, to reduce the number of unique reflectors listing and watching the same thing.

cc @kubernetes/sig-api-machinery-pr-reviews @caesarxuchao @deads2k @liggitt @sttts @smarterclayton @timothysc @soltysh @kargakis @kubernetes/rh-cluster-infra @derekwaynecarr @wojtek-t @gmarek
2017-05-22 20:58:03 -07:00
Clayton Coleman 8cd95c78c4
Scheduler should use a shared informer
Can be used either from a true shared informer or a local shared
informer created just for the scheduler.
2017-05-22 13:50:14 -04:00
Monis Khan cbfe566e49
Detect cohabitating resources in etcd storage test
This change updates the etcd storage path test to detect cohabitating
resources by looking at their expected location in etcd.  This was not
detected in the past because the GVK check did not span across groups.

To limit noise from failures caused by multiple objects at the same
location in etcd, the test now fails when different GVRs share the same
expected path.  Thus every object is expected to have a unique path.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-05-22 13:48:18 -04:00
Andy Goldstein 2480f2ceb6 Use shared informers in gc controller if possible 2017-05-22 12:51:37 -04:00
deads2k 446e959bf7 make CRD apiservice controller 2017-05-22 08:54:14 -04:00
Wojciech Tyczynski 8de8446840 Revert "Scheduler should use shared informer for pods"
This reverts commit 479f01d340.
2017-05-22 09:03:35 +02:00
Kubernetes Submit Queue 06c12e717a Merge pull request #46071 from emaildanwilson/fedClusterSelectorIntegration
Automatic merge from submit-queue

[Federation] ClusterSelector Integration Testing

This pull request adds integration testing for the federated ClusterSelector ref: design #29887 merged pull #40234

cc: @nikhiljindal @marun
2017-05-21 23:18:44 -07:00
Clayton Coleman 479f01d340
Scheduler should use shared informer for pods
Previously, the scheduler created two separate list watchers. This
changes the scheduler to be able to leverage a shared informer, whether
passed in externally or spawned using the new in place method. This
removes the last use of a "special" informer in the codebase.

Allows someone wrapping the scheduler to use a shared informer if they
have more information avaliable.
2017-05-20 14:19:49 -04:00
Clayton Coleman 784e3ae5fa
Switch the tokens controller to use shared informers
Tokens controller previously needed a bit of extra help in order to be
safe for concurrent use. The new MutationCache allows it to keep a local
cache and still use a shared informer. The filtering event handler lets
it only see changes to secrets it cares about.
2017-05-20 14:19:49 -04:00
emaildanwilson 2cef454fd3 fed cluster selector integration test
updates from review
2017-05-19 13:47:52 -07:00
Derek Carr a71bea312a ResourceQuota admission control injects registry 2017-05-18 23:17:13 -04:00
Kubernetes Submit Queue 4f56e8b756 Merge pull request #45742 from janetkuo/deployment-integration-test
Automatic merge from submit-queue (batch tested with PRs 45990, 45544, 45745, 45742, 45678)

Add integration test for deployment

We have no integration test for Deployment currently. In this PR, add an integration test which covers an e2e test (create a new RollingUpdate deployment), add more replicas to the Deployment, and set minReadySeconds so that we can test maxUnavailable. 

Plan to add more integration tests that cover e2e tests after this initial PR is merged.

@kubernetes/sig-apps-pr-reviews
2017-05-17 18:40:57 -07:00
Kubernetes Submit Queue 8710f6e62d Merge pull request #45745 from marun/fed-test-cluster-addition
Automatic merge from submit-queue (batch tested with PRs 45990, 45544, 45745, 45742, 45678)

[Federation]  Add integration testing for cluster addition

This PR adds integration testing of the sync controller for cluster addition.  This ensures coverage equivalency between the integration tests and the old controller unit tests, so those tests are removed by this PR.

Resolves #45257

cc: @kubernetes/sig-federation-pr-reviews
2017-05-17 18:40:54 -07:00
Janet Kuo 3f2d8ae682 Extract common code in deployment e2e and integration test 2017-05-17 14:41:59 -07:00
Janet Kuo 1ced5ae22c Add integration test for deployment 2017-05-17 14:41:59 -07:00
Maru Newby 8e22dc0600 fed: Factor common setup for crud testing into helper function 2017-05-17 07:17:51 -07:00
Maru Newby 578f17c668 fed: Add integration testing for cluster addition 2017-05-17 05:04:35 -07:00
Maru Newby ea61af57dd fed: Refactor integ test fixture to support cluster addition by test 2017-05-17 05:04:35 -07:00
deads2k 75bd27a595 remove unnessary confusion of dead values 2017-05-17 07:15:29 -04:00
Kubernetes Submit Queue 3f0ebbe884 Merge pull request #45247 from mbohlool/c3
Automatic merge from submit-queue (batch tested with PRs 45247, 45810, 45034, 45898, 45899)

Apiregistration v1alpha1→v1beta1

Promoting apiregistration api from v1alpha1 to v1beta1.

API Registration is responsible for registering an API `Group`/`Version` with
another kubernetes like API server. The `APIService` holds information
about the other API server in `APIServiceSpec` type as well as general
`TypeMeta` and `ObjectMeta`. The `APIServiceSpec` type have the main
configuration needed to do the aggregation. Any request coming for
specified `Group`/`Version` will be directed to the service defined by
`ServiceReference` (on port 443) after validating the target using provided
`CABundle` or skipping validation if development flag `InsecureSkipTLSVerify`
is set. `Priority` is controlling the order of this API group in the overall
discovery document.
The return status is a set of conditions for this aggregation. Currently
there is only one condition named "Available", if true, it means the
api/server requests will be redirected to specified API server.

```release-note
API Registration is now in beta.
```
2017-05-16 19:01:55 -07:00
mbohlool 103c1bfc1e Update generated files 2017-05-15 15:34:33 -07:00
mbohlool e2f20a3539 Promote apiregistration from v1alpha1 to v1beta1 2017-05-15 15:34:33 -07:00
p0lyn0mial 7b0950b298 bazel update 2017-05-16 00:18:38 +02:00
p0lyn0mial 8cea69aa98 This PR implements AdmissionOptions.ApplyTo
ApplyTo adds the admission chain to the server configuration the method lazily initializes a generic plugin
that is appended to the list of pluginInitializers.

apiserver.Config will hold an instance of SharedInformerFactory to ensure we only have once instance.
The field will be initialized in apisever.SecureServingOptions
2017-05-14 10:30:19 +02:00
Hemant Kumar 951a36aac7 Add Keepterminatedpodvolumes as a annotation on node
and lets make sure that controller respects it
and doesn't detaches mounted volumes.
2017-05-11 22:31:14 -04:00
Hemant Kumar 9a1a9cbe08 detach the volume when pod is terminated
Make sure volume is detached when pod is terminated because
of any reason and not deleted from api server.
2017-05-11 22:18:22 -04:00
deads2k be39283923 plumb stopch to post start hook index since many of them are starting go funcs 2017-05-11 09:16:13 -04:00
Kubernetes Submit Queue 110f410e55 Merge pull request #45463 from nilebox/nilebox-tpr-watcher-example
Automatic merge from submit-queue (batch tested with PRs 45481, 45463)

ThirdPartyResource example: added watcher example, code cleanup

**NOTE**: This is a cleaned and updated version of PR https://github.com/kubernetes/kubernetes/pull/43027

**What this PR does / why we need it**:
An example of using go-client for watching on ThirdPartyResource events (create/update/delete).
2017-05-09 06:52:34 -07:00
Nail Islamov a6c97715ed ThirdPartyResource client-go example: added TPR controller example, code cleanup and integration test 2017-05-09 21:31:39 +10:00
Kubernetes Submit Queue d13c42d339 Merge pull request #45472 from k82cn/rm_unused_func
Automatic merge from submit-queue (batch tested with PRs 41903, 45311, 45474, 45472, 45501)

Removed old scheduler constructor.

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

**Release note**:

```release-note-none
```
2017-05-08 15:46:41 -07:00
Klaus Ma 63d194b626 Removed old scheduler constructor. 2017-05-08 11:09:25 -04:00
deads2k 4389f71576 refactor names for the apiserver handling chain 2017-05-08 07:55:31 -04:00
ravisantoshgudimetla d3df9f5a9d Build files generated 2017-05-04 21:51:34 -04:00
ravisantoshgudimetla cdee055ab6 Changes suggested by reviewers for scheduler extensibility 2017-05-04 21:51:29 -04:00
Kubernetes Submit Queue 19423e62af Merge pull request #45219 from CaoShuFeng/golint
Automatic merge from submit-queue

Fix golint verify error

I don't know why CI pass the hack/verify-golint.sh test.
But in my environment I get this:

> staging/src/k8s.io/client-go/util/workqueue/queue_test.go is in package workqueue_test, not workqueue
Errors from golint:
test/integration/apiserver/apiserver_test.go:102:13: should omit type string from declaration of var cascDel; it will be inferred from the right-hand side
Please fix the above errors. You can test via "golint" and commit the result.
!!! Error in hack/verify-golint.sh:98
  Error in hack/verify-golint.sh:98. 'false' exited with status 1
Call stack:
  1: hack/verify-golint.sh:98 main(...)
Exiting with status 1

This change fix this err in my environment.
**Release note**:

```NONE
```
2017-05-02 21:41:01 -07:00
Kubernetes Submit Queue 36590b0621 Merge pull request #45243 from mikedanese/skip-integration
Automatic merge from submit-queue (batch tested with PRs 45120, 45243)

skip integration test when run make bazel-test

we should opt for a seperate target for integration tests. This is breaking @deads2k who is trying to add an integration test in staging.
2017-05-02 16:05:49 -07:00
Mike Danese 01b736c4d9 skip integration test when run make bazel-test
we should opt for a seperate target for integration tests.
2017-05-02 14:12:00 -07:00
Aaron Crickenberger 276704ee22 skip procfs-dependent metrics test if not on linux 2017-05-02 13:34:20 -07:00
Cao Shufeng 3b20875863 Fix golint verify error 2017-05-02 15:36:50 +08:00
Kubernetes Submit Queue 91475306dc Merge pull request #40774 from mikedanese/no-more-integration-tags
Automatic merge from submit-queue

don't use build tags to mark integration tests

This is a bad pattern that leads to checked in code that isn't check for compilation. We should avoid this if it doesn't provide value, which it seems like it doesn't.
2017-05-01 11:08:15 -07:00
Aaron Crickenberger e847009d4d Avoid non-writable `/var/run` in integration tests
`/var/run` is not world-writable on my OSX 10.11.x setup, so tests that
standup a secure apiserver fail with the default cert dir.  Use a
tempdir instead.
2017-04-28 15:10:55 -07:00
Mike Danese 3600d49504 delete benchmark integration tests that don't work at all 2017-04-28 14:28:04 -07:00
Mike Danese 0c80a7aa40 fix go vet's from skipped tests 2017-04-28 14:19:40 -07:00
Mike Danese 21617a60ae don't use build tags to mark integration tests 2017-04-28 14:19:39 -07:00
Jan Safranek 9d0c47f1db Use storage.v1 instead of v1beta1
storage.v1beta1 was used to work around GKE which does not expose v1. Now that
GKE is updated, we can switch everything to v1.
2017-04-25 10:13:38 +02:00
Kubernetes Submit Queue a121d1c674 Merge pull request #44404 from bsalamat/config_fix
Automatic merge from submit-queue

Scheduler configurator looks for a specific key in ConfigMap.Data

**What this PR does / why we need it**: Changes scheduler configurator to look for a specific key in ConfigMap.Data instead of the old logic which expected only one entry to exist in the map. The key is a constant whose value is "policy.cfg".

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-04-21 19:50:08 -07:00
Monis Khan 2070c2a848
Add TestEtcdStoragePath integration test
TestEtcdStoragePath prevents the accidental movement of objects stored
in etcd.  It creates a stub of each object and then checks the expected
location in etcd.  Inadvertent GroupVersionKind changes are prevented.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-04-18 16:17:28 -04:00
NickrenREN 5cafb9042b find and add active pods for dswp
loops through the list of active pods and ensures that each one exists in the desired state of the world cache
2017-04-18 11:21:37 +08:00
Kubernetes Submit Queue 08ea5387f2 Merge pull request #44566 from wongma7/adc-wait
Automatic merge from submit-queue (batch tested with PRs 44469, 44566, 44467, 44526)

WaitForCacheSync before running attachdetach controller

@gnufied you wrote the test and @ncdc the TODO comment. Let's just run the pv and pvc informers, we do not care about them in this test. But we want to be able to stop the pod Informer at will, hence not just using informers.Start, is my understanding.
```release-note
NONE
```
2017-04-17 20:06:58 -07:00
Kubernetes Submit Queue 73fb978181 Merge pull request #44398 from caesarxuchao/move-v1/refs-and-v1/resource
Automatic merge from submit-queue (batch tested with PRs 44569, 44398)

Move v1/refs and v1/resource

This PR moves pkg/api/v1/ref.go and pkg/api/v1/resource_helper.go to their own sub packages, it's very similar to 44299 and 44302.

The PR is mostly mechanical, except that 
* i moved some utility function from resource.go to pkg/api/v1/pod and pkg/api/v1/node, as they are more appropriate
* i updated the staging/copy.sh to copy the new subpackages, so that helper functions are copied. We can get rid of this copy after client-go stops copying API types.
2017-04-17 14:03:57 -07:00
Chao Xu 4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Matthew Wong e1ce33d944 WaitForCacheSync before running attachdetach controller 2017-04-17 14:02:33 -04:00
Maru Newby cca465e347 fed: Rename 'secret' controller package to 'sync' 2017-04-17 09:09:41 -07:00
Maru Newby 2c75aeed02 fed: mv pkg/typeadapters pkg/federatedtypes 2017-04-16 21:30:52 -07:00
Maru Newby 1ebffa7112 fed: adapter registry -> type registry to enable ctlr mgr use 2017-04-16 21:30:52 -07:00
Maru Newby 6f061f7962 fed: Update crud integration test to use the the adapter registry 2017-04-16 21:30:09 -07:00
Maru Newby 3e4236d545 fed: Add type adapter registration to simplify maintenance 2017-04-16 21:30:09 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Bobby Salamat 6e4484e928 Change scheduler configurator to look for a specific key in ConfigMap.Data 2017-04-13 23:50:39 -07:00
Kubernetes Submit Queue c7b0ec0178 Merge pull request #42981 from NickrenREN/pv-controller-init
Automatic merge from submit-queue

Exit from NewController() for PersistentVolumeController when InitPlugins() failed

Exit from NewController() for PersistentVolumeController when InitPlugins() failed just like NewAttachDetachController() does

**Release note**:
```release-note
NONE
```
@jsafrane  @saad-ali  PTAL. Thanks in advance
2017-04-12 08:18:50 -07:00
NickrenREN e0ef5bfd40 Exit from NewController() for PersistentVolumeController when InitPlugins() failed just like NewAttachDetachController() does 2017-04-12 13:43:09 +08:00
Chao Xu 08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
deads2k 706823aaa8 make unstructured items correspond to other items for storage 2017-04-11 08:44:16 -04:00
Kubernetes Submit Queue e18843d353 Merge pull request #42225 from nikhiljindal/DisableAlphaAPIs
Automatic merge from submit-queue (batch tested with PRs 44019, 42225)

federation: Fixing runtime-config support for federation-apiserver

Fixes https://github.com/kubernetes/kubernetes/issues/42587
Ref https://github.com/kubernetes/kubernetes/issues/38593

Fixing the broken `--runtime-config` flag support in federation-apiserver. Fixing the bugs and using it to disable batch and autoscaling groups. Users can enable them by passing `--runtime-config=apis/all=true` to federation-apiserver.
~This also includes a bug fix to kube-apiserver registry that allows users to disable api/v1 resources~

cc @kubernetes/sig-federation-pr-reviews
2017-04-10 00:49:15 -07:00
nikhiljindal c778f07e85 Adding a test for runtime-config to federation-apiserver 2017-04-07 23:23:34 -07:00
Bobby Salamat f9d1333144 Addressed reviewers comments 2017-04-07 17:31:45 -07:00
Bobby Salamat d1bc320b44 Scheduler can recieve its policy configuration from a ConfigMap 2017-04-07 17:03:12 -07:00
Kubernetes Submit Queue d7f5929603 Merge pull request #42025 from marun/fed-crud-interation-test
Automatic merge from submit-queue

[Federation] Add integration test for secrets

This PR adds an integration test for secrets that:

 - performs create/read/update/delete on federation resources and validates that the changes are propagated to member clusters.  
 - uses an abstraction layer (fixture and adapter) to minimize the code required to support each federated type
   - It should be possible to replace a test-specific adapter with a runtime adapter in the future (as per #41050)
 - reuses fixture (federation api and clusters) across different resource types to minimize setup overhead
   - on a fast machine, setup takes ~4s, and validating each type takes ~2s  
 - uses the [Subtest feature added in Go 1.7](https://blog.golang.org/subtests) to allow the test for a specific controller to be run in isolation
   - ``make test-integration WHAT="federation  -test.run=TestFederationCRUD/secret"``

Once this PR merges the test can be extended to target other federated types.

This PR targets #40705

cc: @kubernetes/sig-federation-pr-reviews @derekwaynecarr
2017-04-06 16:54:44 -07:00
Jordan Liggitt c415e4aeab
Fix original object mutation on patch retry 2017-04-06 12:30:43 -04:00
Maru Newby 304030a61c fed: Add integration test for secrets 2017-03-30 12:58:39 -07:00
Kubernetes Submit Queue 4159cb57b6 Merge pull request #42835 from deads2k/server-01-remove-insecure
Automatic merge from submit-queue (batch tested with PRs 42835, 42974)

remove legacy insecure port options from genericapiserver

The insecure port has been a source of problems and it will prevent proper aggregation into a cluster, so the genericapiserver has no need for it.  In addition, there's no reason for it to be in the main kube-apiserver flow either.  This pull removes it from genericapiserver and removes it from the shared kube-apiserver code.  It's still wired up in the command, but its no longer possible for someone to mess up and start using in mainline code.

@kubernetes/sig-api-machinery-misc @ncdc
2017-03-27 17:00:21 -07:00
deads2k cd29754680 move legacy insecure options out of the main flow 2017-03-27 14:07:54 -04:00
deads2k 3414231672 proxy to IP instead of name, but still use host verification 2017-03-27 12:33:03 -04:00
Kubernetes Submit Queue b705835bae Merge pull request #42911 from deads2k/server-04-combined
Automatic merge from submit-queue (batch tested with PRs 43694, 41262, 42911)

combine kube-apiserver and kube-aggregator

This combines several pulls currently in progress and wires them together.  The aggregator sits in front of the normal kube-apiserver and allows local fallthrough instead of proxying.

@kubernetes/sig-api-machinery-misc 
@DirectXMan12 since you seem invested, your life will get easier
@luxas FYI since you've started trying to wire something together.  



Dependent Pulls LGTM:
- [x] https://github.com/kubernetes/kubernetes/pull/42801
- [x] https://github.com/kubernetes/kubernetes/pull/42886
- [x] https://github.com/kubernetes/kubernetes/pull/42900
- [x] https://github.com/kubernetes/kubernetes/pull/42732
- [x] https://github.com/kubernetes/kubernetes/pull/42672
- [x] https://github.com/kubernetes/kubernetes/pull/43141
- [x] https://github.com/kubernetes/kubernetes/pull/43076
- [x] https://github.com/kubernetes/kubernetes/pull/43149
- [x] https://github.com/kubernetes/kubernetes/pull/43226
- [x] https://github.com/kubernetes/kubernetes/pull/43144
2017-03-27 09:30:24 -07:00
deads2k 8e26fa25da wire in aggregation 2017-03-27 09:44:10 -04:00
deads2k 087a030221 require codecfactory 2017-03-27 08:19:08 -04:00
Kubernetes Submit Queue a9c8d97709 Merge pull request #42801 from deads2k/agg-25-local
Automatic merge from submit-queue

add local option to APIService

APIServices need an option to avoid proxying in cases where the groupversion is handled later in the chain.  This will allow a coherent and complete set of APIServices, but won't require extra connections.

@kubernetes/sig-api-machinery-misc @ncdc @cheftako
2017-03-25 15:12:19 -07:00
Kubernetes Submit Queue e0817ef832 Merge pull request #42381 from timchenxiaoyu/createdtypo
Automatic merge from submit-queue

fix created typo
2017-03-24 10:25:48 -07:00
Kubernetes Submit Queue e4796bcf6b Merge pull request #43091 from gnufied/fix-dswp-flake
Automatic merge from submit-queue (batch tested with PRs 40964, 42967, 43091, 43115)

fixes dswp flake

Sometimes a pod may not appear in desired state
of world immediately, we poll before failing.

It only adds additional 30s to tests in worst case.

Fixes #42990 

cc @jingxu97
2017-03-15 16:08:27 -07:00
Hemant Kumar 1a6c36da53 Fix dswp flake - from pod not showing in dswp
Sometimes a pod may not appear in desired state
of world immediately, we poll before failing.

It only adds additional 30s to tests in worst case.
2017-03-15 10:12:25 -04:00
Chao Xu 0605ba7a6d wait for garbagecollector to be synced in test 2017-03-14 16:19:33 -07:00
deads2k b27de102cb add local option to APIService 2017-03-13 10:10:50 -04:00
Avesh Agarwal 9f533de80d Fix DefaultTolerationSeconds admission plugin. It was using
versioned object whereas admission plugins operate on internal objects.
2017-03-09 20:24:43 -05:00
Kubernetes Submit Queue cf732613e3 Merge pull request #42278 from marun/fed-api-fixture
Automatic merge from submit-queue (batch tested with PRs 42728, 42278)

[Federation] Create integration test fixture for api

This PR factors a reusable fixture for the federation api server out of the existing integration test.

Targets #40705

cc: @kubernetes/sig-federation-pr-reviews
2017-03-09 05:45:32 -08:00
Kubernetes Submit Queue 55c436fde7 Merge pull request #42652 from liggitt/ctx-namespace
Automatic merge from submit-queue

Use namespace from context

Fixes #42653

Updates rbac_test.go to submit objects without namespaces set, which matches how actual objects are submitted to the API.
2017-03-08 10:52:27 -08:00
Maru Newby dd2a8127a5 fed: Create integration test fixture for api 2017-03-08 06:58:58 -08:00
Maru Newby 82dc083016 test/integration: Make localPort reusable as FindFreeLocalPort 2017-03-08 06:32:10 -08:00
nikhiljindal 09af9dc98c Disable checking APIs in test 2017-03-07 13:31:52 -08:00
Jordan Liggitt 7f4e5c5676
Use namespace from context 2017-03-07 14:02:13 -05:00
deads2k 5fd0162a8a deflake TestPatch by waiting for cache 2017-03-07 08:53:29 -05:00
deads2k d89862beca update names for kube plugin initializer to avoid conflicts 2017-03-06 10:18:21 -05:00
Kubernetes Submit Queue 053458cc83 Merge pull request #41984 from enisoc/controller-ref-rc-rs
Automatic merge from submit-queue (batch tested with PRs 41984, 41682, 41924, 41928)

RC/RS: Fully Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings ReplicaSet and ReplicationController into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

Although RC/RS had partially implemented ControllerRef, they didn't use it to determine which controller to sync, or to update expectations. This could lead to instability or controllers getting stuck.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-03-02 10:51:05 -08:00
Clayton Coleman 3769404b32 Merge pull request #42328 from deads2k/agg-23-testport
get fresh ports on startup failure for integration test
2017-03-02 10:40:04 -05:00
Jan Safranek 94e78eabc0 integration tests: use attributes instead of beta annotations 2017-03-02 10:23:56 +01:00
Jan Safranek 7ae4152712 Move PV/PVC annotations to PV/PVC types.
They aren't part of storage.k8s.io/v1 or v1beta1 API.
Also move associated *GetClass functions.
2017-03-02 10:23:55 +01:00
Jan Safranek a39bd53509 Explicitly use storage.k8s.io/v1beta1 everywhere.
v1 is not yet awailable on GKE and tests would fail.
2017-03-02 08:56:26 +01:00
timchenxiaoyu c02fd6d28e fix created typo 2017-03-02 09:26:30 +08:00
Anthony Yeh ca13b9e532 RC/RS: Use ControllerRef to route watch events.
This is part of the completion of ControllerRef, as described here:

https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#watches

This also removes the need for the Pod->Controller mapping cache in RC
and RS. This mapping is now persisted in the Pod's ControllerRef
instead.
2017-03-01 15:43:50 -08:00
Kubernetes Submit Queue 2869ff6a0f Merge pull request #42321 from nikhiljindal/integrationOWNERS
Automatic merge from submit-queue

Adding OWNERS file for test/integration/federation

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

File copied from federation/OWNERS.

Existing pending PRs for this diectory:
https://github.com/kubernetes/kubernetes/pull/42278 and https://github.com/kubernetes/kubernetes/pull/42225

cc @kubernetes/sig-federation-pr-reviews
2017-03-01 12:57:16 -08:00
deads2k 037f51ae89 get fresh ports on startup failure for integration test 2017-03-01 14:45:21 -05:00
Kubernetes Submit Queue c713ef434d Merge pull request #42327 from deads2k/api-06-debug
Automatic merge from submit-queue

show patch error as string not byte slice

Debugging for https://github.com/kubernetes/kubernetes/issues/39471 shows

```
client_test.go:309: Failed updating patchpod with patch type application/json-patch+json: Operation cannot be fulfilled on pods "patchpod": there is a meaningful conflict:
	 diff1=[123 34 109 101 116 97 100 97 116 97 34 58 123 34 108 97 98 101 108 115 34 58 123 34 102 111 111 34 58 110 117 108 108 125 44 34 114 101 115 111 117 114 99 101 86 101 114 115 105 111 110 34 58 34 49 52 50 50 34 125 125]
	, diff2=[123 34 109 101 116 97 100 97 116 97 34 58 123 34 108 97 98 101 108 115 34 58 110 117 108 108 125 125]
```

I don't speak byte slice, so this makes it a string for next time.

@sttts
2017-03-01 10:18:42 -08:00
deads2k ea887557d3 show patch error as string not byte slice 2017-03-01 11:32:16 -05:00
Maciej Szulik c272630b1b Deployments under apps/v1beta1 with new defaults 2017-03-01 15:14:41 +01:00
Kubernetes Submit Queue 3afefae02a Merge pull request #38676 from caesarxuchao/sync-gc
Automatic merge from submit-queue (batch tested with PRs 38676, 41765, 42103, 41833, 41702)

Add synchronous garbage collection

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

Split into five commits:
1. generated: don't need review
2. API: got reviewed in #38678, i addressed @lavalamp's comments there.
3. registry changes: @nikhiljindal could you help take a look?
4. gc changes: reviewed by @deads2k in #38679. It needs another pass.
5. tests: @lavalamp @deads2k could take a look?

TODO:
- [ ] Update doc. Note that the existing doc has been refactored in https://github.com/kubernetes/kubernetes.github.io/pull/2488.
- [ ] add an admission controller to check if a user can set OwnerReference.BlockOwnerDeletion
- [ ] https://github.com/kubernetes/kubernetes/pull/38676#discussion_r103277274
- [ ] split the unit tests garbagecollector_test.go according to the components tested.
- [ ] try if it's practically safe to use the cached object status in attempToDeleteItem(), after synchronous GC feature is stable. (Also see https://github.com/kubernetes/kubernetes/pull/38676#discussion_r103056971)
- [ ] add blockOwnerDeletion for rs adoption https://github.com/kubernetes/kubernetes/pull/38679#discussion_r93817284
- [ ] https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/38676/pull-kubernetes-e2e-gce-etcd3/20101/ (improve the log message)

```release-note
Added foreground garbage collection: the owner object will not be deleted until all its dependents are deleted by the garbage collector. Please checkout the [user doc](https://kubernetes.io/docs/concepts/abstractions/controllers/garbage-collection/) for details.
deleteOptions.orphanDependents is going to be deprecated in 1.7. Please use deleteOptions.propagationPolicy instead.
```
2017-03-01 01:44:02 -08:00
Kubernetes Submit Queue f1939a77b7 Merge pull request #42075 from deads2k/agg-22-auth-auto
Automatic merge from submit-queue (batch tested with PRs 41597, 42185, 42075, 42178, 41705)

auto discovery CA for extension API servers

This is what the smaller pulls were leading to.  Only the last commit is unique and I expect I'll still tweak some pod definitions, but this is where I was going.

@sttts @liggitt
2017-03-01 00:36:07 -08:00
nikhiljindal dedd20078f Adding OWNERS file for test/integration/federation 2017-03-01 00:07:16 -08:00
Chao Xu 31cb266340 tests 2017-02-28 23:05:41 -08:00
Kubernetes Submit Queue 79b5ccc176 Merge pull request #41708 from bsalamat/statefulset_spreading2
Automatic merge from submit-queue (batch tested with PRs 42200, 39535, 41708, 41487, 41335)

Add support for statefulset spreading to the scheduler

**What this PR does / why we need it**:
The scheduler SelectorSpread priority funtion didn't have the code to spread pods of StatefulSets. This PR adds StatefulSets to the list of controllers that SelectorSpread supports.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Add the support to the scheduler for spreading pods of StatefulSets.
```
2017-02-28 20:16:08 -08:00
deads2k 3d039f60cf allow incluster authentication info lookup 2017-02-28 13:29:59 -05:00
deads2k 5cfe26dece add aggregation integration test 2017-02-28 08:42:06 -05:00
Kubernetes Submit Queue 4a17b8b100 Merge pull request #42067 from deads2k/agg-21-cleanup-default
Automatic merge from submit-queue

clean up generic apiserver options

Clean up generic apiserver options before we tag any levels.  This makes them more in-line with "normal" api servers running on the platform.

Also remove dead example code.

@sttts
2017-02-28 05:23:34 -08:00
Bobby Salamat ef686716ba Add support for statefulset spreading to the scheduler 2017-02-27 18:04:08 -08:00
Kubernetes Submit Queue b796732ae7 Merge pull request #41282 from krmayankk/garbage
Automatic merge from submit-queue (batch tested with PRs 42053, 41282, 42056, 41663, 40927)

Enable Garbage collection by default for RS and RC

Fixes https://github.com/kubernetes/kubernetes/issues/40898
2017-02-27 12:45:29 -08:00
deads2k e1b40bfc5c remove example apiserver replaced by sample and test/integration/examples 2017-02-27 07:47:19 -05:00
Kubernetes Submit Queue 945b041fab Merge pull request #41165 from nikhiljindal/del202
Automatic merge from submit-queue (batch tested with PRs 41954, 40528, 41875, 41165, 41877)

Updating apiserver to return 202 when resource is being deleted asynchronously via cascading deletion

As per https://github.com/kubernetes/kubernetes/issues/33196#issuecomment-278440622.

cc @kubernetes/sig-api-machinery-pr-reviews @smarterclayton @caesarxuchao @bgrant0607 @kubernetes/api-reviewers 

```release-note
Updating apiserver to return http status code 202 for a delete request when the resource is not immediately deleted because of user requesting cascading deletion using DeleteOptions.OrphanDependents=false.
```
2017-02-26 14:54:54 -08:00
Kubernetes Submit Queue 11b9a2d038 Merge pull request #41119 from sarat-k/master
Automatic merge from submit-queue (batch tested with PRs 41701, 41818, 41897, 41119, 41562)

Optimization of on-wire information sent to scheduler extender interfaces that are stateful

The changes are to address the issue described in https://github.com/kubernetes/kubernetes/issues/40991

```release-note
Added support to minimize sending verbose node information to scheduler extender by sending only node names and expecting extenders to cache the rest of the node information
```

cc @ravigadde
2017-02-26 14:02:54 -08:00
Jordan Liggitt 41c88e0455
Revert "Merge pull request #40088 from jsafrane/storage-ga-v1"
This reverts commit 5984607cb9, reversing
changes made to 067f92e789.
2017-02-25 22:35:15 -05:00
Kubernetes Submit Queue 5984607cb9 Merge pull request #40088 from jsafrane/storage-ga-v1
Automatic merge from submit-queue (batch tested with PRs 41854, 41801, 40088, 41590, 41911)

Add storage.k8s.io/v1 API

v1 API is direct copy of v1beta1 API. This v1 API gets installed and exposed in this PR, I tested that kubectl can create both v1beta1 and v1 StorageClass.

~~Rest of Kubernetes (controllers, examples,. tests, ...) still use v1beta1 API, I will update it when this PR gets merged as these changes would get lost among generated code.~~ Most parts use v1 API now, it would not compile / run tests without it.

**Release note**:
```
Kubernetes API storage.k8s.io for storage objects is now fully supported and is available as storage.k8s.io/v1. Beta version of the API storage.k8s.io/v1beta1 is still available in this release, however it will be removed in a future Kubernetes release.

Together with the API endpoint, StorageClass annotation "storageclass.beta.kubernetes.io/is-default-class" is deprecated and  "storageclass.kubernetes.io/is-default-class" should be used instead to mark a default storage class. The beta annotation is still working in this release, however it won't be supported in the next one.
```

@kubernetes/sig-storage-misc
2017-02-25 05:02:55 -08:00
Kubernetes Submit Queue 8e6af485f9 Merge pull request #41918 from ncdc/shared-informers-14-scheduler
Automatic merge from submit-queue (batch tested with PRs 41714, 41510, 42052, 41918, 31515)

Switch scheduler to use generated listers/informers

Where possible, switch the scheduler to use generated listers and
informers. There are still some places where it probably makes more
sense to use one-off reflectors/informers (listing/watching just a
single node, listing/watching scheduled & unscheduled pods using a field
selector).

I think this can wait until master is open for 1.7 pulls, given that we're close to the 1.6 freeze.

After this and #41482 go in, the only code left that references legacylisters will be federation, and 1 bit in a stateful set unit test (which I'll clean up in a follow-up).

@resouer I imagine this will conflict with your equivalence class work, so one of us will be doing some rebasing 😄 

cc @wojtek-t @gmarek  @timothysc @jayunit100 @smarterclayton @deads2k @liggitt @sttts @derekwaynecarr @kubernetes/sig-scheduling-pr-reviews @kubernetes/sig-scalability-pr-reviews
2017-02-25 02:17:55 -08:00
Jan Safranek fa93f1c411 Update imports 2017-02-24 13:52:16 +01:00
Mayank Kumar 6b35ff72ce Enable Garbage collection by default for RS and RC 2017-02-23 22:37:52 -08:00
Kubernetes Submit Queue 51f498f6f3 Merge pull request #41645 from ncdc/shared-informers-12-admission
Automatic merge from submit-queue (batch tested with PRs 41667, 41820, 40910, 41645, 41361)

Switch admission to use shared informers

Originally part of #40097

cc @smarterclayton @derekwaynecarr @deads2k @liggitt @sttts @gmarek @wojtek-t @timothysc @lavalamp @kubernetes/sig-scalability-pr-reviews @kubernetes/sig-api-machinery-pr-reviews
2017-02-23 20:57:31 -08:00
nikhiljindal 4895aeef37 Adding an integration test for testing 202 status code from apiserver 2017-02-23 16:28:10 -08:00
Sarat Kamisetty dda62ec207 - scheduler extenders that are capable of maintaining their own
node cache don't need to get all the information about every
  candidate node. For huge clusters, sending full node information
  of all nodes in the cluster on the wire every time a pod is scheduled
  is expensive. If the scheduler is capable of caching node information
  along with its capabilities, sending node name alone is sufficient.
  These changes provide that optimization in a backward compatible way

- removed the inadvertent signature change of Prioritize() function
- added defensive checks as suggested
-  added annotation specific test case
- updated the comments in the scheduler types
- got rid of apiVersion thats unused
- using *v1.NodeList as suggested
- backing out pod annotation update related changes made in the
  1st commit
- Adjusted the comments in types.go and v1/types.go as suggested
  in the code review
2017-02-23 10:25:42 -08:00
Kubernetes Submit Queue e5c2d716d9 Merge pull request #41887 from liggitt/watch-verb
Automatic merge from submit-queue (batch tested with PRs 39855, 41433, 41567, 41887, 41652)

Use watch param instead of deprecated /watch/ prefix

Reopen of https://github.com/kubernetes/kubernetes/pull/41722 after reverted in https://github.com/kubernetes/kubernetes/pull/41774

Required https://github.com/kubernetes/kubernetes/pull/41797 to merge first

cc @deads2k @wojtek-t
2017-02-23 09:36:35 -08:00
Andy Goldstein 022bff7fbe Switch admission to use shared informers 2017-02-23 11:16:09 -05:00
Andy Goldstein 9d8d6ad16c Switch scheduler to use generated listers/informers
Where possible, switch the scheduler to use generated listers and
informers. There are still some places where it probably makes more
sense to use one-off reflectors/informers (listing/watching just a
single node, listing/watching scheduled & unscheduled pods using a field
selector).
2017-02-23 09:57:12 -05:00
Derek Carr b8676e4763 Fix flake in quota integration test 2017-02-22 09:57:20 -05:00
Jordan Liggitt 7b6ef2cedc
Switch watch prefixes to params 2017-02-22 08:54:08 -05:00
Jordan Liggitt e6dbe5f57e
Pass typed options to dynamic client 2017-02-22 08:53:57 -05:00
Wojciech Tyczynski a21b08d00f Revert "Use watch param instead of deprecated /watch/ prefix" 2017-02-21 08:37:51 +01:00
Kubernetes Submit Queue dfacc61c5f Merge pull request #41722 from liggitt/watch-prefix
Automatic merge from submit-queue (batch tested with PRs 41421, 41440, 36765, 41722)

Use watch param instead of deprecated /watch/ prefix

Switches clients to use watch param instead of /watch/ prefix

```release-note
Clients now use the `?watch=true` parameter to make watch API calls, instead of the `/watch/` path prefix
```
2017-02-20 10:37:44 -08:00
Jordan Liggitt f950171003
Switch watch prefixes to params 2017-02-19 23:51:58 -05:00
Jordan Liggitt 308fdcd13f
Pass typed options to dynamic client 2017-02-19 22:12:55 -05:00
Derek Carr 3fad0cb52a Implement support for limited resources in quota 2017-02-18 12:10:22 -05:00
Kubernetes Submit Queue 97921ff38e Merge pull request #41195 from wojtek-t/remove_default_failure_domains
Automatic merge from submit-queue (batch tested with PRs 41401, 41195, 41664, 41521, 41651)

Remove default failure domains from anti-affinity feature

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

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

@timothysc
2017-02-17 19:46:40 -08:00
Kubernetes Submit Queue 7da78faf06 Merge pull request #41273 from wongma7/pv-controller-shared
Automatic merge from submit-queue (batch tested with PRs 41604, 41273, 41547)

Switch pv controller to shared informer

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

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

cc @ncdc because I copied what you did in your other PRs.
2017-02-17 07:20:35 -08:00
Kubernetes Submit Queue b625fea27e Merge pull request #41494 from jayunit100/sched_per_warn
Automatic merge from submit-queue (batch tested with PRs 41517, 41494, 41163)

Make scheduler_perf warn rather then fail if scheduling rate is betwe…

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

Fix scheduler per bench tests so they pass even if there is a cold interval .

**Special notes for your reviewer**:

This wont effect CI, as this bench test is run manually by devs.
2017-02-16 21:16:03 -08:00
Aaron Crickenberger b367f33bc2 Allow `make test-integration` to pass on OSX
`/var/run` is not world-writable on my OSX 10.11.x setup, so tests that
standup a secure apiserver fail with the default cert dir.  Use a
tempdir instead.
2017-02-16 12:14:40 -08:00
Matthew Wong 33f98d4db3 Switch pv controller to shared informers 2017-02-16 10:08:23 -05:00
jayunit100 11ab4ba58e Make scheduler_perf warn rather then fail if scheduling rate is between 30 and 100. 2017-02-16 08:44:19 -05:00
Wojciech Tyczynski 3de7195cf8 Remove default failure domains from anti-affinity feature 2017-02-16 13:32:34 +01:00
Kubernetes Submit Queue 84bab780d6 Merge pull request #41425 from ncdc/shared-informers-10-serviceaccount
Automatic merge from submit-queue

Switch serviceaccounts controller to generated shared informers

Originally part of #40097 

cc @deads2k @sttts @liggitt @smarterclayton @gmarek @wojtek-t @timothysc @kubernetes/sig-scalability-pr-reviews
2017-02-15 20:54:17 -08:00
Kubernetes Submit Queue 1ad5cea24e Merge pull request #41261 from ncdc/shared-informers-07-resourcequota
Automatic merge from submit-queue

Switch resourcequota controller to shared informers

Originally part of #40097 

I have had some issues with this change in the past, when I updated `pkg/quota` to use the new informers while `pkg/controller/resourcequota` remained on the old informers. In this PR, both are switched to using the new informers. The issues in the past were lots of flakey test failures in the ResourceQuota e2es, where it would randomly fail to see deletions and handle replenishment. I am hoping that now that everything here is consistently using the new informers, there won't be any more of these flakes, but it's something to keep an eye out for.

I also think `pkg/controller/resourcequota` could be cleaned up. I don't think there's really any need for `replenishment_controller.go` any more since it's no longer running individual controllers per kind to replenish. It instead just uses the shared informer and adds event handlers to it. But maybe we do that in a follow up.

cc @derekwaynecarr @smarterclayton @wojtek-t @deads2k @sttts @liggitt @timothysc @kubernetes/sig-scalability-pr-reviews
2017-02-15 11:37:04 -08:00
Dr. Stefan Schimanski 0e9c1f75bf Update bazel 2017-02-15 10:25:15 +01:00
Dr. Stefan Schimanski 5e77d01897 k8s.io/apiserver: straighten EtcdOptions, backend Config and kube RESTOptionsFactory 2017-02-15 10:24:59 +01:00
Dr. Stefan Schimanski 27e01b5c46 k8s.io/apiserver: fixup imports and renamed packages 2017-02-15 10:24:58 +01:00
Andy Goldstein 65fe722643 Switch serviceaccounts controller to generated shared informers 2017-02-14 14:21:14 -05:00
Andy Goldstein d820e3928c Switch resourcequota controller to shared informers 2017-02-14 12:20:27 -05:00
Jordan Liggitt 2a76fa1c8f
Switch RBAC subject apiVersion to apiGroup in v1beta1 2017-02-13 15:33:09 -05:00
deads2k fd34b11e13 react to informer updates 2017-02-13 09:18:32 -05:00
deads2k a86fabb9d2 regenerate informers 2017-02-13 07:59:34 -05:00
Kubernetes Submit Queue 03bde62666 Merge pull request #41214 from ncdc/shared-informers-06-hpa
Automatic merge from submit-queue (batch tested with PRs 41248, 41214)

Switch hpa controller to shared informer

**What this PR does / why we need it**: switch the hpa controller to use a shared informer

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

**Special notes for your reviewer**: Only the last commit is relevant. The others are from #40759, #41114, #41148  

**Release note**:

```release-note
```

cc @smarterclayton @deads2k @sttts @liggitt @DirectXMan12 @timothysc @kubernetes/sig-scalability-pr-reviews @jszczepkowski @mwielgus @piosz
2017-02-10 10:03:44 -08:00
Kubernetes Submit Queue fa93babcbd Merge pull request #41248 from jayunit100/fix-node-selector
Automatic merge from submit-queue (batch tested with PRs 41248, 41214)

Quick fix to node affinity matching

Quick fix to #41171
2017-02-10 10:03:42 -08:00
jayunit100 720ec52d5b Quick fix to node affinity matching 2017-02-10 10:37:51 -05:00
Andy Goldstein 74186d3e06 Switch disruption controller to shared informers 2017-02-10 09:27:54 -05:00
Kubernetes Submit Queue 8188c3cca4 Merge pull request #40796 from wojtek-t/use_node_ttl_in_secret_manager
Automatic merge from submit-queue (batch tested with PRs 40796, 40878, 36033, 40838, 41210)

Implement TTL controller and use the ttl annotation attached to node in secret manager

For every secret attached to a pod as volume, Kubelet is trying to refresh it every sync period. Currently Kubelet has a ttl-cache of secrets of its pods and the ttl is set to 1 minute. That means that in large clusters we are targetting (5k nodes, 30pods/node), given that each pod has a secret associated with ServiceAccount from its namespaces, and with large enough number of namespaces (where on each node (almost) every pod is from a different namespace), that resource in ~30 GETs to refresh all secrets every minute from one node, which gives ~2500QPS for GET secrets to apiserver.

Apiserver cannot keep up with it very easily.

Desired solution would be to watch for secret changes, but because of security we don't want a node watching for all secrets, and it is not possible for now to watch only for secrets attached to pods from my node.

So as a temporary solution, we are introducing an annotation that would be a suggestion for kubelet for the TTL of secrets in the cache and a very simple controller that would be setting this annotation based on the cluster size (the large cluster is, the bigger ttl is). 
That workaround mean that only very local changes are needed in Kubelet, we are creating a well separated very simple controller, and once watching "my secrets" will be possible it will be easy to remove it and switch to that. And it will allow us to reach scalability goals.

@dchen1107 @thockin @liggitt
2017-02-10 00:04:44 -08:00
Kubernetes Submit Queue 2b2af10a50 Merge pull request #41181 from tanshanshan/fix-wrong-shell
Automatic merge from submit-queue (batch tested with PRs 40917, 41181, 41123, 36592, 41183)

fix scheduler performance test script 

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

 

 `test-performance.sh` is  in  dir `kubernetes/test/integration/scheduler_perf`

the  dir `kubernetes/test/component/scheduler/perf`  does not exist

Thanks.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-02-09 23:10:44 -08:00
Wojciech Tyczynski dcf8a85fdf Add integration test for ttlcontroller. 2017-02-09 14:50:24 +01:00
tanshanshan 94b8c43b84 fix the wrong test path 2017-02-09 15:16:11 +08:00
deads2k 7cb5463b26 create sample-apiserver repo for people to inspect 2017-02-08 10:35:29 -05:00
deads2k a463540d47 remove duplication of RESTOptionsGetter for kube 2017-02-08 09:08:58 -05:00
Kubernetes Submit Queue 98a16d69bb Merge pull request #41031 from deads2k/agg-02-cleanup
Automatic merge from submit-queue (batch tested with PRs 41023, 41031, 40947)

scrub aggregator names to eliminate discovery

Cleanup old uses of `discovery`.  Also removes the legacy functionality.

@kubernetes/sig-api-machinery-misc @sttts
2017-02-07 09:04:40 -08:00
Kubernetes Submit Queue 9abfa6b446 Merge pull request #40385 from ncdc/shared-informers-02-swap-existing
Automatic merge from submit-queue

Replace hand-written informers with generated ones

Replace existing uses of hand-written informers with generated ones.
Follow-up commits will switch the use of one-off informers to shared
informers.

This is a precursor to #40097. That PR will switch one-off informers to shared informers for the majority of the code base (but not quite all of it...).

NOTE: this does create a second set of shared informers in the kube-controller-manager. This will be resolved back down to a single factory once #40097 is reviewed and merged.

There are a couple of places where I expanded the # of caches we wait for in the calls to `WaitForCacheSync` - please pay attention to those. I also added in a commented-out wait in the attach/detach controller. If @kubernetes/sig-storage-pr-reviews is ok with enabling the waiting, I'll do it (I'll just need to tweak an integration test slightly).

@deads2k @sttts @smarterclayton @liggitt @soltysh @timothysc @lavalamp @wojtek-t @gmarek @sjenning @derekwaynecarr @kubernetes/sig-scalability-pr-reviews
2017-02-06 16:25:42 -08:00