Commit Graph

77 Commits

Author SHA1 Message Date
Joe Betz ee219411ed Add ResourceVersionMatch parameter to make Resource Version semantics consistent for list
Kubernetes-commit: e214f2408b59c745c199645547948a8ad2a87ac2
2020-05-29 10:44:26 -07:00
Jordan Liggitt c02923d8c7 apiserver: increment metric for deprecated API use
Kubernetes-commit: e4bb1daecf36aac3051d36a20dfdf7ea3050de58
2020-04-30 12:21:29 -04:00
Jordan Liggitt 7add3b408a apiserver: add warnings for deprecated APIs
Kubernetes-commit: e06b0635de5983aa115e2073c7335ad2bc8985cb
2020-04-14 16:11:21 -04:00
Jordan Liggitt d7d5d84691 apiserver: add API server plumbing for adding warnings
Kubernetes-commit: e5e557e90257d5bc69f1fabf253f87491e0868b2
2020-04-14 16:10:54 -04:00
SataQiu 6b9950ac7e fix kube-apiserver panic when CRD Kind contains only one letter
Signed-off-by: SataQiu <1527062125@qq.com>

Kubernetes-commit: 2c8c9d02098a975ee3f42c6a6d29579da8502b6d
2020-06-06 23:01:35 +08:00
yue9944882 099ec78c1b exclude openapi params for DELETECOLLECTION
Kubernetes-commit: 6a7aa377f2894fe392906982afade19501783aa6
2020-05-14 11:14:23 +08:00
Jordan Liggitt 532d284317 Require listers to implement TableConverter
Kubernetes-commit: 7cbb74d089f88c3323b7be2dcd8a8d39d8aad271
2020-03-09 10:08:13 -04:00
Dao Hoang Son 4a26259a7c Register full object as return type for `DELETE` web services.
Related to https://github.com/kubernetes/kubernetes/issues/59501

Maybe related to https://github.com/kubernetes/enhancements/pull/1263

Kubernetes-commit: 4d33d837c8be778044d50755de83f8738e957c13
2020-01-24 21:50:29 +07:00
jennybuckley 49914e3423 Refactor fieldmanager to be more modular
Kubernetes-commit: d72260b9dad186d96aa621dc8594ca9bd6088937
2019-09-19 13:14:36 -07:00
jennybuckley 6c75819b84 Split fieldmanager with interface
Kubernetes-commit: 2c67bf47db8557b6481a5181bdae924e91665988
2019-09-12 10:57:21 -07:00
Clayton Coleman 72566fea6c Replace HTTP compression with an inline handler
The previous HTTP compression implementation functioned as a filter, which
required it to deal with a number of special cases that complicated the
implementation.

Instead, when we write an API object to a response, handle only that one
case. This will allow a more limited implementation that does not impact
other code flows.

Also, to prevent excessive CPU use on small objects, compression is
disabled on responses smaller than 128Kb in size.

Kubernetes-commit: 4ed2b9875d0498b5c577095075bda341e96fcec2
2019-05-04 17:36:36 -04:00
Jordan Liggitt 6562ecd83a Add GetResourceMapper to admission ObjectInterfaces
Kubernetes-commit: 92f735042e1cae38afe74364c036489fb7a81973
2019-05-13 11:24:20 -04:00
Haowei Cai 7620fd14c0 install deleteoptions in deletecollection endpoints
Kubernetes-commit: 277a7413370e56c98f5dc8633660c5e4ea4df13c
2019-05-13 16:13:13 -07:00
Clayton Coleman c8f7d5017d Make RequestScope be a pointer consistently for better memory use
RequestScope is a large struct and causes stack growth when we pass
it by value into multiple stack levels. Avoid the allocations for
this read only struct by passing a pointer.

Kubernetes-commit: 8fede0b18a81a6fb1acc1a48857f482857c25286
2019-03-25 23:33:48 -04:00
Clayton Coleman 78a40897c5 Unify runtime.SerializerInfo with negotiate.AcceptedMediaTypes
There was no reason to have two types and this avoids ~10% of allocations
on the GET code path.

```
BenchmarkGet-12          	  100000	    109045 ns/op	   17608 B/op	     146 allocs/op

BenchmarkGet-12          	  100000	    108850 ns/op	   15942 B/op	     132 allocs/op
```

