Commit Graph

1399 Commits (4ba3218336c55dfae9b81d5bed3cc7296ec0a82f)

Author SHA1 Message Date
Kubernetes Submit Queue b37564d9f2
Merge pull request #62659 from enj/enj/i/gc_admission_dynamic_restmapper
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>.

Use a dynamic RESTMapper for admission plugins

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

This change updates the REST mapper used by all admission plugins to be backed by cached discovery information.  This cache is updated every ten seconds via a post start hook and will not attempt to update on calls to `RESTMapping`.  It solely relies on the hook to keep the cache in sync with discovery.

This prevents issues with the `OwnerReferencesPermissionEnforcement` admission plugin when it is used with custom resources that set `blockOwnerDeletion`.

**Which issue(s) this PR fixes**:
`Fixes #...`

**Special notes for your reviewer**:

There are probably other ways the post start hook could be wired.

**Release note**:

```release-note
NONE
```

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

@kubernetes/sig-api-machinery-misc
2018-04-18 08:51:37 -07:00
Kubernetes Submit Queue 42f6687a1c
Merge pull request #60536 from immutableT/transformer_metrics
Automatic merge from submit-queue (batch tested with PRs 62748, 60536, 62300, 62661, 62731). 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>.

Instrument transformer.go with latency metrics.

**What this PR does / why we need it**:
Instrument transformer.go with latency metrics - allowing to measure performance impact of adding KMS Providers.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
"NONE"
```
2018-04-17 19:53:15 -07:00
Monis Khan 300751393b
Use a dynamic RESTMapper for admission plugins
This change updates the REST mapper used by all admission plugins to
be backed by cached discovery information.  This cache is updated
every ten seconds via a post start hook and will not attempt to
update on calls to RESTMapping.  It solely relies on the hook to
keep the cache in sync with discovery.

This prevents issues with the OwnerReferencesPermissionEnforcement
admission plugin when it is used with custom resources that set
blockOwnerDeletion.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2018-04-17 09:59:41 -04:00
Kubernetes Submit Queue 752c72bbc5
Merge pull request #62472 from sttts/sttts-sample-apiserver-conversion
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>.

sample-apiserver: add v1beta1 with advanced conversion example from v1alpha1

Follow-up of discussion in https://github.com/kubernetes/kubernetes/pull/60594.
2018-04-17 05:47:59 -07:00
Dr. Stefan Schimanski 145167f908 Generated files 2018-04-17 11:44:29 +02:00
Dr. Stefan Schimanski 0bb9261eb8 sample-apiserver: add v1beta1 with advanced conversion example from v1alpha1 2018-04-17 11:43:58 +02:00
immutablet bfcb3cd91f Instrument transformer.go with latency metrics. 2018-04-16 11:33:10 -07:00
Slava Semushin ff636f25c0 Move podsecuritypolicy registry to policy package. 2018-04-16 17:21:52 +02:00
Kubernetes Submit Queue 622789d8f3
Merge pull request #62230 from msau42/redo-integration
Automatic merge from submit-queue (batch tested with PRs 61549, 62230, 62055, 61082, 62212). 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>.

Create StorageClass for each volume binding test case

**What this PR does / why we need it**:
Use a different StorageClass for each test case so that subsequent test cases don't accidentally bind to PVs created in previous test cases.  The alternative solution of waiting for all the resources to be fully deleted added a significant amount of time to the test, so I prefer using this storage class approach.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-10 18:19:09 -07:00
Michelle Au 12fd0a8aca Create StorageClass for each volume binding test case 2018-04-09 17:18:49 -07:00
AnubhaKushwaha 32bc319f4b Added test to check object size 2018-04-08 23:10:23 +05:30
Manjunath A Kumatagi 1bb810e749 Use pause manifest image 2018-04-06 11:00:50 +05:30
Dr. Stefan Schimanski 9f906618f0 apiserver: enforce shared RequestContextMapper in delegation chain 2018-04-05 14:41:56 +02:00
Kubernetes Submit Queue 8438cbe669
Merge pull request #60483 from hzxuzhonghu/kube-apiserver-runoptions
Automatic merge from submit-queue (batch tested with PRs 58420, 60483). 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>.

Kube apiserver ServerRunOptions set default called before use

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

move `ServerRunOptions` set default function  `defaultOptions` out of `CreateKubeAPIServerConfig`, it should be called before real use `CreateNodeDialer`. So move it to cobra.Command just after kube-apiserver flags parsed.

Similarly `ServerRunOptions.Validate` move there too.

**Release note**:

```release-note
NONE
```
2018-04-04 05:03:08 -07:00
Kubernetes Submit Queue b6c721d7ac
Merge pull request #61959 from satyasm/ipam-perf-cloud-mock
Automatic merge from submit-queue (batch tested with PRs 61959, 62037). 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>.

Support custom test configurations

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Support custom test configuration for IPAM performance integration tests
```
2018-04-04 02:45:05 -07:00
hzxuzhonghu b8460bd849 deduplicate server startup code in tls integration test 2018-04-04 11:21:19 +08:00
hzxuzhonghu 8cce8bdc85 make kube-apiserver ServerRunOptions setdefault and Validate before use 2018-04-04 11:19:55 +08:00
Kubernetes Submit Queue fb795a3b80
Merge pull request #61404 from hzxuzhonghu/fix-webhook-crd-bug
Automatic merge from submit-queue (batch tested with PRs 61404, 61025). 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>.

