Commit Graph

4153 Commits (3f581dc265949622d71e843a653fabe76db3774f)

Author SHA1 Message Date
David Eads b3ce7a9935 services must listen on port 443 2018-05-29 08:28:41 -04:00
Jacob Tanenbaum 14a03dd646 Modify LoopbackHostPort() so it returns an IPv6 Loopback address when given [::] address
Currently when LoopbackHostPort() is called with 0.0.0.0 and [::] it returns the first loopback
address returned from net.InterfaceAddrs() which is typically 127.0.0.1 (golang does not
specify an order that interfaces are returned). It would be more appropriate if when calling
LoopbackHostPort() with [::] that an IPv6 loopback address is returned, this prevents some cert.
generation failures.
2018-05-29 08:25:51 -04:00
Marko Mudrinić 2bf66c377d
apiextensions-apiserver: add establishing controller to avoid race between established and CRs actually served 2018-05-29 13:46:47 +02:00
Kubernetes Submit Queue 1e0af48f11
Merge pull request #64300 from wgliang/master.fix-64244
Automatic merge from submit-queue (batch tested with PRs 64300, 64375). 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>.

HandleError include the type of the error object

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

HandleError include the type of the error object


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

**Special notes for your reviewer**:
/cc @MikeSpreitzer

**Release note**:

```release-note
NONE
```
2018-05-29 04:22:06 -07:00
Dr. Stefan Schimanski f6d4244c30 client-go: document README exception in .github/PULL_REQUEST_TEMPLATE.md 2018-05-29 09:16:25 +02:00
Dr. Stefan Schimanski 96475ce209 Update generated files 2018-05-28 10:56:58 +02:00
Dr. Stefan Schimanski ecdc1638f6 apiextensions-apiserver: add columns to CRD spec 2018-05-28 10:56:58 +02:00
Jordan Liggitt 2d28e0d6a3
bump(github.com/evanphx/json-patch): 94e38aa1586e8a6c8a75770bddf5ff84c48a106b 2018-05-25 22:29:07 -04:00
liz ffeca16101
Remove some unnecessarily gendered pronouns in comments 2018-05-25 17:48:17 -04:00
Kubernetes Submit Queue c0f91a8a1e
Merge pull request #63414 from roycaihw/fix-delete-query
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>.

Add conversion to properly parse query parameter propagationPolicy

