Commit Graph

1399 Commits (4ba3218336c55dfae9b81d5bed3cc7296ec0a82f)

Author SHA1 Message Date
Dr. Stefan Schimanski 2452afffe0 admission: wire create+update validation func into kube registries 2017-11-02 09:29:16 +01:00
Ferran Rodenas d67898b875 Check RegisterMetricAndTrackRateLimiterUsage error when starting controllers
Signed-off-by: Ferran Rodenas <rodenasf@vmware.com>
2017-11-01 12:46:07 +01:00
Kubernetes Submit Queue f65e55146e
Merge pull request #52607 from zhangxiaoyu-zidif/optimize-intergration-test-rs
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

optimize speed of integration test:rc

**What this PR does / why we need it**:
optimize the speed of integration test for rc

**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**:
```shell
make test-integration WHAT=./test/integration/replicaset GOFLAGS="-v" KUBE_TEST_ARGS="-run ^TestUpdateSelectorToRemoveControllerRef$"

**Before modification:**

Replicates test:
--- PASS: TestUpdateSelectorToRemoveControllerRef (32.70s)
	replicaset_test.go:377: patched rs = &v1beta1.ReplicaSet{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"rs", GenerateName:"", Namespace:"rs-update-selector-to-remove-controllerref", SelfLink:"/apis/extensions/v1beta1/namespaces/rs-update-selector-to-remove-controllerref/replicasets/rs", UID:"12cb97ec-9b59-11e7-a829-186590dec5c5", ResourceVersion:"100", Generation:2, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63641216052, loc:(*time.Location)(0x91f6800)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"name":"test"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:v1beta1.ReplicaSetSpec{Replicas:(*int32)(0xc4227a7ad4), MinReadySeconds:0, Selector:(*v1.LabelSelector)(0xc42035dfe0), Template:v1.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"name":"test", "uniqueKey":"1"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:v1.PodSpec{Volumes:[]v1.Volume(nil), InitContainers:[]v1.Container(nil), Containers:[]v1.Container{v1.Container{Name:"fake-name", Image:"fakeimage", Command:[]string(nil), Args:[]string(nil), WorkingDir:"", Ports:[]v1.ContainerPort(nil), EnvFrom:[]v1.EnvFromSource(nil), Env:[]v1.EnvVar(nil), Resources:v1.ResourceRequirements{Limits:v1.ResourceList(nil), Requests:v1.ResourceList(nil)}, VolumeMounts:[]v1.VolumeMount(nil), LivenessProbe:(*v1.Probe)(nil), ReadinessProbe:(*v1.Probe)(nil), Lifecycle:(*v1.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"Always", SecurityContext:(*v1.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, RestartPolicy:"Always", TerminationGracePeriodSeconds:(*int64)(0xc4227a7b90), ActiveDeadlineSeconds:(*int64)(nil), DNSPolicy:"ClusterFirst", NodeSelector:map[string]string(nil), ServiceAccountName:"", DeprecatedServiceAccount:"", AutomountServiceAccountToken:(*bool)(nil), NodeName:"", HostNetwork:false, HostPID:false, HostIPC:false, SecurityContext:(*v1.PodSecurityContext)(0xc422fa6380), ImagePullSecrets:[]v1.LocalObjectReference(nil), Hostname:"", Subdomain:"", Affinity:(*v1.Affinity)(nil), SchedulerName:"default-scheduler", Tolerations:[]v1.Toleration(nil), HostAliases:[]v1.HostAlias(nil), PriorityClassName:"", Priority:(*int32)(nil)}}}, Status:v1beta1.ReplicaSetStatus{Replicas:2, FullyLabeledReplicas:2, ReadyReplicas:0, AvailableReplicas:0, ObservedGeneration:1, Conditions:[]v1beta1.ReplicaSetCondition(nil)}}
PASS
ok  	k8s.io/kubernetes/test/integration/replicaset	**32.810s**
+++ [0917 11:34:42] Cleaning up etcd
+++ [0917 11:34:42] Integration test cleanup complete


**After modification:**
--- PASS: TestUpdateSelectorToRemoveControllerRef (3.10s)
	replicaset_test.go:377: patched rs = &v1beta1.ReplicaSet{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"rs", GenerateName:"", Namespace:"rs-update-selector-to-remove-controllerref", SelfLink:"/apis/extensions/v1beta1/namespaces/rs-update-selector-to-remove-controllerref/replicasets/rs", UID:"5b2fa66f-9b5b-11e7-bf1a-186590dec5c5", ResourceVersion:"100", Generation:2, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63641217033, loc:(*time.Location)(0x91f6800)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"name":"test"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:v1beta1.ReplicaSetSpec{Replicas:(*int32)(0xc4225dd374), MinReadySeconds:0, Selector:(*v1.LabelSelector)(0xc422f08e40), Template:v1.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"name":"test", "uniqueKey":"1"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:v1.PodSpec{Volumes:[]v1.Volume(nil), InitContainers:[]v1.Container(nil), Containers:[]v1.Container{v1.Container{Name:"fake-name", Image:"fakeimage", Command:[]string(nil), Args:[]string(nil), WorkingDir:"", Ports:[]v1.ContainerPort(nil), EnvFrom:[]v1.EnvFromSource(nil), Env:[]v1.EnvVar(nil), Resources:v1.ResourceRequirements{Limits:v1.ResourceList(nil), Requests:v1.ResourceList(nil)}, VolumeMounts:[]v1.VolumeMount(nil), LivenessProbe:(*v1.Probe)(nil), ReadinessProbe:(*v1.Probe)(nil), Lifecycle:(*v1.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"Always", SecurityContext:(*v1.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, RestartPolicy:"Always", TerminationGracePeriodSeconds:(*int64)(0xc4225dd3f0), ActiveDeadlineSeconds:(*int64)(nil), DNSPolicy:"ClusterFirst", NodeSelector:map[string]string(nil), ServiceAccountName:"", DeprecatedServiceAccount:"", AutomountServiceAccountToken:(*bool)(nil), NodeName:"", HostNetwork:false, HostPID:false, HostIPC:false, SecurityContext:(*v1.PodSecurityContext)(0xc423096ac0), ImagePullSecrets:[]v1.LocalObjectReference(nil), Hostname:"", Subdomain:"", Affinity:(*v1.Affinity)(nil), SchedulerName:"default-scheduler", Tolerations:[]v1.Toleration(nil), HostAliases:[]v1.HostAlias(nil), PriorityClassName:"", Priority:(*int32)(nil)}}}, Status:v1beta1.ReplicaSetStatus{Replicas:2, FullyLabeledReplicas:2, ReadyReplicas:0, AvailableReplicas:0, ObservedGeneration:1, Conditions:[]v1beta1.ReplicaSetCondition(nil)}}
PASS
ok  	k8s.io/kubernetes/test/integration/replicaset	**3.216s**
+++ [0917 11:50:33] Cleaning up etcd
+++ [0917 11:50:33] Integration test cleanup complete
```

