Commit Graph

100 Commits

Author SHA1 Message Date
Chao Xu e1ccfa4e7d Remove rest.ConnectRequest.
Make apiserver pass connectRequest.Options directly to the admission layer. All
the information in rest.ConnectRequest is present in admission attributes.

Kubernetes-commit: 355691d310803ea3a0cd8ff284a39ead38857602
2018-07-30 18:35:51 -07:00
jennybuckley 4dcfdb8ab8 Explicitly disable dry run for connect
Kubernetes-commit: 702937ac8614a05d3168c6565bea8a3347883dc0
2018-07-11 11:45:24 -07:00
jennybuckley 91278157f6 Support dry run in admission plugins
Kubernetes-commit: adafb1365e2b9f6c422c437e916e22a4fe1c2e3a
2018-08-06 10:37:44 -07:00
Clayton Coleman b605717f7d Make the timeout error more specific so users can find it
This makes the error consistent with the timeout filter and also helps
the user understand that they requested a specific timeout.

Kubernetes-commit: 8a2d037bc51c97758c0a68f2726f104953846cd5
2018-07-25 12:50:39 -04:00
jennybuckley 900791d3ac Add additional authorization check for create-on-update
Kubernetes-commit: cc5c17e554a4d8f802043b337ca0787ec0ce7475
2018-07-03 11:20:16 -07:00
Cao Shufeng 167894cc94 Log policy name from pod security policy
Kubernetes-commit: 241422879d81ac7f8d7874d55c53df73e35d91b0
2018-04-15 10:20:10 +08:00
jennybuckley f87486fed9 Expose openapi schema to handlers
Kubernetes-commit: dee088586a76b876c473418efba8190be7fa6b26
2018-05-24 09:55:19 -07:00
Antoine Pelisse 7d9df7dc93 apiserver: Fail if dry-run query param is specified
Kubernetes-commit: 98613924ea282ef70a6f9a14dda11e854fe02c28
2018-05-11 14:59:47 -07:00
Jordan Liggitt aa2276ee48 collapse patch conflict retry onto GuaranteedUpdate
builds on #62868

1. When the incoming patch specified a resourceVersion that failed as a precondition,
the patch handler would retry uselessly 5 times. This PR collapses onto GuaranteedUpdate,
which immediately stops retrying in that case.

2. When the incoming patch did not specify a resourceVersion, and persisting to etcd
contended with other etcd updates, the retry would try to detect patch conflicts with
deltas from the first 'current object' retrieved from etcd and fail with a conflict error
in that case. Given that the user did not provide any information about the starting version
they expected their patch to apply to, this does not make sense, and results in arbitrary
conflict errors, depending on when the patch was submitted relative to other changes made
to the resource. This PR changes the patch application to be performed on the object retrieved
from etcd identically on every attempt.

fixes #58017
SMP is no longer computed for CRD objects

fixes #42644
No special state is retained on the first attempt, so the patch handler correctly handles
the cached storage optimistically trying with a cached object first

Kubernetes-commit: fbd6f3808480d27a83643e82a11c217601b76cbc
2018-04-24 21:55:06 -04:00
Mike Danese cd0258b4d7 replace request.Context with context.Context
Kubernetes-commit: 54fd2aaefd11e12a3ecb6d1a1326f04cdc8ea1a3
2018-04-24 08:10:34 -07:00
hzxuzhonghu f11d20d5bf fix typo: mutating validating admission should be distinguished
Kubernetes-commit: cd4c71422e41e9dbbc015e8b6c0e1b6b5bb67346
2018-04-21 11:37:36 +08:00
Jordan Liggitt 25758bf0f8 Remove request context mapper
Kubernetes-commit: 8ea88a5092c767fc3141512db924fd0435f7670e
2018-04-18 11:12:15 -04:00
Clayton Coleman f688fbc3b2 Promote v1alpha1 meta to v1beta1
No code changes, just renames