**What this PR does / why we need it**:
This delete request query parameter has been broken for a year. I'm not sure if we want to deprecate the non-standard DeleteOptions body on delete request eventually. 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
API server properly parses propagationPolicy as a query parameter sent with a delete request
```

/sig api-machinery
2018-05-25 06:59:05 -07:00
Kubernetes Submit Queue deb632e727
Merge pull request #64204 from sttts/sttts-unify-NewNoxuInstance
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>.

apiextensions: unify mono- and multi-versioned test helpers

The mono-versioned helpers are a special case of the multi-versioned ones.

Fixes part of https://github.com/kubernetes/kubernetes/issues/64136.
2018-05-25 04:49:37 -07:00
Kubernetes Submit Queue 28f171bd66
Merge pull request #63893 from jennybuckley/expose-openapi-to-registry3
Automatic merge from submit-queue (batch tested with PRs 64175, 63893). 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>.

Expose openapi schema to handlers

**What this PR does / why we need it**:
Build an openapi spec for each api resource handler. This spec will be able to be consumed by server-side apply and server-side openapi validation.
The reason for putting it into master is so we can work on implementing server side validation against the openapi spec as well as server side apply, and it will make merging the server side apply feature branch a smaller, less risky PR

/sig api-machinery
/kind feature
cc @liggitt @lavalamp @seans3 @mbohlool @apelisse 

**Release note**:
```release-note
NONE
```
2018-05-25 03:50:14 -07:00
Kubernetes Submit Queue f091073b0f
Merge pull request #61963 from roycaihw/optional-saddress-ccidr
Automatic merge from submit-queue (batch tested with PRs 61963, 64279, 64130, 64125, 64049). 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 serverAddressByClientCIDRs in discovery API optional

**What this PR does / why we need it**:
See https://github.com/kubernetes/kubernetes/issues/61868

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

**Special notes for your reviewer**:
WIP: I'm having trouble updating swagger-spec using our update scripts. Thinking about removing swagger-spec from our code base as it has long passed deprecation. Sending this PR now to see the test results. 

**Release note**:

```release-note
Property `serverAddressByClientCIDRs` in `metav1.APIGroup` (discovery API) now become optional instead of required
```

/sig api-machinery
2018-05-25 01:09:12 -07:00
Guoliang Wang f2cb23ad6a HandleError include the type of the error object 2018-05-25 14:02:37 +08:00
Kubernetes Submit Queue 4c227ab821
Merge pull request #63417 from smarterclayton/map_string
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>.

FlagMaps may be nil (prior to being initialized)

Do not panic if they haven't been set yet.

Fixes: #64090
2018-05-24 20:32:26 -07:00
Kubernetes Submit Queue 52e0d5a910
Merge pull request #64250 from hzxuzhonghu/clean-code
Automatic merge from submit-queue (batch tested with PRs 63319, 64248, 64250, 63890, 64233). 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>.

replace `__internal` with runtime.APIVersionInternal

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

Replace `__internal` with runtime.APIVersionInternal

**Release note**:

```release-note
NONE
```
2018-05-24 19:46:15 -07:00
Kubernetes Submit Queue 9c2a4baf1a
Merge pull request #64247 from sttts/sttts-unstructured-converter-removal
Automatic merge from submit-queue (batch tested with PRs 64060, 63904, 64218, 64208, 64247). 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 unused UnstructuredObjectConverter

This is not in apiextensions-apiserver for CR conversion.
2018-05-24 17:01:24 -07:00
Kubernetes Submit Queue 88f8c7d1ee
Merge pull request #64208 from sttts/sttts-split-up-nop-converter
Automatic merge from submit-queue (batch tested with PRs 64060, 63904, 64218, 64208, 64247). 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>.

apiextensions: extract orthortogonal behaviour from nopConve

This is preparation for adding more CR converters. Not every new converter should implement the generic conversion behaviour of CRs.

Fixes parts of https://github.com/kubernetes/kubernetes/issues/64136.
2018-05-24 17:01:21 -07:00
Kubernetes Submit Queue 151fe85546
Merge pull request #64218 from deads2k/client-11-leaderconfig
Automatic merge from submit-queue (batch tested with PRs 64060, 63904, 64218, 64208, 64247). 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>.

prevent zero for leader election timeouts

Add conditional checks for a stupid error that took me 20 minutes to find.

I don't see a reason to allow zero for any of the leader election tuning params

```release-note
NONE
```
2018-05-24 17:01:17 -07:00
Clayton Coleman ccec4c507f
MapString* should return empty string for String() when null 2018-05-24 15:02:08 -04:00
Kubernetes Submit Queue 21836a64ac
Merge pull request #64202 from sttts/sttts-crds-removeDeadStorage-logging
Automatic merge from submit-queue (batch tested with PRs 64127, 63895, 64066, 64215, 64202). 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>.

apiextensions: reduce verbose logs in removeDeadStorage

We don't need one log line per version.

Fixes https://github.com/kubernetes/kubernetes/pull/63830/files#r189808872, part of #64136.
2018-05-24 10:45:31 -07:00
Kubernetes Submit Queue aa3719d117
Merge pull request #64215 from mbohlool/crd_versioning_f1
Automatic merge from submit-queue (batch tested with PRs 64127, 63895, 64066, 64215, 64202). 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 documentation of GA is in APIService's PriorityVersion and CRD's Versions

Explain what GA is in APIService's PriorityVersion and CRD's Versions.

ref #64136 

```release-note
NONE
```
2018-05-24 10:45:26 -07:00
jennybuckley 349fbdfe9f Run hack/update-all.sh 2018-05-24 09:55:33 -07:00
jennybuckley dee088586a Expose openapi schema to handlers 2018-05-24 09:55:19 -07:00
Kubernetes Submit Queue fa354b3f68
Merge pull request #64174 from liggitt/correct-openapi-extensions
Automatic merge from submit-queue (batch tested with PRs 64174, 64187, 64216, 63265, 64223). 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>.

Correctly identify types served in the kube-apiserver openapi doc

Fixes https://github.com/kubernetes/kubernetes/issues/52741

Split out from https://github.com/kubernetes/kubernetes/pull/63893

```release-note
The kube-apiserver openapi doc now includes extensions identifying APIService and CustomResourceDefinition kinds
```
2018-05-24 09:41:09 -07:00
Jess Frazelle ac015892e4
add PST to main SECURITY_CONTACTS as formality
Add the Product Security Team as the security contacts for the main
repository and they can use the OWNERS files in each subsystem/dir to find
the correct owners.

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-05-24 10:52:33 -04:00
Dr. Stefan Schimanski d6d2668f28 apiextensions: cleanup test/integration helpers 2018-05-24 12:00:09 +02:00
Dr. Stefan Schimanski b01699b9f7 apiextensions: unify multi- and mono-versioned test helpers 2018-05-24 11:39:36 +02:00
Dr. Stefan Schimanski 4471d0321f apimachinery: remove unused UnstructuredObjectConverter 2018-05-24 11:05:29 +02:00
xuzhonghu 6f76247eb6 replace `__internal` with runtime.APIVersionInternal 2018-05-24 16:57:44 +08:00
Kubernetes Submit Queue 74bcefc8b2
Merge pull request #64063 from roycaihw/support-get-status
Automatic merge from submit-queue (batch tested with PRs 62756, 63862, 61419, 64015, 64063). 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>.

apiservices/status and certificatesigningrequests/status support get+update+patch

**What this PR does / why we need it**:
Fix the remaining `/status` subresources that return 405 on GET and PATCH

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref https://github.com/kubernetes/kubernetes/pull/63619

**Release note**:

```release-note
apiservices/status and certificatesigningrequests/status now support GET and PATCH
```
2018-05-23 18:14:20 -07:00
David Ashpole fd1f19fc42 add metadata to kubelet eviction event annotations 2018-05-23 16:12:54 -07:00
Dr. Stefan Schimanski e341803d4f apiextensions: reduce verbose logs in removeDeadStorage
We don't need one log line per version.
2018-05-23 21:42:08 +02:00
Dr. Stefan Schimanski 818147d6fb apiextensions: make CreateNewCustomResourceDefinition return created CRD 2018-05-23 21:41:55 +02:00
David Eads 7288e8828f prevent zero for leader election timeouts 2018-05-23 15:00:37 -04:00
Mehdy Bohlool e73475311c Update generated files 2018-05-23 11:12:50 -07:00
Mehdy Bohlool 54970ea1cc Add clarification for GA in Version Priority sorting 2018-05-23 11:07:35 -07:00
Dr. Stefan Schimanski 9d6e7254a1 apiextensions: extract orthortogonal behaviour from nopConverter
This is preparation for adding more CR converters.
2018-05-23 17:25:00 +02:00
Kubernetes Submit Queue 9716f585c5
Merge pull request #64150 from wojtek-t/fix_list_resource_version
Automatic merge from submit-queue (batch tested with PRs 64102, 63303, 64150, 63841). 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 incorrectly set resource version in List

Fix : https://github.com/kubernetes/kubernetes/issues/64147
2018-05-23 04:53:21 -07:00
Kubernetes Submit Queue 45c94a1cb4
Merge pull request #63830 from mbohlool/crd_versioning_nop
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>.

Crd versioning with nop Conversion

Implements Custom Resource Definition versioning according to[ design doc](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/customresources-versioning.md).

Note: I recreated this PR instead of #63518. Huge number of comments there broke github. 

@sttts @nikhita @deads2k @liggitt @lavalamp 

```release-note
Add CRD Versioning with NOP converter
```
2018-05-22 23:11:55 -07:00
wojtekt a3578c864e Fix incorrectly set resource version in List 2018-05-23 08:06:36 +02:00
Kubernetes Submit Queue c4d7987a62
Merge pull request #64126 from mtaufen/remove-old-todos
Automatic merge from submit-queue (batch tested with PRs 63283, 64032, 64159, 64126, 64098). 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 some completed TODOs

This PR removes some old TODOs that were recently completed.
```release-note
NONE
```
2018-05-22 22:14:13 -07:00
Jordan Liggitt 43551e8208
Correctly identify types served in the kube-apiserver openapi doc 2018-05-22 20:57:18 -04:00
Mehdy Bohlool c25514a1ee Generated files 2018-05-22 13:54:34 -07:00
Mehdy Bohlool 0f6d98a056 CRD versioning with no-op converter 2018-05-22 13:54:33 -07:00
Mehdy Bohlool 531041ce94 Do not bypass same version unstructed conversion if it is a list
This give the converter a chance to convert list items to the requested version.
2018-05-22 13:54:33 -07:00
Mehdy Bohlool 8a39e5381c CRD versioning validation and defaulting 2018-05-22 13:54:32 -07:00
Mehdy Bohlool 10c48ae510 CRD versioning - types change 2018-05-22 13:54:32 -07:00
Michael Taufen 62a1532d51 Remove some completed TODOs 2018-05-22 11:02:57 -07:00
Gregory Man a29a1cbb95 Added unit tests to sample-controller
Added unit tests.

Changed NewController function to accept informers and not informers
factory. This make code more testable and align it with other
controllers.
2018-05-22 12:43:31 +03:00
Haowei Cai a14f423ebb generated 2018-05-21 18:04:54 -07:00
Haowei Cai 2acbe87156 mark ServerAddressByClientCIDRs as optional 2018-05-21 17:47:25 -07:00
Kubernetes Submit Queue 6d510f52f2
Merge pull request #63409 from mtaufen/kc-validation-feature-gates
Automatic merge from submit-queue (batch tested with PRs 63881, 64046, 63409, 63402, 63221). 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>.

Kubelet config: Validate new config against future feature gates

This fixes an issue with KubeletConfiguration validation, where the             
feature gates set by the new config were not taken into account.                
                                                                                
Also fixes a validation issue with dynamic Kubelet config, where flag           
precedence was not enforced prior to dynamic config validation in the           
controller; this prevented rejection of dynamic configs that don't merge        
well with values set via legacy flags. 

Fixes #63305 

```release-note
NONE
```
2018-05-21 17:05:34 -07:00
Kubernetes Submit Queue f5fb740f06
Merge pull request #59414 from mbohlool/test_cycle
Automatic merge from submit-queue (batch tested with PRs 59414, 64096). 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 cyclic dependency of apiserver test for OpenAPI test

Fixes #41748

```release-note
NONE
```
2018-05-21 12:14:07 -07:00
Kubernetes Submit Queue 5c7add3c75
Merge pull request #64069 from ibrasho-forks/fix-error-message
Automatic merge from submit-queue (batch tested with PRs 64069, 64087). 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 error message

**What this PR does / why we need it**:
This PR fixes a minor mistake in an error message in `Equalities.DeepEqual`. I've tried to trace this mistake but could not find out where it originated.

**Release note**:
```release-note
NONE
```
2018-05-21 10:48:14 -07:00
mbohlool 9e94cf72a8 Update bazel 2018-05-20 22:19:06 -07:00
mbohlool e979b16987 Fix cyclic dependency of apiserver test for OpenAPI test 2018-05-20 22:19:06 -07:00
Kubernetes Submit Queue b87105aebd
Merge pull request #64004 from mbohlool/apiservice_order
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>.

Sort API Services by Kube-Version order

Sort API services based on kube-version format. If the version does not have kube-version format.

kube-version format: `v[MajorVersion]((alpha|beta)[minorVersion])?`
e.g. v1alpha1, v4, v21beta12

Sort base on:
Version type first: GA>Beta>Alpha
Major version then Minor version (if exists).

```release-note
APIServices with kube-like versions (e.g. v1, v2beta1, etc.) will be sorted appropriately within each group. 
```
2018-05-20 20:43:24 -07:00
Michael Taufen 647e90341c Kubelet config: Validate new config against future feature gates
This fixes an issue with KubeletConfiguration validation, where the
feature gates set by the new config were not taken into account.

Also fixes a validation issue with dynamic Kubelet config, where flag
precedence was not enforced prior to dynamic config validation in the
controller; this prevented rejection of dynamic configs that don't merge
well with values set via legacy flags.
2018-05-20 13:15:59 -07:00
Mehdy Bohlool cc87ba3a12 Generated files 2018-05-20 01:40:05 -07:00
Mehdy Bohlool 97ada15fbe Sort API Services by Kube-Version order 2018-05-20 01:40:04 -07:00
Ibrahim AshShohail 73f4cd89af
Fix error message in Equalities.DeepEqual
Signed-off-by: Ibrahim AshShohail <me@ibrasho.com>
2018-05-20 02:22:09 +03:00
Kubernetes Submit Queue 7909712ca5
Merge pull request #60464 from roycaihw/loadconfig
Automatic merge from submit-queue (batch tested with PRs 63598, 63913, 63459, 63963, 60464). 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>.

Client-go raises error on duplicated name in kubeconfig

(for NamedCluster, NamedContext, NamedUser, NamedExtension)



**What this PR does / why we need it**:
Client should detect duplicated name when loading `name-value` based lists in kubeconfig: `users`, `clusters`, `contexts`. Currently if there are multiple value with same name, `client-python` will pick the first one, while `client-go` will pick the last.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref: kubernetes-client/python#445, kubernetes-client/python-base#47

**Special notes for your reviewer**:

**Release note**:

```release-note
kubectl and client-go now detects duplicated name for user, cluster and context when loading kubeconfig and reports error 
```

/sig api-machinery

cc @brendandburns @mbohlool
2018-05-19 06:49:27 -07:00
Kubernetes Submit Queue 4810b9ba67
Merge pull request #63913 from deads2k/controller-10-event
Automatic merge from submit-queue (batch tested with PRs 63598, 63913, 63459, 63963, 60464). 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 event ref determination for apigroups

The event ref determination was never updated to handle apigroups so it has been returning only a group (not a version).

@kubernetes/sig-apps-bugs 

```release-note
event object references with apiversion will now report an apiversion.
```
2018-05-19 06:49:16 -07:00
Kubernetes Submit Queue 4b0b91ae31
Merge pull request #63598 from nikhita/subresources-to-beta
Automatic merge from submit-queue (batch tested with PRs 63598, 63913, 63459, 63963, 60464). 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>.

apiextensions: promote CustomResourcesSubresources to beta

Fixes #62786

This PR promotes the CustomResourcesSubResources feature to beta and makes it enabled by default.

**Release note**:

```release-note
Subresources for custom resources is now beta and enabled by default. With this, updates to the `/status` subresource will disallow updates to all fields other than `.status` (not just `.spec` and `.metadata` as before). Also, `required` can be used at the root of the CRD OpenAPI validation schema when the `/status` subresource is enabled.
```

/assign sttts deads2k 
/sig api-machinery
/area custom-resources
2018-05-19 06:49:12 -07:00
Haowei Cai 4e114fd65b generated 2018-05-18 18:42:39 -07:00
Haowei Cai cd13c41dde Add GET PATCH support for two /status:
apiservices/status under apiregistration.k8s.io
certificatesigningrequests/status under certificates.k8s.io
2018-05-18 18:31:27 -07:00
Haowei Cai e9454a383b Raise error on duplicate name in kubeconfig
for NamedCluster, NamedContext, NamedUser, NamedExtension
2018-05-18 17:56:46 -07:00
Mikhail Mazurskiy 5e8e570dbd
Use Dial with context 2018-05-19 08:14:37 +10:00
David Eads b2be8953b1 fix event ref determination for apigroups 2018-05-18 11:36:57 -04:00
Kubernetes Submit Queue 23d3b6fc79
Merge pull request #63716 from JacobTanenbaum/healthz
Automatic merge from submit-queue (batch tested with PRs 63920, 63716, 63928, 60553, 63946). 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 InstallPathHandler which allows for more then one path to be associated with health checking.

Currently it is only possible to have one group of checks which must all pass for the handler to report success.
Allowing multiple paths for these checks allows use of the same machinery for other kinds of checks, i.e. readiness.



**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
NONE
```
2018-05-18 01:07:14 -07:00
Kubernetes Submit Queue c13bd2bec2
Merge pull request #63957 from hzxuzhonghu/rm-UID-ctx
Automatic merge from submit-queue (batch tested with PRs 63871, 63927, 63966, 63957, 63844). 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 UID mutation from request.context

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