**Release note**:

```release-note
NONE
```
2017-10-31 20:10:24 -07:00
Kubernetes Submit Queue 725fc6228e
Merge pull request #54326 from crimsonfaith91/dover
Automatic merge from submit-queue (batch tested with PRs 54326, 54046). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

convert testOverlappingDeployment e2e test to integration test

**What this PR does / why we need it**:
This PR convert a deployment e2e test named "testOverlappingDeployment" to integration test.

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

**Release note**:

```release-note
NONE
```
2017-10-31 14:13:17 -07:00
Kubernetes Submit Queue 3c6ff87fa5
Merge pull request #52192 from liyinan926/ds-tests
Automatic merge from submit-queue (batch tested with PRs 54774, 54820, 52192, 54827). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Initial integration test setup for DaemonSet controller

**What this PR does / why we need it**:
This PR setup and added some initial integration tests for the DaemonSet controller. All tests included were ported from their unit test counterparts that currently use fake client, informers, reactor, etc. Future PRs will port more tests over once this PR is approved and merged.

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

**Special notes for your reviewer**:
@kow3ns 

**Release note**:
```release-note
NONE
```
2017-10-31 13:22:20 -07:00
Jun Xiang Tee 131f7e1469 convert testOverlappingDeployment e2e test to integration test 2017-10-31 11:39:27 -07:00
Yinan Li 4dc42d078b Initial integration test setup for DaemonSet controller 2017-10-31 10:53:30 -07:00
zhangxiaoyu-zidif e64c75cdfd optimize-intergration-test-rc 2017-10-31 10:19:27 +08:00
Kubernetes Submit Queue 7a944a69d6
Merge pull request #54485 from sttts/sttts-unify-admission-constructors
Automatic merge from submit-queue (batch tested with PRs 54761, 54748, 53991, 54485, 46951). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

admission: unify plugin constructors

It's common in Go to return the actual object in constructors, not **one interface**
it implements. This allows us to implement multiple interfaces, but only have
one constructor. As having private types in constructors, we export all plugin structs, of course with private fields.

Note: super interfaces do not work if there are overlapping methods.
2017-10-30 15:38:33 -07:00
Dr. Stefan Schimanski 131905cdb8 admission: unify plugin constructors 2017-10-30 16:56:38 +01:00
Jordan Liggitt 1a8bed4b7e
Test scale subresource discovery 2017-10-27 23:57:39 -04:00
Kubernetes Submit Queue 27ef37a32d
Merge pull request #54320 from derekwaynecarr/quota-update
Automatic merge from submit-queue (batch tested with PRs 54331, 54655, 54320, 54639, 54288). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Ability to do object count quota for all namespaced resources

**What this PR does / why we need it**:
- Defines syntax for generic object count quota `count/<resource>.<group>`
- Migrates existing objects to support new syntax with old syntax
- Adds support to quota all standard namespace resources 
- Updates the controller to do discovery and replenishment on those resources
- Updates unit tests
- Tweaks admission configuration around quota
- Add e2e test for replicasets (demonstrate dynamic generic counting)

```
$  kubectl create quota test --hard=count/deployments.extensions=2,count/replicasets.extensions=4,count/pods=3,count/secrets=4
resourcequota "test" created
$ kubectl run nginx --image=nginx --replicas=2
$ kubectl describe quota
Name:                         test
Namespace:                    default
Resource                      Used  Hard
--------                      ----  ----
count/deployments.extensions  1     2
count/pods                    2     3
count/replicasets.extensions  1     4
count/secrets                 1     4
```

**Special notes for your reviewer**:
- simple object count quotas no longer require writing code
- deferring support for custom resources pending investigation about how to share caches with garbage collector.  in addition, i would like to see how this integrates with downstream quota usage in openshift.

**Release note**:
```release-note
Object count quotas supported on all standard resources using `count/<resource>.<group>` syntax
```
2017-10-27 15:42:24 -07:00
Kubernetes Submit Queue 84284c0ba4
Merge pull request #54331 from crimsonfaith91/dfailed
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

convert testFailedDeployment e2e test to integration test

**What this PR does / why we need it**:
This PR convert a deployment e2e test named "testFailedDeployment" to integration test.

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

**Release note**:

```release-note
NONE
```
/assign
2017-10-27 15:19:20 -07:00
Jun Xiang Tee 21bc54508b convert testFailedDeployment e2e test to integration test 2017-10-27 13:19:50 -07:00
Derek Carr a9765bcebe Update e2e and integration tests 2017-10-27 11:08:30 -04:00
Kevin 4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Maru Newby adc338d330 Remove all traces of federation 2017-10-26 13:37:37 -07:00
Kubernetes Submit Queue d9e529adbd Merge pull request #54105 from janetkuo/e2e-deploy-inte-label-adopted
Automatic merge from submit-queue (batch tested with PRs 54593, 54607, 54539, 54105). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Move deployment e2e test for hash label adoption to integration

**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)*: #52113

**Special notes for your reviewer**: depends on #53918

**Release note**:

```release-note
NONE
```
2017-10-26 11:13:44 -07:00
Kubernetes Submit Queue 278b7cc637 Merge pull request #52479 from wanghaoran1988/issue_52254
Automatic merge from submit-queue (batch tested with PRs 52479, 53956). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update scheduler to use schedulerName selector

**What this PR does / why we need it**:
Update scheduler to use schedulerName selector when select pods in the podInformer
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #52254

**Special notes for your reviewer**:

**Release note**:

```
None
```
2017-10-24 00:48:23 -07:00
Haoran Wang 4b185b4db9 update scheduler to use schedulerName selector 2017-10-24 13:31:38 +08:00
Janet Kuo f7f1f17c89 Move deployment e2e test for hash label adoption to integration 2017-10-23 21:35:19 -07:00
Janet Kuo 1ca6120af3 Move deployment e2e test for rollback with no revision to integration 2017-10-23 18:58:05 -07:00
Kubernetes Submit Queue 6a444673b9 Merge pull request #53914 from bsalamat/pdb
Automatic merge from submit-queue (batch tested with PRs 53903, 53914, 54374). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add PodDisruptionBudget to scheduler cache.