Kubernetes-commit: 0489d0b1cf139253b82f73b072578073bc5616d6
2019-03-21 21:00:55 -04:00
Chao Xu d99ef88606 Expose storage version hash
Kubernetes-commit: 3b618af0d435628feedf06f97bd1c69340d07d95
2019-01-14 19:31:25 -08:00
Haowei Cai ac8e3dd3bb apiserver: make endpoint webservice builder helpers public
Kubernetes-commit: 5a971f045364ae12608b2acef1e69acef0805d18
2019-03-04 08:14:41 -08:00
Chao Xu 4ebbf20f41 Adding a limit on the maximum bytes accepted to be decoded in a resource
write request.

Kubernetes-commit: b971b12d3cfa8887aa87957fbba92b90e3e99dc6
2019-02-06 16:58:24 -08:00
Zhenguo Niu c4e066e6be Clean up unneeded break in switch
There's no need to explicitly add break after every case, as switch
statements will break automatically.

Kubernetes-commit: 7cef40cb831e0238528fbf9fe0f8e76212da0c5e
2018-08-30 15:03:50 +08:00
Antoine Pelisse 337fc9ccde API Machinery, Kubectl and tests
Kubernetes-commit: 0e1d50e70fdc9ed838d75a7a1abbe5fa607d22a1
2019-01-16 21:14:42 -08:00
Dr. Stefan Schimanski b4ca200ede apiserver: add component label to request metrics
Kubernetes-commit: 7190b17e5a52a7c0673c2e8a30cbe95f2847a6df
2018-11-29 16:30:15 +01:00
Dr. Stefan Schimanski 0f8de8e61f apiserver: add group+version to request metrics
Kubernetes-commit: ff6e028755163ef52ad135da9f5d800c5749632c
2018-11-29 16:03:37 +01:00
jennybuckley 7cc3f112fb Build OpenAPI Definitions per group instead of per resource
Kubernetes-commit: 758e8623e9b08065f053bedf4474626696b6346c
2018-11-14 12:50:02 -08:00
Neha Yadav 3e6dd50d69 fix(bug): make body a optional parameter in [DELETE] /apis/batch/v1/namespaces/{namespace}/jobs/{name}
Kubernetes-commit: 31372f16129b3f6fa50e85e175643b3a43ba3da2
2018-10-27 00:40:10 +05:30
Jordan Liggitt dba666528b Allow specifying the hub group-version for a handler
Kubernetes-commit: 0e9b06df0f21b421ff69fd455d4542883d61e8c3
2018-10-22 10:14:52 -04:00
Zhenguo Niu 277a076fa4 Remove unnecessary concatenation of strings
Remove unnecessary concatenation of strings "/{" + "namespace" + "}/"

Kubernetes-commit: 70fd811f84cdb7f435153a69612d495fe617162e
2018-08-30 20:11:59 +08:00
Haowei Cai 56ca9f4a1c Add Create and Update Options to rest param installation
Kubernetes-commit: e0162b9105080f9472c1cbbab82a90b6ac2baebc
2018-10-02 17:21:07 -07:00
Jordan Liggitt 520d366673 document /watch prefix deprecation
Kubernetes-commit: c31faf2509e7431948a08c9b474858b753188781
2018-06-15 11:21:56 -04:00
jennybuckley 1232b1c9c4 Skip building openapi for ignored paths
Kubernetes-commit: 37c10e2e05b31fd65ca865744d745f60fea7d0c3
2018-07-24 16:11:42 -07:00
Haowei Cai f67bbdae95 Add Accepted to delete response path
Kubernetes-commit: b4b84e023bec4639d9d618cd987f1ee71939f70f
2018-05-03 18:00:51 -07:00
jennybuckley 900791d3ac Add additional authorization check for create-on-update
Kubernetes-commit: cc5c17e554a4d8f802043b337ca0787ec0ce7475
2018-07-03 11:20:16 -07:00
Cong Ding 5081ebb434 cleanup: remove deadcode
Kubernetes-commit: 3bacb04a5f9805bb83e016e341a49d0f13a43598
2018-06-22 16:39:13 -07:00
xuzhonghu 6fc16b5a67 transform ConnectMethods to kube verbs
Kubernetes-commit: 8c820ae303b253cde5d690eac5eec05a0e707c27
2018-06-27 11:14:36 +08:00
jennybuckley f87486fed9 Expose openapi schema to handlers
Kubernetes-commit: dee088586a76b876c473418efba8190be7fa6b26
2018-05-24 09:55:19 -07:00
David Eads b7f90743d0 remove rootscopedkinds from groupmeta
Kubernetes-commit: 8ae62517da5eff6d6bad21badfd39ee88463ad42
2018-04-30 13:27:01 -04:00
Jordan Liggitt 91142e772a Collapse onto request scope convertor
Kubernetes-commit: 2c1a689952ec34e3f9ecb7bcd1772c3fa35c9597
2018-04-26 16:21:38 -04:00
jennybuckley 56ec7f69aa Remove unnecessary typer from create/update handlers
Kubernetes-commit: 5e23dd0517f493011e7c529464f448d6b2ae9ef7
2018-04-23 12:29:37 -07:00
David Eads 14e43f49d6 rest mappings cannot logically be object converters
Kubernetes-commit: 6900f8856f8cd9a6c94a156b9e4a9fee0c16f807
2018-04-24 18:31:41 -04:00
Jordan Liggitt 25758bf0f8 Remove request context mapper
Kubernetes-commit: 8ea88a5092c767fc3141512db924fd0435f7670e
2018-04-18 11:12:15 -04:00
Clayton Coleman 7b21554cfc Make Service storage a wrapper around other storages
The registry abstraction is unnecessary and adds direct coupling to the
core types. By using a wrapper, we carry through the default
implementations of the non-mutating operations. The DeleteCollection
method is explicitly patched out since it cannot be correctly
implemented on the storage currently.