bug fix: create/update CRD panic when mutating webhook configured

apiextentions apiserver use its own scheme to create a admission chain before creating the apiextensions apiserver config.
Fixes #61355

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-03 07:31:04 -07:00
hzxuzhonghu 4c26831147 apiserver's webhook admission use its own scheme 2018-04-03 20:42:38 +08:00
Kubernetes Submit Queue 817869e78a
Merge pull request #62030 from deads2k/server-10-remove-dead
Automatic merge from submit-queue (batch tested with PRs 61498, 62030). 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>.

remove kube-apiserver option that is always force to true

All production flows forced the controllers to true. I don't think that test code should be depending on it either.  Removing the option.

```release-note
NONE
```
2018-04-03 02:02:07 -07:00
Christoph Blecker 710c8563b4
Fix go vet errors 2018-04-02 17:57:44 -07:00
Satyadeep Musuvathy 86aa5ae9c8 Support custom test configurations 2018-04-02 10:29:36 -07:00
David Eads ee5bc39c4c remove kube-apiserver option that is always force to true 2018-04-02 12:19:34 -04:00
Mikhail Mazurskiy 468655b76a
Use typed events client directly 2018-04-01 18:57:29 +10:00
Harry Zhang 2fae40d886 Update bazel 2018-03-31 00:31:32 -07:00
Harry Zhang 187c5bc91e Use initTest for integration to start scheduler
Fix import path

Fix configurator name
2018-03-31 00:28:08 -07:00
Harry Zhang 782a092e2e Use feature gate in integration
Clean up unused import
2018-03-31 00:28:08 -07:00
Kubernetes Submit Queue 8a783b0664
Merge pull request #59768 from barney-s/sts-integration
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>.

Adding integration tests for statefulset

**What this PR does / why we need it**:
Creates a base statefulset integration test framework.
Basic tests added.


**Which issue(s) this PR fixes**:
None

**Special notes for your reviewer**:
Cloned pull/52583 and updated it to work with latest API changes.

**Release note**:
None.
2018-03-30 09:35:01 -07:00
Kubernetes Submit Queue 6360192eab
Merge pull request #61847 from mengqiy/patch_conflict
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>.

fix patch conflict detection in apiserver

Patching conflict for merging list with mergeKey is not determined in the correct way. 

```release-note
None
```
2018-03-30 07:55:12 -07:00
Mengqi Yu ff18af452d fix patch conflict detection in apiserver 2018-03-29 20:05:58 -07:00
Kubernetes Submit Queue 5ae7bba496
Merge pull request #60100 from mtaufen/node-authz-nodeconfigsource
Automatic merge from submit-queue (batch tested with PRs 61829, 61908, 61307, 61872, 60100). 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>.