Kubernetes-commit: d07a608607e1f4d252003c17cd615652574a0823
2018-01-30 13:30:57 -05:00
hzxuzhonghu b636311708 refactor admission flag: add two admission flags and make plugins auto in recommended order
Kubernetes-commit: 7c5f9e0bbaff15570f1709e70b7fa6952395d7cd
2018-01-15 14:58:57 +08:00
Dr. Stefan Schimanski 441ac63056 admission: complete plumbing of validation admission
Kubernetes-commit: 74b4223ab80fa3bbf326ac1073ef28f0b8daa304
2017-10-24 14:08:34 +02:00
David Eads a0a5b2c568 split up large rest handling file
Kubernetes-commit: cd663d7ad00937cffa8a09e4761acb95d34c89a3
2017-10-18 16:04:33 -04:00
Dr. Stefan Schimanski 3cfc602704 apimachinery: mechanical removal of ObjectCopier plumbing
Kubernetes-commit: 509df603b18d356777176953e5d160b6f3d0bba9
2017-10-06 13:30:12 +02:00
Shyam Jeedigunta 649cc4c05e Modify traces in deletion handler
Kubernetes-commit: c4ca2c734963afd442ff6c43631d004092ea74e8
2017-09-27 00:48:06 +02:00
Clayton Coleman 4175a07239 Track gauge of all long running API requests
Allows a caller to know how many exec, log, proxy, and watch calls are
running at the current moment.

Kubernetes-commit: fabce1b893f96bdf466c1fdb1fcf825210c008ae
2017-09-19 20:35:29 -04:00
Jordan Liggitt 78261d54df Preserve leading and trailing slashes on proxy subpaths
Kubernetes-commit: 04eede9b2a2a24571cb084fcb952c6a2a2a2bdd1
2017-09-22 22:35:20 -04:00
Kubernetes Publisher 24ccf40372 Add extra steps to delete resource handler trace
Kubernetes-commit: 6089cadab3d136455b1b4376d819464fb0d2379a
2017-09-22 11:42:05 +00:00
jianglingxia 57a29126d7 amend the comment
Kubernetes-commit: fe13072443289a87ac2bf89fa7818f0ba8a5c64d
2017-07-19 03:49:08 +00:00
Kyâne Pichou a0b4bc5639 Fix a typo in deletion log of apiserver
Kubernetes-commit: 7adf8d8cac89eb68bc10a58827ef08e74e047913
2017-07-01 08:39:43 +00:00
Mikhail Mazurskiy 7039fe1e17 Refactor unstructured converter
Kubernetes-commit: dc1ee493a29251492403e4282b5df3e897de2214
2017-06-30 08:44:46 +00:00
Jordan Liggitt 3d01cde9c2 Fix rawextension decoding in update
Kubernetes-commit: a536ee3615e15954c63b0ccea0885837e2846e1e
2017-06-22 04:00:53 +00:00
Tim St. Clair 64014c6e25 audit: Fill in full ObjectRef, include in LevelMetadata
Kubernetes-commit: 28beb4572e676b9073f400fb6ccf2720381a41d0
2017-06-14 20:44:08 +00:00
Dr. Stefan Schimanski e10c78ea7c apiserver: return BadRequest 400 for invalid query params
Kubernetes-commit: 4846c0d16700bb7cb3c3e02fa3919f2de36d4685
2017-06-13 20:47:31 +00:00
Clayton Coleman 5fa08b8c5e Allow initialization of resources
Add support for creating resources that are not immediately visible to
naive clients, but must first be initialized by one or more privileged
cluster agents. These controllers can mark the object as initialized,
allowing others to see them.

Permission to override initialization defaults or modify an initializing
object is limited per resource to a virtual subresource "RESOURCE/initialize"
via RBAC.

Initialization is currently alpha.

Kubernetes-commit: 331eea67d8000e5c4b37e2234a90903c15881c2f
2017-06-13 20:47:30 +00:00
Clayton Coleman e1228ec319 Expose a default Table and partial output via Accept headers
All generic registries expose metadata output, and refactor endpoints to
allow negotiation to handle those responses. Add support for
PartialObjectMetadata being returned for objects as well.