As a result, TableConvertor is now exposed.

A few other minor refactorings

* Corrected the case of some variables
* Used functions instead of methods for several helper methods
* Removed the legacy Deleter - service was the only remaining consumer

Kubernetes-commit: 110b064d630ca39220696225dd597e7d33b95f4f
2018-02-04 22:38:39 -05:00
Mike Danese cee5e95803 remove deprecated /proxy paths
These were depercated in v1.2.

Kubernetes-commit: 7b4722964d21c994e0fdf36c0d7f5b0dc703a9c2
2018-02-14 11:13:54 -08:00
Jordan Liggitt e5c1570dd1 Return correct error when submitting patch in unsupported format
Kubernetes-commit: aa504ccd57f38bfc23248c68019b7685fb14e668
2018-01-15 20:42:47 -05:00
Jordan Liggitt 198ca9b2e0 Use GVK from storage in API registration
Kubernetes-commit: 5913fccada6097c984b168ab15c243a8b20876e5
2017-10-27 04:29:04 -04:00
Jordan Liggitt 8ea8479b92 Specify correct subresource discovery info
Kubernetes-commit: 729a0da155871de445ea2116cf6457e29e313d08
2017-10-27 04:22:39 -04:00
Dr. Stefan Schimanski 3cfc602704 apimachinery: mechanical removal of ObjectCopier plumbing
Kubernetes-commit: 509df603b18d356777176953e5d160b6f3d0bba9
2017-10-06 13:30:12 +02:00
Clayton Coleman d1431e49e4 Endpoints can add a get or connect options type in their group
optionsExternalVersion is being used for shared types (meta.k8s.io). The
installer should first look in the current API group for GET and CONNECT
options objects before checking in `v1`.

Kubernetes-commit: 0e4b20fbf9ff299c37a5055e082fa27dbf2b49c0
2017-09-25 17:03:34 -04:00
Brendan Burns 5621f05378 Add 201/202 to the list of returned codes.
Kubernetes-commit: 449082f55d323bf4acf6963c4d093c044742762c
2017-09-26 22:31:19 -07:00
Jim Minter 4e1a340bd1 ProducesObject should only update the returned API object resource documentation
Kubernetes-commit: e18eeb2d63f67b1e0dd3e79982beb7879242c3bb
2017-09-05 15:34:15 -05:00
Kubernetes Publisher 7d0b0b91fc Report "resource" scope where possible
Also rename the variables to match the concept

Kubernetes-commit: c13a3c03201c9082c4b373b7af8b99d7effd5a62
2017-09-22 11:42:04 +00:00
David Eads 56e7f5b9c2 expose discovery information on scalable resources
Kubernetes-commit: 65d0f188f68f6428ccc0a776adff496d972faa56
2017-09-03 14:04:14 +00:00