node authorizer sets up access rules for dynamic config

This PR makes the node authorizer automatically set up access rules for
dynamic Kubelet config.

I also added some validation to the node strategy, which I discovered we
were missing while writing this.

This PR is based on another WIP from @liggitt.

```release-note
The node authorizer now automatically sets up rules for Node.Spec.ConfigSource when the DynamicKubeletConfig feature gate is enabled.
```
2018-03-29 17:37:18 -07:00
Kubernetes Submit Queue 3cb73605aa
Merge pull request #61863 from satyasm/ipam-perf-cloud-mock
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>.

Fix 61854, skip for short tests

**What this PR does / why we need it**:
Skip for short tests, so as to avoid running for every PR.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Disable ipamperf integration tests as part of every PR verification.
```
2018-03-28 17:57:59 -07:00
Barni S 42190c350e Adding integration tests for statefulset 2018-03-28 19:24:48 -04:00
Satyadeep Musuvathy 9d9a45893c Fix 61854, skip for short tests 2018-03-28 15:27:21 -07:00
Kubernetes Submit Queue db8552dfed
Merge pull request #56363 from hzxuzhonghu/test-opt
Automatic merge from submit-queue (batch tested with PRs 61848, 61188, 56363, 61357, 61838). 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>.

reduce garbage_collector test cases running time

**What this PR does / why we need it**:
test cases in test\integration\garbagecollector\garbage_collector_test.go wait.Poll interval is too long. So the case running time is too long. 
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-03-28 13:52:10 -07:00
Kubernetes Submit Queue 2ba2cc1321
Merge pull request #61615 from janetkuo/rm-adopt-hash
Automatic merge from submit-queue (batch tested with PRs 61790, 61808, 60339, 61615, 61757). 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>.

Deployment to stop adding pod-template-hash labels/selector on adoption

**What this PR does / why we need it**: This is a blocker for #55714, because ReplicaSet selector becomes immutable in `apps/v1`. With controller ref, Deployment's ReplicaSets and Pods can avoid fighting with each others without unique label/selector (pod-template-hash), so it's safe to stop adding hash label/selector on adoption. 

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

**Special notes for your reviewer**: This is a behavioral change to Deployment controller that will affect all versions of Deployment APIs (`apps/v1`, `extensions/v1beta1`, `apps/v1beta1`, `apps/v1beta2`). 

**Release note**:

```release-note
Deployment will stop adding pod-template-hash labels/selector to ReplicaSets and Pods it adopts. Resources created by Deployments are not affected (will still have pod-template-hash labels/selector). 
```
2018-03-28 09:39:18 -07:00
Kubernetes Submit Queue 2bc231eb57
Merge pull request #61143 from satyasm/ipam-perf-cloud-mock
Automatic merge from submit-queue (batch tested with PRs 61402, 61143, 61427, 60592). 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>.

Performance tests and fix for IPAM controller.

Tests the four modes of allocations. Can be run using
./test-performance.sh under tests/integration/ipamperf
directory. See ./test-performance.sh -h for supported flags.



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

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

**Special notes for your reviewer**:
Please see the implementation  notes comment block in cloud.go for core details of how 
the mocking works. README.md has details on how the tests can be run on the 
command line.

**Release note**:

```release-note
Performance test framework and basic tests for the IPAM controller, to simulate behavior
of the four supported modes under lightly loaded and loaded conditions, where load is 
defined as the number of operations to perform as against the configured kubernetes
API server QPS.
```
2018-03-27 15:33:09 -07:00
Michael Taufen ab8dc12333 node authorizer sets up access rules for dynamic config
This PR makes the node authorizer automatically set up access rules for
dynamic Kubelet config.

I also added some validation to the node strategy, which I discovered we
were missing while writing this.
2018-03-27 08:49:45 -07:00
Kubernetes Submit Queue 2fdcfeae51
Merge pull request #61166 from hzxuzhonghu/authz-flag-validate
Automatic merge from submit-queue (batch tested with PRs 60519, 61099, 61218, 61166, 61714). 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>.

kube-apiserver add BuiltInAuthorizationOptions validation

Validate BuiltInAuthorizationOptions after flags parsed. 

**Release note**:

```release-note
NONE
```
2018-03-26 23:20:14 -07:00
Janet Kuo 7899fb477d Only check hash labels of non-adopted resources in integration tests 2018-03-26 17:08:31 -07:00
hzxuzhonghu 755df0461d validate authorization flags in BuiltInAuthorizationOptions.Validate 2018-03-26 20:37:02 +08:00
Kubernetes Submit Queue 02856b6656
Merge pull request #60996 from deads2k/server-09-metrics
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>.

update metrics to true like it is for kube-apiserver

The kube-apiserver always hardcoded to true, but nothing else knew too.  I changed the default to true (I can't think of why you wouldn't want it even if you don't often use it).

@kubernetes/sig-api-machinery-bugs 
@MikeSpreitzer see if this fixes you?
2018-03-25 04:33:24 -07:00
Kubernetes Submit Queue f389b0a02b
Merge pull request #61515 from crimsonfaith91/revert-59013-ds-integration-3
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>.

Revert "add rolling update daemonset existing pod adoption integration test"

Reverts kubernetes/kubernetes#59013
2018-03-24 02:34:23 -07:00
Satyadeep Musuvathy 77da96c7f6 Performance tests and fix for IPAM controller.
Tests the four modes of allocations. Can be run using
./test-performance.sh under tests/integration/ipamperf
directory. See ./test-performance.sh -h for supported flags.
2018-03-22 13:21:22 -07:00
David Eads 456fd386dc update metrics to true like it is for kube-apiserver 2018-03-22 10:27:31 -04:00
Kubernetes Submit Queue 2a3144e377
Merge pull request #61367 from enisoc/apps-v1-rs
Automatic merge from submit-queue (batch tested with PRs 60980, 61273, 60811, 61021, 61367). 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>.

Use apps/v1 ReplicaSet in controller and tests.

This updates the RS/RC controller and RS integration/e2e tests to use apps/v1 ReplicaSet, as part of #55714.

It does *not* update the Deployment controller, nor its integration/e2e tests, to use apps/v1 ReplicaSet. That will be done in a separate PR (#61419) because Deployment has many more tendrils embedded throughout the system.

```release-note
Conformance: ReplicaSet must be supported in the `apps/v1` version.
```

/assign @janetkuo
2018-03-22 02:08:27 -07:00
Jun Xiang Tee 1bbb9e5217
Revert "add rolling update daemonset existing pod adoption integration test" 2018-03-21 19:39:40 -07:00
Kubernetes Submit Queue bd745a4080
Merge pull request #59013 from crimsonfaith91/ds-integration-3
Automatic merge from submit-queue (batch tested with PRs 59536, 61104, 61030, 59013, 61169). 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 rolling update daemonset existing pod adoption integration test

**What this PR does / why we need it**:
This PR adds rolling update DaemonSet existing pod adoption integration test. It also shifts all helper functions to a new utility file.

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

**Release note**:
```release-note
NONE
```
2018-03-21 03:43:21 -07:00
Kubernetes Submit Queue a5a3bc93f1
Merge pull request #61104 from hzxuzhonghu/AlwaysAdmit-stop-using
Automatic merge from submit-queue (batch tested with PRs 59536, 61104, 61030, 59013, 61169). 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>.

stop using AlwaysAdmit admission

`AlwaysAdmit ` was deprecated, and stop using it in test.

**Release note**:

```release-note
NONE
```
2018-03-21 03:43:14 -07:00
Kubernetes Submit Queue dbea6f6372
Merge pull request #61085 from hzxuzhonghu/unversioned-cleanup
Automatic merge from submit-queue (batch tested with PRs 60919, 60953, 61085, 61083, 60971). 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>.

remove unused `pkg/api/unversioned`

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

clean code, see #61084 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-03-20 20:34:31 -07:00