**What this PR does / why we need it**:
This is the first step to add support for PodDisruptionBudget during preemption. This PR adds PDB to scheduler cache.

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

**Release note**:

```release-note
Add PodDisruptionBudget to scheduler cache.
```

ref/ #53913
2017-10-23 12:27:06 -07:00
Bobby (Babak) Salamat efc151f46b Autogenerated files 2017-10-20 23:22:03 -07:00
Bobby (Babak) Salamat 9a5d058e5e Add PodDisruptionBudget to scheduler cache. 2017-10-20 23:22:02 -07:00
Kubernetes Submit Queue 2523e3ebae Merge pull request #53759 from anfernee/sched-test
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make scheduler integration test faster

Not to wait for 30 seconds for every negative test case. This commit
also organizes the test code to make it more readable.

It cuts the test time from 450s to 125s.

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

**Special notes for your reviewer**:

**Release note**: 
```release-note
NONE
```
2017-10-19 16:50:58 -07:00
Dr. Stefan Schimanski cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Yongkun Anfernee Gui dc15e9cf90 Make scheduler integration test faster
Not to wait for 30 seconds for every negative test case. It cuts the
test time from 450s to 125s.
2017-10-17 10:32:46 -07:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue aaf14d4619 Merge pull request #53525 from sttts/sttts-scheme-copier-romoval
Automatic merge from submit-queue (batch tested with PRs 53525, 53652). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apimachinery: remove ObjectCopier interface(s)

The big commit is a mechanical, transitive removal of the copier interfaces in all structs and function calls.
2017-10-10 08:31:41 -07:00
Jun Xiang Tee b37f69e95f revamp replicaset integration tests 2017-10-09 17:14:08 -07:00
Dr. Stefan Schimanski 509df603b1 apimachinery: mechanical removal of ObjectCopier plumbing 2017-10-06 19:21:03 +02:00
Kubernetes Submit Queue aeb4989bd6 Merge pull request #53184 from k82cn/k8s_42001_6
Automatic merge from submit-queue (batch tested with PRs 53278, 53184). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Added integration test for TaintNodeByCondition.

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

**Release note**:

```release-note
Added integration test for TaintNodeByCondition.
```
2017-10-05 21:58:44 -07:00
Klaus Ma b1e3e41381 Added integration test for TaintNodeByCondition. 2017-10-06 10:00:13 +08:00
Janet Kuo 9813a5278f Add API version apps/v1
Add a new API version apps/v1.
apps/v1 has a copy of apps/v1beta2.DaemonSet API.
2017-10-05 10:43:11 -07:00
Jordan Liggitt e45ed2d5b9
fix typo in health check url 2017-10-03 16:44:38 -04:00
Kubernetes Submit Queue aa7d9b1da9 Merge pull request #52950 from liggitt/persist-rbac-v1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Change RBAC storage version to v1 for 1.9

v1 was introduced in 1.8, but storage version remained at v1beta1 to accommodate HA rolling upgrades. in 1.9, we can change the persisted and preferred version to v1

```release-note
RBAC objects are now stored in etcd in v1 format. After completing an upgrade to 1.9, RBAC objects (Roles, RoleBindings, ClusterRoles, ClusterRoleBindings) should be migrated to ensure all persisted objects are written in `v1` format, prior to `v1alpha1` support being removed in a future release.
```
2017-10-03 00:24:31 -07:00
Kubernetes Submit Queue 1ddf2e8ab9 Merge pull request #52742 from apelisse/validate-resource-even-if-unregistered
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

openapi: Validate unregistered type, if they can be found

**What this PR does / why we need it**:
Types that are not registered/hard-coded in kubectl won't be validated, even if they could because they are defined in openapi. If they are neither registered nor in openapi, then skip validation. 

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-10-02 07:14:02 -07:00
Antoine Pelisse d13c6d77eb openapi: Validate unregistered type, if they can be found 2017-09-29 20:22:15 -07:00
shashidharatd ec629ca126 Auto generated build files 2017-09-28 11:43:35 +05:30
shashidharatd a570d316b8 Move k/test/integration/federation to k/federation/test/integration 2017-09-28 11:43:35 +05:30
Kubernetes Submit Queue 52f96dae45 Merge pull request #52896 from janetkuo/deploy-hash-inte
Automatic merge from submit-queue (batch tested with PRs 52721, 53057, 52493, 52998, 52896). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move deployment collision avoidance e2e test to integration

**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)*: ref #52113

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-26 15:51:25 -07:00
Janet Kuo 24eb21e6cf Use PollImmediate and shorter interval in integration test 2017-09-25 14:17:43 -07:00
Janet Kuo 3a0dabcaea Refactor function 2017-09-25 10:27:31 -07:00
Janet Kuo 241f4fbc98 Move deployment collision avoidance e2e test to integration 2017-09-25 10:27:31 -07:00
Jordan Liggitt 232db3b888
Change RBAC storage version to v1 for 1.9 2017-09-25 10:02:21 -04:00
Kubernetes Submit Queue 7c9e614cbb Merge pull request #52873 from ixdy/bazel-cleanup
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

bazel: build/test almost everything