Kubernetes-commit: f203e42cb98ed4bac7ad8ebbed717d3bd42f55b6
2017-06-13 20:47:29 +00:00
Dr. Stefan Schimanski f7d766d92d audit: add audit event to the context and fill in handlers
Kubernetes-commit: 0b5bcb021932355b3ff7c2b45fb579f4adad84bf
2017-06-13 20:47:28 +00:00
Wojciech Tyczynski 1d0b329280 Pass RequestInfo to GenerateLink
Kubernetes-commit: b4018f7da18f1e61e59c5c48cae4178db2714f85
2017-06-13 20:47:27 +00:00
Wojciech Tyczynski d82b8bc329 Pass Context to GenerateLink
Kubernetes-commit: 25f0fe1adb199697565487b9dfacc4ed8ecdccbb
2017-06-13 20:47:27 +00:00
Jordan Liggitt 781a66f4fb Return MethodNotSupported when accessing unwatcheable resource with ?watch=true
Kubernetes-commit: da8ae29620811f3dc058e0e665d402a208a1fe6c
2017-06-13 20:47:27 +00:00
nikhiljindal 404503d3e6 Updating generic registry to return UID while deleting the object
Kubernetes-commit: 44fc88cecd5ab175fe7907eb7b975f0a00cb2305
2017-05-16 17:27:51 +00:00
Anthony Yeh 9841cf11a1 PATCH: Fix erroneous meaningful conflict for numeric values.
The wrong json package was used, resulting in patches being unmarshaled
with numbers as float64 rather than int64.
This in turn confused HasConflicts() which expects numeric types to match.

The end result was false positives of meaningful conflicts, such as:

```
there is a meaningful conflict (firstResourceVersion: "8517",
currentResourceVersion: "8519"):
 diff1={"metadata":{"resourceVersion":"8519"},"spec":{"replicas":0},"status":{"conditions":null,"fullyLabeledReplicas":null,"replicas":0}}
, diff2={"spec":{"replicas":0}}
```

Kubernetes-commit: 1ab6a33db486adc060e1b63eecbdc06aabdde1f6
2017-04-24 20:36:05 +00:00
gmarek 94dd05e8db Fix traces for get requests
Kubernetes-commit: 2a49281b55278bb6932e8862304cff0becaaabf3
2017-04-19 20:35:36 +00:00
deads2k 540c5cf18e remove dependency on gorestful for rest handling
Kubernetes-commit: c5e2f7c229d8194386de97df7ff6c1b0f71be4c7
2017-04-11 20:35:21 +00:00
deads2k d3546820d7 remove go-restful from namer for rest handling
Kubernetes-commit: da27957390b99c3053922e75f220a8b09c20d7f6
2017-04-10 20:35:11 +00:00
Jordan Liggitt fa876f6773 Fix original object mutation on patch retry
Kubernetes-commit: c415e4aeabe5e5514dcdbf2c01c533533c25f4c1
2017-04-06 20:35:16 +00:00
Dr. Stefan Schimanski 18fcdcc57b k8s.io/apiserver: make maxRetryWhenPatchConflicts public
Kubernetes-commit: be6be1370b5d1c9b6269c24f663426e3bac93c72
2017-03-31 20:37:15 +00:00
Jordan Liggitt 8543f589d2 Ensure patched objects are defaulted correctly
Kubernetes-commit: 464db160b410b22dba53af6d11fa097f0fa4fd6b
2017-03-18 19:56:09 +00:00
deads2k e8086d93fd show patch error as string not byte slice
Kubernetes-commit: ea887557d36cec45744c11019aa3fd64d44f24f7
2017-03-18 19:56:09 +00:00
Clayton Coleman 55e799bbec Don't log context or full request URI due to security concerns
These lines may contain information that cannot be safely logged to
disk. Only deal with known parameters, also bump to V(2) to be
consistent with other logging.

Kubernetes-commit: f6300555f4c105f60c5a4cb0a0cdfc01899b833d
2017-03-18 19:56:08 +00:00
Wojciech Tyczynski 63e29dca6f Use new runtime.Object <-> map[string]interface{} converter 2017-02-27 15:10:34 -05:00
nikhiljindal 6863c37d24 Update REST Handler to return 202 for cascading deletion 2017-02-27 15:10:33 -05:00
nikhiljindal fee1f0dd8f Updating the registry to return whether the resource was immediately deleted 2017-02-27 15:10:33 -05:00
Dr. Stefan Schimanski 73c30cda7e staging/src/*: run gofmt 2017-02-23 09:48:09 -05:00
ymqytw 5598b36661 extract util used by jsonmergepatch and SMPatch 2017-02-13 07:36:41 -05:00
Dr. Stefan Schimanski a372fcad62 Mechanical fixup imports: pkg/genericapiserver 2017-02-13 07:36:41 -05:00
Dr. Stefan Schimanski f3c3e07241 Mechanical move: pkg/genericapiserver -> k8s.io/apiserver 2017-02-13 07:36:41 -05:00