remove UID mutation from request.context, which is no use currently.

Fixes #59775

**Special notes for your reviewer**:

**Release note**:

```release-note
Remove UID mutation from request.context.
```
2018-05-17 13:40:25 -07:00
Kubernetes Submit Queue b3837d004a
Merge pull request #63469 from wojtek-t/allow_list_and_watch_secrets
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>.

Allow for listing & watching individual secrets from nodes

This PR:
- propagates value of `metadata.name` field from fieldSelector to `name` field in RequestInfo (for list and watch requests)
- authorizes list/watch for requests for single secrets/configmaps coming from nodes

As an example:
```
/api/v1/secrets/namespaces/ns?fieldSelector=metadata.name=foo =>
  requestInfo.Name = "foo",
  requestInfo.Verb = "list"
/api/v1/secrets/namespaces/ns?fieldSelector=metadata.name=foo&watch=true =>
  requestInfo.Name = "foo",
  requestInfo.Verb = "list"
```

```release-note
list/watch API requests with a fieldSelector that specifies `metadata.name` can now be authorized as requests for an individual named resource
```
2018-05-17 07:09:43 -07:00
xuzhonghu 84678b2882 update bazel 2018-05-17 11:58:26 +08:00
xuzhonghu 7ea612db16 remove request context.WithUID 2018-05-17 11:58:26 +08:00
Andrew Lytvynov 85a61ff3aa Extract connection rotating dialer into a package
This will be re-used for exec auth plugin to rotate connections on
credential change.
2018-05-16 10:30:53 -07:00
Kubernetes Submit Queue baad3d4159
Merge pull request #63875 from deads2k/client-10-timeout
Automatic merge from submit-queue (batch tested with PRs 63875, 63817). 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 TestGetServerGroupsWithTimeout more reliable