**What this PR does / why we need it**: Miscellaneous cleanups and bug fixes. The main motivating idea here was to make `bazel build //...` and `bazel test //...` mostly work. (There's a few reasons these still don't work, but we're a lot closer.)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @BenTheElder @mikedanese @spxtr
2017-09-24 00:04:36 -07:00
Kubernetes Submit Queue 7240b1e2ee Merge pull request #52069 from shiywang/cleanup-api
Automatic merge from submit-queue (batch tested with PRs 51929, 52015, 51906, 52069, 51542). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

move specialDefaultResourcePrefixes out of vendor/k8s.io/apiserver

just a clean-up, fixes TODO: move out of this package, it is not generic
@sttts PTAL
/assign @sttts
2017-09-23 06:16:15 -07:00
Jeff Grafton 04b0468464 add tags to e2e and integration tests 2017-09-21 15:53:23 -07:00
Michail Kargakis a702742d31
Remove kargakis from OWNERS, add tnozicka
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-09-19 11:05:23 +02:00
Bobby (Babak) Salamat e38d4a0a8f Add bsalamat to sig-scheduling-maintainers 2017-09-11 11:10:57 -07:00
Kubernetes Submit Queue f695a3120a Merge pull request #50949 from bsalamat/preemption_eviction
Automatic merge from submit-queue

Add pod preemption to the scheduler

**What this PR does / why we need it**:
This is the last of a series of PRs to add priority-based preemption to the scheduler. This PR connects the preemption logic to the scheduler workflow.

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

**Special notes for your reviewer**:
This PR includes other PRs which are under review (#50805, #50405, #50190). All the new code is located in 43627afdf9.

**Release note**:

```release-note
Add priority-based preemption to the scheduler.
```

ref/ #47604

/assign @davidopp 

@kubernetes/sig-scheduling-pr-reviews
2017-09-08 14:19:42 -07:00
Kubernetes Submit Queue 63d6bdb58c Merge pull request #51900 from sttts/sttts-informer-stratification
Automatic merge from submit-queue (batch tested with PRs 51900, 51782, 52030)

apiservers: stratify versioned informer construction

The versioned share informer factory has been part of the GenericApiServer config,
but its construction depended on other fields of that config (e.g. the loopback
client config). Hence, the order of changes to the config mattered.

This PR stratifies this by moving the SharedInformerFactory from the generic Config
to the CompleteConfig struct. Hence, it is only filled during completion when it is
guaranteed that the loopback client config is set.

While doing this, the CompletedConfig construction is made more type-safe again,
i.e. the use of SkipCompletion() is considereably reduced. This is archieved by
splitting the derived apiserver Configs into the GenericConfig and the ExtraConfig
part. Then the completion is structural again because CompleteConfig is again
of the same structure: generic CompletedConfig and local completed ExtraConfig.

Fixes #50661.
2017-09-08 09:46:29 -07:00
Dr. Stefan Schimanski d99c7df360 kube-aggregator: use shared informers from RecommendedConfig 2017-09-08 16:12:54 +02:00
Dr. Stefan Schimanski 2b64d3a0fd apiserver: split core API creation from secure serving 2017-09-08 14:38:11 +02:00
Dr. Stefan Schimanski ca3f745346 apiserver: stratify versioned informer construction 2017-09-08 14:16:09 +02:00
Dr. Stefan Schimanski 7d09148ad7 apiserver: separate apiserver specific configs into ExtraConfig 2017-09-08 14:16:09 +02:00
Kubernetes Submit Queue 45fe0a9e04 Merge pull request #51932 from dixudx/fix_forbidden_messages
Automatic merge from submit-queue

fix format of forbidden messages

**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 #51813

**Special notes for your reviewer**:
/assign @deads2k @liggitt 

**Release note**:

```release-note
None
```
2017-09-08 03:57:04 -07:00
Di Xu 95738d5a0e fix format of forbidden messages 2017-09-08 09:20:13 +08:00
Bobby (Babak) Salamat 86b06c3832 autogenerated files 2017-09-07 15:31:55 -07:00
Bobby (Babak) Salamat 4a08dff168 Add pod eviction logic for scheduler preemption
Add Preempt to scheduler interface
Add preemption to the scheduling workflow
Minor changes to the scheduler integration test library
2017-09-07 15:31:55 -07:00
Kubernetes Submit Queue f4f21b3f06 Merge pull request #52054 from janetkuo/pause-dep-integra
Automatic merge from submit-queue (batch tested with PRs 52097, 52054)

Move paused deployment e2e tests to integration

**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)*: xref #52113

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-07 15:28:25 -07:00
Janet Kuo b646a72938 Address comments 2017-09-07 13:09:05 -07:00
Shiyang Wang 0084d70b56 move specialDefaultResourcePrefixes out of vendor/k8s.io/apiserver 2017-09-07 10:19:30 +08:00
Janet Kuo 124344a1a4 Move paused deployment e2e tests to integration 2017-09-06 18:12:28 -07:00
Solly Ross b0af402475 Move Autoscaling v2{alpha1 --> beta1}
This commit renames autoscaling/v2alpha1 to autoscaling/v2beta1.
Only the API-related code is moved in this commit.
2017-09-05 17:49:30 -04:00
Maciej Szulik 6962427b35
Enable batch/v1beta1.CronJobs by default 2017-09-03 11:17:33 +02:00
Kubernetes Submit Queue 35ffb5c6cf Merge pull request #48921 from smarterclayton/paging_prototype
Automatic merge from submit-queue (batch tested with PRs 50832, 51119, 51636, 48921, 51712)

Alpha list paging implementation

Design in kubernetes/community#896

Support `?limit=NUMBER`, `?continue=CONTINUATIONTOKEN`, and a `continue` field
on ListMeta and pass through to etcd. Perform minor validation as an example.

```
# first out of three
$ curl http://127.0.0.1:8080/api/v1/namespaces?limit=1
{
  "kind": "NamespaceList",
  "apiVersion": "v1",
  "metadata": {
    "selfLink": "/api/v1/namespaces",
    "resourceVersion": "146",
    "next": "ZGVmYXVsdA"
  },
  "items": [
    {
      "metadata": {
        "name": "default",
        "selfLink": "/api/v1/namespaces/default",
        "uid": "f95e1390-6852-11e7-ab03-7831c1b76042",
        "resourceVersion": "4",
        "creationTimestamp": "2017-07-14T05:12:03Z"
      },
      "spec": {
        "finalizers": [
          "kubernetes"
        ]
      },
      "status": {
        "phase": "Active"
      }
    }
  ]
}
...
# last
$ curl "http://127.0.0.1:8080/api/v1/namespaces?limit=1&continue=a3ViZS1wdWJsaWM"
{
  "kind": "NamespaceList",
  "apiVersion": "v1",
  "metadata": {
    "selfLink": "/api/v1/namespaces",
    "resourceVersion": "145"
  },
  "items": [
    {
      "metadata": {
        "name": "kube-system",
        "selfLink": "/api/v1/namespaces/kube-system",
        "uid": "f95e9484-6852-11e7-ab03-7831c1b76042",
        "resourceVersion": "5",
        "creationTimestamp": "2017-07-14T05:12:03Z"
      },
      "spec": {
        "finalizers": [
          "kubernetes"
        ]
      },
      "status": {
        "phase": "Active"
      }
    }
  ]
}
```
2017-09-02 19:26:29 -07:00
Kubernetes Submit Queue c84b3132a2 Merge pull request #48051 from xilabao/add-selfsubjectrulesreview-api
Automatic merge from submit-queue (batch tested with PRs 45724, 48051, 46444, 51056, 51605)

Add selfsubjectrulesreview in authorization

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

**Which issue this PR fixes**: fixes #47834 #31292

**Special notes for your reviewer**:

**Release note**:

```release-note
Add selfsubjectrulesreview API for allowing users to query which permissions they have in a given namespace.
```
/cc @deads2k @liggitt
2017-09-02 12:11:04 -07:00
Kubernetes Submit Queue 1e663006fa Merge pull request #50995 from enj/enj/i/etcd_storage_flakes/49423
Automatic merge from submit-queue (batch tested with PRs 50381, 51307, 49645, 50995, 51523)

Address TestEtcdStoragePath flakes

- Wait for the master to be healthy
- Wait longer for the master to start
- Fail gracefully if starting the master panics

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

```release-note
NONE
```

Fixes #49423

@kubernetes/sig-api-machinery-pr-reviews
2017-09-01 16:34:05 -07:00
Clayton Coleman 91527b9809
Integration test for API paging 2017-09-01 10:47:01 -04:00
xilabao f14c138438 add selfsubjectrulesreview api 2017-09-01 19:09:43 +08:00
Kubernetes Submit Queue 9a3dfbcab0 Merge pull request #50719 from crimsonfaith91/immutability
Automatic merge from submit-queue (batch tested with PRs 50719, 51216, 50212, 51408, 51381)

Make selector immutable for v1beta2 deployment, replicaset and daemonset prior update

**What this PR does / why we need it**:
This PR ensures controller selector is immutable for deployment and replicaset prior update by ignoring any change to `Spec`.

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

**Special notes for your reviewer**:
This will be a breaking change.

**Release note**:

```release-note
For Deployment, ReplicaSet, and DaemonSet, selectors are now immutable when updating via the new `apps/v1beta2` API. For backward compatibility, selectors can still be changed when updating via `apps/v1beta1` or `extensions/v1beta1`.
```
2017-08-31 21:09:08 -07:00
Kubernetes Submit Queue 4af900b43f Merge pull request #51633 from deads2k/controller-03-wait
Automatic merge from submit-queue (batch tested with PRs 51707, 51662, 51723, 50163, 51633)

update GC controller to wait until controllers have been initialized …

fixes #51013

Alternative to https://github.com/kubernetes/kubernetes/pull/51492 which keeps those few controllers (only one) from starting the informers early.
2017-08-31 18:43:41 -07:00
Antoine Pelisse d7eec6b51d Revert "Enable batch/v1beta1.CronJobs by default" 2017-08-31 09:54:16 -07:00
David Eads 253b047d89 update GC controller to wait until controllers have been initialized once 2017-08-31 09:01:38 -04:00
Kubernetes Submit Queue ffcd6d1dce Merge pull request #51465 from soltysh/cronjob_beta
Automatic merge from submit-queue (batch tested with PRs 50775, 51397, 51168, 51465, 51536)

Enable batch/v1beta1.CronJobs by default

This PR moves to CronJobs beta entirely, enabling `batch/v1beta1` by default.

Related issue: #41039 

@erictune @janetkuo ptal

```release-note
Promote CronJobs to batch/v1beta1.
```
2017-08-30 15:14:32 -07:00
crimsonfaith91 9929e03f87 ignore selector changes for deployment, replicaset and daemonset prior update 2017-08-30 13:15:19 -07:00
Bobby (Babak) Salamat 20931d7a68 Add specific types for PredicateMetadata and PredicateMetadataProducer 2017-08-30 10:32:09 -07:00
Dr. Stefan Schimanski 637fe0844c e2e/integration: simplify deepcopy calls 2017-08-29 20:11:50 +02:00
Maciej Szulik 2de214b044
Enable batch/v1beta1.CronJobs by default 2017-08-29 09:31:39 +02:00
Kubernetes Submit Queue daf591c193 Merge pull request #51117 from k82cn/k8s_50360_2
Automatic merge from submit-queue

Moved node condition filter into a predicates.

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

**Release note**:

```release-note
A new predicates, named 'CheckNodeCondition', was added to replace node condition filter. 'NetworkUnavailable', 'OutOfDisk' and 'NotReady' maybe reported as a reason when failed to schedule pods.
```
2017-08-28 01:22:27 -07:00
Kubernetes Submit Queue 562d2be7a0 Merge pull request #49006 from CaoShuFeng/is_forbidden
Automatic merge from submit-queue

Fix forbidden message format

Before this change:
 $ kubectl get pods --as=tom
 Error from server (Forbidden): pods "" is forbidden: User "tom" cannot list pods in the namespace "default".
After this change:
 $ kubectl get pods --as=tom
 Error from server (Forbidden): pods is forbidden: User "tom" cannot list pods in the namespace "default".



**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 #

**Special notes for your reviewer**:

**Release note**:

```
Fix forbidden message format, remove extra ""
```
2017-08-26 19:01:21 -07:00
Cao Shufeng ab09186737 Fix forbidden message format
Before this change:
 # kubectl get pods --as=tom
 Error from server (Forbidden): pods "" is forbidden: User "tom" cannot list pods in the namespace "default".
After this change:
 # kubectl get pods --as=tom
 Error from server (Forbidden): pods is forbidden: User "tom" cannot list pods in the namespace "default".
2017-08-26 10:27:35 +08:00
Klaus Ma 18dc690c7c Moved node condition filter into a predicates. 2017-08-26 09:08:07 +08:00
Cheng Xing 396c3c7c6f Adding dynamic Flexvolume plugin discovery capability, using filesystem watch. 2017-08-25 11:42:32 -07:00
Huamin Chen 4525446af2 azure file volume: add secret namespace api
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 14:49:58 +00:00
Kubernetes Submit Queue 49c36f4b33 Merge pull request #50546 from apelisse/plumb-openapi-validation
Automatic merge from submit-queue (batch tested with PRs 51039, 50512, 50546, 50965, 50467)

Kubectl: Plumb openapi validation (disabled by default)

**What this PR does / why we need it**: Creates a new flag '--openapi' and plumb in the validation code so that it can be used by default to validate objects against the openapi schema.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: partially https://github.com/kubernetes/kubectl/issues/49

**Special notes for your reviewer**:

This is not complete, the name of the variable must change for example.

**Release note**:
```release-note
Kubectl uses openapi for validation. If OpenAPI is not available on the server, it defaults back to the old Swagger.
```
2017-08-22 21:16:11 -07:00
Kubernetes Submit Queue 622bc55598 Merge pull request #51028 from ironcladlou/gc-int-flake
Automatic merge from submit-queue (batch tested with PRs 50967, 50505, 50706, 51033, 51028)

Fix GC integration test race

During TestCreateWithNonExistentOwner, when creating a pod with a
non-existent owner, assume it's possible the pod will be deleted before
we start checking for the pod's existence. Assuming that the pod still
exists immediately after Create returns is flaky if the GC reacts very
quickly.

```release-note
NONE
```

Might fix https://github.com/kubernetes/kubernetes/issues/50943; without the additional test context provided by this PR, it's not entirely possible to assess the root cause of the reported failure (as we don't know whether the original assertion failure was due to there being 0 or >1 pods).

/cc @caesarxuchao
2017-08-22 10:48:26 -07:00
Kubernetes Submit Queue c6980e7247 Merge pull request #51033 from mtaufen/revert-51008-revert-50789-fix-scheme
Automatic merge from submit-queue (batch tested with PRs 50967, 50505, 50706, 51033, 51028)

Revert "Merge pull request #51008 from kubernetes/revert-50789-fix-scheme"

I'm spinning up a cluster right now to test this fix, but I'm pretty sure this was the problem.
There doesn't seem to be a way to confirm from logs, because AFAICT the logs from the hollow kubelet containers are not collected as part of the kubemark test.

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

This reverts commit f4afdecef8, reversing
changes made to e633a1604f.

This also fixes a bug where Kubemark was still using the core api scheme
to manipulate the Kubelet's types, which was the cause of the initial
revert.

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

**Release note**:

```release-note
NONE
```

/cc @shyamjvs @wojtek-t
2017-08-22 10:48:21 -07:00
Harry Zhang 388e0b39bf generate files before scheduler perf 2017-08-22 16:40:16 +08:00
Michael Taufen a90d81620b Revert "Merge pull request #51008 from kubernetes/revert-50789-fix-scheme"
This reverts commit f4afdecef8, reversing
changes made to e633a1604f.

This also fixes a bug where Kubemark was still using the core api scheme
to manipulate the Kubelet's types, which was the cause of the initial
revert.
2017-08-21 11:28:05 -07:00
Antoine Pelisse b7b5457050 Validate against OpenAPI schema (if available) 2017-08-21 08:58:42 -07:00
Dan Mace 5334e164c7 Fix GC integration test race
During TestCreateWithNonExistentOwner, when creating a pod with a
non-existent owner, assume it's possible the pod will be deleted before
we start checking for the pod's existence. Assuming that the pod still
exists immediately after Create returns is flaky if the GC reacts very
quickly.
2017-08-21 09:32:15 -04:00
Shyam JVS 5591914d62 Revert "Don't register the kubeletconfig group with the default Scheme" 2017-08-21 11:15:27 +02:00
Monis Khan 81f8ed4578
Address TestEtcdStoragePath flakes
- Wait for the master to be healthy
- Wait longer for the master to start
- Fail gracefully if starting the master panics

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-08-20 23:20:42 -04:00
Klaus Ma df3a699069 Revert #50362. 2017-08-19 10:24:50 +08:00
Michael Taufen 0af9f756cd Don't register the kubeletconfig group with the default Scheme 2017-08-18 13:51:39 -07:00
Yinan Li 975257633b Add ControllerRevision to apps/v1beta2 2017-08-16 20:49:01 -07:00
Maciej Szulik 43b8715d82
Promote CronJobs to batch/v1beta1 2017-08-16 08:42:21 +02:00
Michael Taufen 24bab4c20f move KubeletConfiguration out of componentconfig API group 2017-08-15 08:12:42 -07:00
Kubernetes Submit Queue 9f902fef24 Merge pull request #50094 from sttts/sttts-no-importprefix
Automatic merge from submit-queue (batch tested with PRs 50094, 48966, 49478, 50593, 49140)

apimachinery: remove pre-apigroups import path logic

Replacing #50093.
2017-08-14 12:14:55 -07:00
Kevin f76ca1fb16 update clientset.Core() to clientset.CoreV1() in test 2017-08-14 16:53:55 +08:00
Kubernetes Submit Queue 2820b45caa Merge pull request #50362 from k82cn/k8s_50360
Automatic merge from submit-queue

Moved node condition filter into a predicates.

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

**Release note**:
```release-note
A new predicates, named 'CheckNodeCondition', was added to replace node condition filter. 'NetworkUnavailable', 'OutOfDisk' and 'NotReady' maybe reported as a reason when failed to schedule pods.
```
2017-08-12 15:10:31 -07:00
Klaus Ma 78e078390f Renamed to RegisterMandatoryFitPredicate. 2017-08-12 07:28:40 +08:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Kubernetes Submit Queue 47b5a52224 Merge pull request #50423 from jinzhejz/jinzhejz_coderefine
Automatic merge from submit-queue

code format in master_utils.go

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

**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-08-11 02:36:15 -07:00
Klaus Ma e9738c0ce6 Moved node condition filter into a predicates. 2017-08-11 16:43:33 +08:00
Monis Khan 3ab143bc18 Update etcd path test to always use kindWhiteList
Most types now have valid rest mappings because
NewDefaultRESTMapperFromScheme no longer ignores certain import
paths.  Thus we can no longer use the lack of a valid REST mapping
as an indicator for when to use kindWhiteList.  Thus kindWhiteList
now serves as a whitelist for all kinds and not just those that
formally had no mapping.  This does mean that we could whitelist
kinds due to a name conflict, but that is unlikely as names such as
GetOptions are not appropriate for new objects.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-08-10 13:07:55 +02:00
Kubernetes Submit Queue 9bbcd4af60 Merge pull request #50335 from ironcladlou/gc-discovery-optimization
Automatic merge from submit-queue (batch tested with PRs 49642, 50335, 50390, 49283, 46582)

Improve GC discovery sync performance

Improve GC discovery sync performance by only syncing when discovered
resource diffs are detected. Before, the GC worker pool was shut down
and monitors resynced unconditionally every sync period, leading to
significant processing delays causing test flakes where otherwise
reasonable GC timeouts were being exceeded.

Related to https://github.com/kubernetes/kubernetes/issues/49966.

/cc @kubernetes/sig-api-machinery-bugs

```release-note
NONE
```
2017-08-10 00:53:19 -07:00
Kubernetes Submit Queue 85e2e5dd9a Merge pull request #49642 from liggitt/rbac-v1
Automatic merge from submit-queue (batch tested with PRs 49642, 50335, 50390, 49283, 46582)

Add rbac.authorization.k8s.io/v1

xref https://github.com/kubernetes/features/issues/2

Promotes the rbac.authorization.k8s.io/v1beta1 API to v1 with no changes

```release-note
The `rbac.authorization.k8s.io/v1beta1` API has been promoted to `rbac.authorization.k8s.io/v1` with no changes.
The `rbac.authorization.k8s.io/v1alpha1` version is deprecated and will be removed in a future release.
```
2017-08-10 00:53:17 -07:00
Zhe Jin ad0ccc18b1 code format for test/integration/framework/master_utils.go 2017-08-10 11:07:38 +08:00
Kubernetes Submit Queue 17ec91c572 Merge pull request #50164 from crimsonfaith91/default
Automatic merge from submit-queue

remove apps/v1beta2 defaulting codes for obj.Spec.Selector and obj.Labels

**What this PR does / why we need it**:
This PR removes defaulting codes for `obj.Spec.Selector`. Currently, `obj.Spec.Selector.MatchLabels` is set to `obj.Spec.Template.Labels` if `obj.Spec.Template.Labels != nil && obj.Spec.Selector == nil`. We should not perform this defaulting operation as controllers selectors are immutable.

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

**Special notes for your reviewer**:
This PR removes defaulting codes for `apps/v1beta2` only. The defaulting codes for validation will be removed in another PR.

**Release note**:

```NONE
```
2017-08-09 19:24:54 -07:00
Kubernetes Submit Queue 458cc04330 Merge pull request #46254 from mtaufen/dkcfg
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

Alpha Dynamic Kubelet Configuration

Feature: https://github.com/kubernetes/features/issues/281

This proposal contains the alpha implementation of the Dynamic Kubelet Configuration feature proposed in ~#29459~ [community/contributors/design-proposals/dynamic-kubelet-configuration.md](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md). 

Please note:
- ~The proposal doc is not yet up to date with this implementation, there are some subtle differences and some more significant ones. I will update the proposal doc to match by tomorrow afternoon.~
- ~This obviously needs more tests. I plan to write several O(soon). Since it's alpha and feature-gated, I'm decoupling this review from the review of the tests.~ I've beefed up the unit tests, though there is still plenty of testing to be done.
- ~I'm temporarily holding off on updating the generated docs, api specs, etc, for the sake of my reviewers 😄~ these files now live in a separate commit; the first commit is the one to review.

/cc @dchen1107 @vishh @bgrant0607 @thockin @derekwaynecarr 

```release-note
Adds (alpha feature) the ability to dynamically configure Kubelets by enabling the DynamicKubeletConfig feature gate, posting a ConfigMap to the API server, and setting the spec.configSource field on Node objects. See the proposal at https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md for details.
```
2017-08-09 14:14:32 -07:00
Kubernetes Submit Queue 212928ad14 Merge pull request #49930 from soltysh/remove_scheduledjobs
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

Remove scheduledjobs

This is a prerequisite for promoting CronJobs to beta.

**Release note**:
```release-note
Remove deprecated ScheduledJobs endpoints, use CronJobs instead.
```
2017-08-09 14:14:30 -07:00
Kubernetes Submit Queue 82b3a80ad1 Merge pull request #49583 from irfanurrehman/fed-hpa-configTimeout
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

[Federation] Make the hpa scale time window configurable

This PR is on top of open pr https://github.com/kubernetes/kubernetes/pull/45993.
Please review only the last commit in this PR.
This adds a config param to controller manager, the value of which gets passed to hpa adapter via sync controller.
This is needed to reduce the overall time limit of the hpa scaling window to much lesser (then the default 2 mins) to get e2e tests run faster. Please see the comment on the newly added parameter.

**Special notes for your reviewer**:
@kubernetes/sig-federation-pr-reviews 
@quinton-hoole 
@marun to please validate the mechanism used to pass a parameter from cmd line to adapter.

**Release note**:

``` 
federation-controller-manager gets a new flag --hpa-scale-forbidden-window.
This flag is used to configure the duration used by federation hpa controller to determine if it can move max and/or min replicas 
around (or not), of a cluster local hpa object, by comparing current time with the last scaled time of that cluster local hpa. 
Lower value will result in faster response to scalibility conditions achieved by cluster local hpas on local replicas, but too low 
a value can result in thrashing. Higher values will result in slower response to scalibility conditions on local replicas.
```
2017-08-09 14:14:27 -07:00
Jordan Liggitt dd7be70a4a
Add rbac.authorization.k8s.io/v1 2017-08-09 17:04:54 -04:00
crimsonfaith91 a5987fe72c remove apps/v1beta2 defaulting codes for obj.Spec.Selector and obj.Labels 2017-08-09 11:44:27 -07:00
Dan Mace 3d6d57a18f Improve GC discovery sync performance
Improve GC discovery sync performance by only syncing when discovered
resource diffs are detected. Before, the GC worker pool was shut down
and monitors resynced unconditionally every sync period, leading to
significant processing delays causing test flakes where otherwise
reasonable GC timeouts were being exceeded.

Related to https://github.com/kubernetes/kubernetes/issues/49966.
2017-08-09 09:16:05 -04:00
Michael Taufen 443d58e40a Dynamic Kubelet Configuration
Alpha implementation of the Dynamic Kubelet Configuration feature.
See the proposal doc in #29459.
2017-08-08 12:21:37 -07:00
Maciej Szulik e465962bf7
Remove ScheduledJobs support 2017-08-08 15:22:26 +02:00
Janet Kuo e7930520e4 Deprecate Deployment rollbackTo field and remove rollback endpoint
1. Deprecate `.spec.rollbackTo` field in extensions/v1beta1 and
   apps/v1beta1 Deployments
2. Remove the same field from apps/v1beta2 Deployment, and remove
   its rollback subresource and endpoint
2017-08-07 18:35:49 -07:00
Dr. Stefan Schimanski 83895daed1 Fix printer hack to get a versioned client 2017-08-06 15:30:13 +02:00
Dr. Stefan Schimanski 1910b5a1dd Fix code implicitly casting clientsets to getters 2017-08-06 15:30:13 +02:00
Irfan Ur Rehman 2be69a515c [Federation] Make the hpa scale time window configurable 2017-08-06 01:09:34 +05:30
Kubernetes Submit Queue 1dd7faca39 Merge pull request #49356 from duan-yue/code_clear
Automatic merge from submit-queue (batch tested with PRs 49992, 48861, 49267, 49356, 49886)

remove unused function

**What this PR does / why we need it**:
remove unused function which is not used months ago.
**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
```
2017-08-02 05:16:04 -07:00
Kubernetes Submit Queue 7be28a15cc Merge pull request #47665 from ironcladlou/gc-poll-types
Automatic merge from submit-queue (batch tested with PRs 49538, 49708, 47665, 49750, 49528)

Enable garbage collection of custom resources

Enhance the garbage collector to periodically refresh the resources it monitors (via discovery) to enable custom resource definition GC (addressing #44507 and reverting #47432).

This is a replacement for #46000.

/cc @lavalamp @deads2k @sttts @caesarxuchao 

/ref https://github.com/kubernetes/kubernetes/pull/48065

```release-note
The garbage collector now supports custom APIs added via CustomeResourceDefinition or aggregated apiservers. Note that the garbage collector controller refreshes periodically, so there is a latency between when the API is added and when the garbage collector starts to manage it.
```
2017-07-29 05:28:53 -07:00
Kubernetes Submit Queue 740ca9a052 Merge pull request #49538 from supereagle/versioned-coreclient
Automatic merge from submit-queue (batch tested with PRs 49538, 49708, 47665, 49750, 49528)

Use the core client with version

**What this PR does / why we need it**:
Replace the **deprecated** `clientSet.Core()` with `clientSet.CoreV1()`.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-07-29 05:28:49 -07:00
Dan Mace d08dfb92c7 Enable garbage collection of custom resources
Enhance the garbage collector to periodically refresh the resources it
monitors (via discovery) to enable custom resource definition GC.

This implementation caches Unstructured structs for any kinds not
covered by a shared informer. The existing meta-only codec only supports
compiled types; an improved codec which supports arbitrary types could
be introduced to optimize caching to store only metadata for all
non-informer types.
2017-07-28 10:00:10 -04:00
Kubernetes Submit Queue 3d3d3922c2 Merge pull request #49638 from liggitt/remove-nodes-binding
Automatic merge from submit-queue (batch tested with PRs 49619, 49598, 47267, 49597, 49638)

Remove default binding of system:node role to system:nodes group

part of https://github.com/kubernetes/features/issues/279

deprecation of this automatic binding announced in 1.7 in https://github.com/kubernetes/kubernetes/pull/46076

```release-note
RBAC: the `system:node` role is no longer automatically granted to the `system:nodes` group in new clusters. It is recommended that nodes be authorized using the `Node` authorization mode instead. Installations that wish to continue giving all members of the `system:nodes` group the `system:node` role (which grants broad read access, including all secrets and configmaps) must create an installation-specific `ClusterRoleBinding`.
```
2017-07-28 05:08:10 -07:00
Kubernetes Submit Queue 7056b5ba70 Merge pull request #49238 from janetkuo/apps-v1beta2-rs
Automatic merge from submit-queue (batch tested with PRs 49238, 49595, 43494, 47897, 48905)

Add apps/v1beta2.ReplicaSet

~Depends on #48746~ (merged)
~Depends on #49357~ (merged)
xref: #49135

```release-note
Add a new API object apps/v1beta2.ReplicaSet
```
2017-07-28 02:12:51 -07:00
vikaschoudhary16 189129c71d Add inter-pod-affinity integration tests and remove corresponding e2e tests
Signed-off-by: vikaschoudhary16 <choudharyvikas16@gmail.com>
2017-07-26 23:24:28 -04:00
Jordan Liggitt d65610bf2f
Remove default binding of system:node role to system:nodes group 2017-07-26 13:53:14 -04:00
Janet Kuo 6eaf6884fb Bump ReplicaSet to apps/v1beta2 2017-07-26 09:51:41 -07:00
supereagle edce96c5b6 use the core client with version 2017-07-26 19:16:02 +08:00
Kubernetes Submit Queue 203d7d6066 Merge pull request #46358 from irfanurrehman/fed-hpa-integration
Automatic merge from submit-queue (batch tested with PRs 46358, 49408)

[Federation] Updates to enable hpa controllers test in integration and e2e

Enables the apis on api server in both scenario.
Additional logic to enable and run the crud portion of objects in integration, for controllers which implement additional logic in reconcile.

**Special notes for your reviewer**:
This on top of an existing PR https://github.com/kubernetes/kubernetes/pull/45497.
The last 2 commits are reviewable here
@kubernetes/sig-federation-pr-reviews 
cc @marun @perotinus 

**Release note**:

```NONE
```
2017-07-26 00:25:29 -07:00
Kubernetes Submit Queue 4399fb2b87 Merge pull request #49071 from foxish/foxish-api
Automatic merge from submit-queue (batch tested with PRs 43443, 46193, 49071, 47252)

Add v1beta2.DaemonSet

Depends on https://github.com/kubernetes/kubernetes/pull/48746
Partly implements https://github.com/kubernetes/kubernetes/issues/49135

```release-note
Adding type apps/v1beta2.DaemonSet
```
2017-07-25 21:52:50 -07:00
foxish 14d5793869 DS: changes to server and storage 2017-07-25 11:47:57 -07:00
supereagle adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
Kubernetes Submit Queue 4d2a721223 Merge pull request #48707 from danielfm/node-restriction-pod-eviction-subresource
Automatic merge from submit-queue

Allow nodes to create evictions for its own pods in NodeRestriction admission controller

**What this PR does / why we need it**: This PR adds support for `pods/eviction` sub-resource to the NodeRestriction admission controller so it allows a node to evict pods bound to itself.

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

**Special notes for your reviewer**: The NodeRestriction already allows nodes to delete pods bound to itself, so allowing nodes to also delete pods via the Eviction API probably makes sense.

```release-note
NodeRestriction allows a node to evict pods bound to itself
```
2017-07-23 04:16:51 -07:00
Kubernetes Submit Queue ae1ff1a2d4 Merge pull request #48746 from janetkuo/apps-v1beta2
Automatic merge from submit-queue

Add a new API version apps/v1beta2

xref: #49135
This PR adds a new API version `apps/v1beta2` which contains a copy (of types, conversions, and defaults) of `apps/v1beta1` StatefulSet, Deployment, and their subresources. Note that `apps/v1beta2` is still WIP and we will make breaking changes to it before releasing 1.8.

Moving core controllers (StatefulSet, Deployment, ReplicaSet, DaemonSet) to `apps/v1beta2` is the first step of moving them to `apps/v1` (GA). 

This PR is a starting point for DaemonSet and ReplicaSet to move from `/extensions` to `/apps` and for Deployment and StatefulSet to make some breaking changes (e.g. new defaults and/or remove deprecated fields).

```release-note
Add a new API version apps/v1beta2
```
2017-07-21 11:47:21 -07:00
Kubernetes Submit Queue e0c537a453 Merge pull request #48847 from bsalamat/e2e_test_conversion
Automatic merge from submit-queue

Add an integration test library and some integration tests for scheduler

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

1. Add an integration test library (utils.go) for scheduler testing.
2. Cleaned up some of the tests in scheduler_test.go with the new integration test library.
3. Add priority_test.go with a couple of examples on how to test scheduler priority function in integration tests.

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

ref/ #48176

@kubernetes/sig-scheduling-pr-reviews 
@davidopp @k82cn @vikaschoudhary16
2017-07-21 08:44:43 -07:00
duan-yue 02b8d5073c remove unused function 2017-07-21 13:33:42 +08:00
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