Stops overriding a global variable in a test and tolerates a different kind of timeout message you can see.

/assign @soltysh
2018-05-16 08:26:12 -07:00
Kubernetes Submit Queue 2fcac6abf2
Merge pull request #63314 from mtaufen/dkcfg-structured-status
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>.

Move to a structured status for dynamic kubelet config

This PR updates dynamic Kubelet config to use a structured status, rather than a node condition. This makes the status machine-readable, and thus more useful for config orchestration. 

Fixes: #56896

```release-note
The status of dynamic Kubelet config is now reported via Node.Status.Config, rather than the KubeletConfigOk node condition.
```
2018-05-15 19:41:36 -07:00
Kubernetes Submit Queue 0e42990eee
Merge pull request #63880 from sttts/sttts-move-scheme-ref-obj-to-smp
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>.

apimachinery: move schema reference object into smp patcher

The schema reference object is only used in the strategic merge patch code path. This PR moves the creation there.

This PR is a preparation to make the patcher compatible with the UnstructuredObjectConverter without internal types. It will allow us to return an error on missing kinds at https://github.com/kubernetes/kubernetes/pull/63830#discussion_r188171025.
2018-05-15 18:50:48 -07:00
Kubernetes Submit Queue 49e9322d4f
Merge pull request #63861 from deads2k/client-09-clean
Automatic merge from submit-queue (batch tested with PRs 63589, 63644, 63861, 63872, 63847). 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 service.deletecollection since the server doesn't support it

Updates the generated service client to match the API available.

@kubernetes/sig-api-machinery-pr-reviews 
@kubernetes/api-reviewers 

```release-note
NONE
```
2018-05-15 17:09:14 -07:00
Kubernetes Submit Queue b726b2ef5d
Merge pull request #63589 from hanxiaoshuai/cleanup0509
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>.

clean unused code in restmapper_test.go

**What this PR does / why we need it**:
clean unused code in restmapper_test.go
**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**:
/kind cleanup
**Release note**:

```release-note
NONE
```
2018-05-15 16:49:43 -07:00
wojtekt c69165d503 Autogenerated code 2018-05-15 21:38:54 +02:00
wojtekt a4c35f31f2 Fix fakeclient List 2018-05-15 21:36:19 +02:00
Kubernetes Submit Queue a3d79c39f4
Merge pull request #63705 from sttts/sttts-cr-validation-multiple-errors
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>.

apiextensions: normalize CR validation to return multiple errors

Deduplicated and use of the `allErrs` pattern we have elsewhere.
2018-05-15 12:26:22 -07:00
Michael Taufen fcc1f8e7b6 Move to a structured status for dynamic Kubelet config
Updates dynamic Kubelet config to use a structured status, rather than a
node condition. This makes the status machine-readable, and thus more
useful for config orchestration.

Fixes: #56896
2018-05-15 11:25:12 -07:00
Kubernetes Submit Queue f2ea83bef8
Merge pull request #63550 from juanvallejo/jvallejo/move-cached-discovery
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>.

move cached_discovery to client-go/discovery

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

Moves the cmd/util CachedDiscoveryClient to client-go

cc @soltysh @deads2k
2018-05-15 10:47:01 -07:00
Dr. Stefan Schimanski 9745d6c119 apiextensions: only create patch reference object for smp path 2018-05-15 19:45:48 +02:00
David Eads e7620e814a make TestGetServerGroupsWithTimeout more reliable 2018-05-15 12:47:23 -04:00
Kubernetes Submit Queue bd0d093701
Merge pull request #63779 from wojtek-t/number_of_watchers_metrics
Automatic merge from submit-queue (batch tested with PRs 63792, 63495, 63742, 63332, 63779). 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>.

Track a metrics of number of registered watchers in apiserver
2018-05-15 09:04:32 -07:00
Kubernetes Submit Queue 944e07480f
Merge pull request #63742 from thockin/kill-tolerate-unready-annotation
Automatic merge from submit-queue (batch tested with PRs 63792, 63495, 63742, 63332, 63779). 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>.

Actually support service `publishNotReadyAddresses`

This was added and the annotation was deprecated, but it was never
implemented.

xref #63741

**Release note**:

```release-note
The annotation `service.alpha.kubernetes.io/tolerate-unready-endpoints` is deprecated.  Users should use Service.spec.publishNotReadyAddresses instead.
```
2018-05-15 09:04:24 -07:00
David Eads eb438b088c generated 2018-05-15 11:31:00 -04:00
David Eads 0c1c58846d stop generating service deletecollection 2018-05-15 11:30:59 -04:00
juanvallejo 57f308ae60 restore old cached client behavior 2018-05-15 10:37:53 -04:00
juanvallejo 4059355743 move cached_discovery to client-go/discovery 2018-05-15 10:20:56 -04:00
wojtekt f344c5c062 Requires single name for list and watch 2018-05-15 14:19:21 +02:00
Kubernetes Submit Queue d0f4a8fa17
Merge pull request #62695 from CaoShuFeng/duplicated_status
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>.

avoid duplicate status in audit events

Fixes: https://github.com/kubernetes/kubernetes/issues/60108



**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**:
/assign @sttts @tallclair 

**Release note**:

```
Action required: When Response is a metav1.Status, it is no longer copied into the audit.Event status. Only the "status", "reason" and "code" fields are set.
```
2018-05-15 03:44:36 -07:00
Kubernetes Submit Queue 6aa6051fab
Merge pull request #63557 from apelisse/dry-run-path
Automatic merge from submit-queue (batch tested with PRs 63603, 63557, 62015). 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>.

apiserver: Fail if dry-run query param is specified

Adds a dry-run query parameter now that does nothing but reject the request. The sooner we have this check in master, the safer it will be for clients to send dry-run requests that are not going to be applied nonetheless.

```release-note
Create a new `dryRun` query parameter for mutating endpoints. If the parameter is set, then the query will be rejected, as the feature is not implemented yet. This will allow forward compatibility with future clients; otherwise, future clients talking with older apiservers might end up modifying a resource even if they include the `dryRun` query parameter.
```
2018-05-15 02:07:41 -07:00
Kubernetes Submit Queue a1b54f3c99
Merge pull request #63100 from ravisantoshgudimetla/priority-beta-api
Automatic merge from submit-queue (batch tested with PRs 55511, 63372, 63400, 63100, 63769). 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 pkg/scheduling/apis/v1beta1 and move priorityClass to beta 

**What this PR does / why we need it**:
This is for creating pkg/apis/scheduling/v1beta1 so that priorityClasses could be moved to beta.

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

**Special notes for your reviewer**:
/cc @bsalamat @aveshagarwal 

**Release note**:

```release-note
The `PriorityClass` API is promoted to `scheduling.k8s.io/v1beta1`
```
2018-05-14 14:35:21 -07:00
Tim Hockin c038f60d04 Actually support service `publishNotReadyAddresses`
This was added and the annotation was deprecated, but it was never
implemented.
2018-05-14 14:19:54 -07:00
Antoine Pelisse 98613924ea apiserver: Fail if dry-run query param is specified 2018-05-14 11:20:57 -07:00
Eric Chiang 66f2622bb7
client-go: remove dep on pflag 2018-05-14 09:48:36 -07:00
wojtekt bdd9492da0 Track number of registered watchers in apiserver 2018-05-14 15:10:42 +02:00
Dr. Stefan Schimanski 5d66dc9338 apiextensions: normalize CR validation to return multiple errors 2018-05-14 10:16:19 +02:00
ravisantoshgudimetla f20bd00ab2 Generated 2018-05-12 02:01:09 -04:00
ravisantoshgudimetla 1db5990013 Move scheduling api to beta 2018-05-12 02:01:04 -04:00
Devdatta Kulkarni 3e22383a8a Added documentation of how client-go interfaces with custom controller code
**What this PR does / why we need it**:

The sample-controller makes extensive use of various mechanisms
available in the client-go library. For writing custom controllers/operators
it will be helpful if there is precise description of how the
client-go library works and how/where it interfaces with
custom controller code.

This patch adds documentation that sheds light on how (parts) of the
client-go library work and its interaction-points with
controller code. The documentation and the diagram comes from [1],
(link included here for reference purpose).

[1] https://medium.com/@cloudark/kubernetes-custom-controllers-b6c7d0668fdf

Contributing the diagram and the writeup was recommended by
by @sttts and @nikhita on https://github.com/kubernetes/sample-controller/issues/13

**Release note**:

```release-note
NONE
```
2018-05-11 17:04:03 -05:00
Kubernetes Submit Queue 92ba95c39c
Merge pull request #63446 from deads2k/client-08-remove-old
Automatic merge from submit-queue (batch tested with PRs 63367, 63718, 63446, 63723, 63720). 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>.

finish new dynamic client and deprecate old dynamic client

Builds on a couple other pulls.  This completes the transition to the new dynamic client.

@kubernetes/sig-api-machinery-pr-reviews 
@caesarxuchao @sttts 

```release-note
The old dynamic client has been replaced by a new one.  The previous dynamic client will exist for one release in `client-go/deprecated-dynamic`.  Switch as soon as possible.
```
2018-05-11 14:49:16 -07:00
Kubernetes Submit Queue 769b7dadca
Merge pull request #63619 from roycaihw/get-crd-status
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>.

CRD Status subresource support get+update+patch

CRD Status previously only supports PUT and returns 405 on GET and PATCH

/assign @sttts 
/sig api-machinery

**Release note**:

```release-note
CustomResourceDefinitions Status subresource now supports GET and PATCH
```
2018-05-11 13:26:50 -07:00
David Eads fd044d152e fix dynamic client name 2018-05-11 13:12:09 -04:00
Haowei Cai 0386e9bf75 Add GET PATCH support for crd status 2018-05-11 09:20:53 -07:00
Jacob Tanenbaum 2082a0f428 Add InstallPathHandler which allows for more then one path to be associated with health checking.
Currently it is only possible to have one group of checks which must all pass for the handler to report success.
Allowing multiple paths for these checks allows use of the same machinery for other kinds of checks, i.e. readiness.
2018-05-11 11:06:50 -04:00
Kubernetes Submit Queue 233b267392
Merge pull request #63667 from hzxuzhonghu/wait-informer-synced
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 admission wait for informer sync before serving

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

sample-apiserver admission wait for informer sync before serving

**Release note**:

```release-note
NONE
```
2018-05-11 05:13:36 -07:00
David Eads d8924bc1c9 move old dynamic client to deprecated-client 2018-05-11 08:00:46 -04:00
David Eads 82e32d2a32 add subresource support for the dynamic client 2018-05-11 08:00:03 -04:00
Kubernetes Submit Queue 82abc961b9
Merge pull request #63703 from hzxuzhonghu/fix-typo
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 typo in apiextentions apiserver

the comment should be apiextentions apiserver

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-11 04:20:53 -07:00
Kubernetes Submit Queue afd93b6e46
Merge pull request #63185 from hanxiaoshuai/fixbug0426
Automatic merge from submit-queue (batch tested with PRs 63246, 63185). 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 checks validation MinRequestTimeout of ServerRunOptions

**What this PR does / why we need it**:
add checks validation MinRequestTimeout of ServerRunOptions
**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**:
I think we should check MinRequestTimeout > 0 (like  RequestTimeout), in Validate() of ServerRunOptions. If it is not necessary, close this PR.Thanks
**Release note**:

```release-note
NONE
```
2018-05-11 03:30:13 -07:00
xuzhonghu 0c77bcd3ea fix typo 2018-05-11 17:17:16 +08:00
Kubernetes Submit Queue e59ae29fbc
Merge pull request #63468 from jeffchanjunwei/master
Automatic merge from submit-queue (batch tested with PRs 59727, 63468). 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 annotation of APIGroupInfo

**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
NONE
```
2018-05-10 20:50:19 -07:00
Kubernetes Submit Queue 7eb88f11d2
Merge pull request #59727 from wgliang/master.time
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>.

should use time.Since instead of time.Now().Sub

**What this PR does / why we need it**:
should use time.Since instead of time.Now().Sub

**Special notes for your reviewer**:
2018-05-10 20:29:40 -07:00
Jeff Chan f8386d5b0f
Merge branch 'master' into master 2018-05-11 10:03:32 +08:00
xuzhonghu ec30ad48b8 sample-apiserver admission wait for informer sync before serving 2018-05-11 09:23:39 +08:00
Kubernetes Submit Queue 0bdb73c05d
Merge pull request #62194 from AdamDang/patch-1
Automatic merge from submit-queue (batch tested with PRs 62665, 62194, 63616, 63672, 63450). 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>.

Correct the returned message

Line 73 and line 103:
return fmt.Errorf("expected ResponseBody to be nil, got non-nill '%s'", events[i].ResponseObject.Raw)
"non-nill" should be changed to "non-nil"
2018-05-10 12:56:16 -07:00
Kubernetes Submit Queue 7e75a09db6
Merge pull request #63613 from deads2k/cli-52-builderclient
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>.

 construct resource.Builder from kubeconfig flags

updates the resource.Builder to be constructed from the kubeconfig flags struct/interface that we now have.

@kubernetes/sig-cli-maintainers 
@juanvallejo @soltysh 

```release-note
NONE
```
2018-05-10 09:03:11 -07:00
Kubernetes Submit Queue 9dcbdc3d45
Merge pull request #60200 from dixudx/clientgo_openstack_config
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>.

read openstack auth config from client config

**What this PR does / why we need it**:
> // TODO: read/persist client configuration(OS_XXX env vars) in config

/sig openstack

**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**:
/assign @dims
**Release note**:

```release-note
read openstack auth config from client config
```
2018-05-10 08:15:45 -07:00
David Eads 1f5357034b construct resource.Builder from kubeconfig flags 2018-05-10 09:42:15 -04:00
Nikhita Raghunath 0e32006109 update generated files 2018-05-10 18:24:04 +05:30
Nikhita Raghunath 3ed5cc3954 Promote CustomResourcesSubresources to beta 2018-05-10 18:24:04 +05:30
Kubernetes Submit Queue e63f25902c
Merge pull request #63587 from sttts/sttts-crd-test-conflict-errs
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>.

apiextensions: handle CRD conflict errs in integration tests

In the integration tests we assume that no other party modifies CRDs while the test is updating them repeatedly. Due to semantic changes for CRD conditions (https://github.com/kubernetes/kubernetes/pull/63068) and the introduction of `status.storedVersions` (https://github.com/kubernetes/kubernetes/pull/63518), this assumption will not hold true in the future. This PR prepares the test to handle conflict errors gracefully.
2018-05-10 03:28:54 -07:00
Dr. Stefan Schimanski 5b78c3a41d 6capiextensions: handle CRD conflict errs in integration tests 2018-05-10 10:45:29 +02:00
Kubernetes Submit Queue d42df4561a
Merge pull request #61976 from atlassian/ticker-with-stop
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>.

Stop() for Ticker to enable leak-free code

**What this PR does / why we need it**:
I wanted to use the clock package but the `Ticker` without a `Stop()` method is a deal breaker for me.

**Release note**:
```release-note
NONE
```
/kind enhancement
/sig api-machinery
2018-05-09 19:06:56 -07:00
Kubernetes Submit Queue b2fe2a0a6d
Merge pull request #59847 from mtaufen/dkcfg-explicit-keys
Automatic merge from submit-queue (batch tested with PRs 63624, 59847). 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>.

explicit kubelet config key in Node.Spec.ConfigSource.ConfigMap

This makes the Kubelet config key in the ConfigMap an explicit part of
the API, so we can stop using magic key names.
    
As part of this change, we are retiring ConfigMapRef for ConfigMap.


```release-note
You must now specify Node.Spec.ConfigSource.ConfigMap.KubeletConfigKey when using dynamic Kubelet config to tell the Kubelet which key of the ConfigMap identifies its config file.
```
2018-05-09 17:55:13 -07:00
Kubernetes Submit Queue 662f543ebf
Merge pull request #63593 from justinsb/typo_in_envelope_error_message
Automatic merge from submit-queue (batch tested with PRs 63593, 63539). 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 typo in envelope transform error message

genvelope -> envelope

```release-note
NONE
```
2018-05-09 14:49:11 -07:00
Kubernetes Submit Queue ca92b73a65
Merge pull request #63602 from deads2k/cli-54-categories
Automatic merge from submit-queue (batch tested with PRs 59284, 63602). 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>.

 category expansion can only come from the server

A couple release ago we moved category expansion to the server instead of hardcoding it in the client.  Similar to restmappings, there is no valid client-side expansion anymore, so this removes the code that hardcoded the list and moves the category expansion to the same package as our discovery based restmappers.

@kubernetes/sig-cli-maintainers 

```release-note
NONE
```
2018-05-09 13:51:13 -07:00
Kubernetes Submit Queue d89471c4b5
Merge pull request #59284 from Addepar/fix-empty-null-patch
Automatic merge from submit-queue (batch tested with PRs 59284, 63602). 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>.

Exclude keys containing empty patches in the final patch

**What this PR does / why we need it**: 
This minimizes the 3-way JSON merge patch generated when calculating the patch necessary to send to the server. It does this by removing empty maps created from deleting keys in the keepOrDeleteNullInObj method.

This is not only a slight performance improvement (less PATCH requests) but also necessary when working with custom resources that have RBAC restrictions.

**Which issue(s) this PR fixes**: N/A

**Special notes for your reviewer**: N/A

**Release note**:

```release-note
NONE
```
2018-05-09 13:51:09 -07:00
David Eads ad87219b2c category expansion can only come from the server 2018-05-09 15:05:58 -04:00
David Eads 37f6cb7230 move category expansion types to restmapper package 2018-05-09 15:03:09 -04:00
Kubernetes Submit Queue 234939dced
Merge pull request #63502 from liggitt/parallel-discovery
Automatic merge from submit-queue (batch tested with PRs 62354, 62934, 63502). 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>.

Run resource discovery in parallel

best viewed ignoring whitespace (https://github.com/kubernetes/kubernetes/pull/63502/files?w=1)

on high-latency connections, serializing resource discovery requests across group versions can take significant amounts of time. this parallelizes the network request portion of the discovery call

xref #63368 

```release-note
NONE
```
2018-05-09 09:30:15 -07:00
Justin Santa Barbara 8f87e5c7da Fix typo in envelope transform error message 2018-05-09 09:36:29 -04:00
Kubernetes Submit Queue ca76734126
Merge pull request #63533 from sttts/sttts-required-with-status-subresource
Automatic merge from submit-queue (batch tested with PRs 59034, 63565, 63533). 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>.

apiextensions: allow "required" at root with status subresource

In the subresources alpha we intentionally disallowed anything than `properties` at the root of the validation schema in order to allow us to project it to the .status subtree. By doing this we also disallowed `required` at the root which is necessary to enforce e.g. a spec to be set. This PR fixes this.

Moreover, it fixes that the restriction is only enforced when the status subresource is actually enabled. Before this PR we were enforcing the restriction as soon as the feature gate was enabled, leading to a backwards incompatible change.

```release-note
Allow "required" to be used at the CRD OpenAPI validation schema when the /status subresource is enabled.
```

There was an issue reporting the bug. But cannot find it.
2018-05-09 05:13:15 -07:00
Kubernetes Submit Queue 3663dc757e
Merge pull request #63565 from roycaihw/bump-kube-openapi-dep
Automatic merge from submit-queue (batch tested with PRs 59034, 63565, 63533). 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>.

Bump kube-openapi dependency

picks: https://github.com/kubernetes/kube-openapi/pull/67
ref: https://github.com/kubernetes/kubernetes/issues/63494

**Release note**:

```release-note
NONE
```
2018-05-09 05:13:12 -07:00
hangaoshuai 61cb6df4d7 clean unused code in restmapper_test.go 2018-05-09 19:37:48 +08:00
Kubernetes Submit Queue f5f13cc5d1
Merge pull request #63385 from CaoShuFeng/customresource_status
Automatic merge from submit-queue (batch tested with PRs 63537, 63385). 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>.

[CustomResourceSubresources] fix status subresource

This change make the codes consistent with the document.
Fixes: https://github.com/kubernetes/kubernetes/issues/63359



**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**:
/assign @nikhita 
**Release note**:

```release-note
When updating /status subresource of a custom resource, only the value at the `.status` subpath for the update is considered.
```
2018-05-09 04:03:06 -07:00
Kubernetes Submit Queue 5d6997ad02
Merge pull request #63537 from fisherxu/returnErr
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>.

Return error when has no RequestInfo in handlerchain

**What this PR does / why we need it**:
we should return error when has no RequestInfo.
**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-05-09 03:37:33 -07:00
Dr. Stefan Schimanski 1558da15f1 apiextensions: allow "required" at root with status subresource 2018-05-09 10:25:44 +02:00
Jordan Liggitt d037b0893f
Run resource discovery in parallel 2018-05-08 23:24:34 -04:00
Haowei Cai 18fd392c13 generated 2018-05-08 17:36:05 -07:00
Michael Taufen c41cf55a2c explicit kubelet config key in Node.Spec.ConfigSource.ConfigMap
This makes the Kubelet config key in the ConfigMap an explicit part of
the API, so we can stop using magic key names.

As part of this change, we are retiring ConfigMapRef for ConfigMap.
2018-05-08 15:37:26 -07:00
David Eads c5445d3c56 simplify api registration 2018-05-08 18:33:50 -04:00
David Eads 7b4f97aca3 generated 2018-05-08 18:32:44 -04:00
Kubernetes Submit Queue a848537dbb
Merge pull request #63070 from hanxiaoshuai/fix0424
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>.

Refactor hard code in rest_test.go

**What this PR does / why we need it**:
Refactor hard code in rest_test.go
**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-05-08 14:07:08 -07:00