Commit Graph

632 Commits

Author SHA1 Message Date
Han Kang fe6033d4a2 remove client label from apiserver request count metric since it is unbounded
Change-Id: I3a9eacebc9d9dc9ed6347260d9378cdcb5743431

Kubernetes-commit: cc3190968b1f14ddf4067abef849fc41bd6068dc
2020-01-29 12:25:55 -08:00
jennybuckley 0fe6670327 Make schema error log message more useful
Kubernetes-commit: fee77388c6d4cc04731f35055d9dfcdf08b0f874
2020-01-29 15:01:44 -08:00
jennybuckley 605316fae2 Re-enable apply for 50% of requests
Kubernetes-commit: 9b679748239faa4d01f13c32af1956ffdbfff9aa
2020-01-23 11:27:20 -08:00
jennybuckley 49d583f0ef Update Structured Merge Diff to V3
Kubernetes-commit: b33fbc84d9d6e7033c36fa3bc321b8fea28ceed6
2020-01-21 15:03:56 -08:00
Jordan Liggitt 223f76bd7a Set managedField probability to 0%
Lowers probability of managedField population on create/update to 0%
until serialization/normalization issues are resolved

Kubernetes-commit: ba23aa98f6574bd1f9781f0d3e61d0496f16fc53
2020-01-14 14:47:35 -05:00
danielqsj 99a93eeef1 clean deprecated apiserver request metrics
Kubernetes-commit: 0e8b956e27b07092ca4873c09314e4cff930ab27
2020-01-10 17:09:26 +08:00
danielqsj ade6c3cc65 keep apiserver_request_latencies_summary
Kubernetes-commit: 2c2e1c5443a637353a3ab36cb8e51a9a60691042
2019-05-28 17:31:08 +08:00
danielqsj 669e87efbe clean SinceInMicroseconds, convert to SinceInSeconds
Kubernetes-commit: ab182552b485ceed96c3b05d284ae9480377daf8
2019-04-15 16:18:01 +08:00
danielqsj b31ce5f20e remove deprecated metrics of apiserver
Kubernetes-commit: 060756babbb6991cf9426c38be595d23e7124b4e
2019-04-12 16:15:13 +08:00
Jennifer Buckley 2ac09e3ec3 Update fieldmanager.go
Kubernetes-commit: 4db3822ebbac30248463eb529d88176f8b258fd9
2020-01-10 11:15:06 -08:00
jennybuckley d516617523 create probabilistic SkipNonAppliedManager
Kubernetes-commit: 6cab3a7bec75e42581e8041395c3ceaa14e07c74
2020-01-09 14:15:34 -08:00
Kevin Wiesmüller 4694e4eb62 fix nits
Kubernetes-commit: a2526286498762de187db23f13da5d747ddd1c90
2020-01-10 00:58:52 +01:00
Kevin Wiesmüller 41bde5b991 change Apply signature and move decoding into handlers
Kubernetes-commit: ddf0d4b8034697a8dca23a3c8bc5620629bd691b
2020-01-09 22:34:33 +01:00
ialidzhikov a521baa66a Minor nit in error message about feature gate stage
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>

Kubernetes-commit: 1eaa0ee3f9553cce1821434ce64e745ba5b135d2
2020-01-01 15:54:06 +02:00
danielqsj 76c4ab8bb5 unify alias of api errors under pkg and staging
Kubernetes-commit: 5bc0e26c1902e7e28abfc828de19a2dbb3e492c2
2019-11-12 16:26:59 +08:00
sshukun 38b2d97314 Fix golint failure not contained in .golint_failures
Kubernetes-commit: 8110e08dd4abd4458b2d3793f5c1eb50069ae7df
2019-12-19 14:40:26 +09:00
Jordan Liggitt e00fbd05dd Use openapi fixture for server-side apply tests
Kubernetes-commit: 2b4fac5760ff390d46c2b9bb373feafe9bd97a38
2019-12-04 10:29:48 -05:00
chenjun.cj d1465bc6c3 fix potential memory leak issue in processing watch request
Kubernetes-commit: b911aa6471a83b1d2b4ea346e5c6b442dfa9b53b
2019-11-18 16:43:15 +08:00
Jordan Liggitt 3aa0552959 Switch TableGenerator/TableConvertor interfaces to metav1
Kubernetes-commit: 36eb250cbb441984260ded6f7abeb796974031c3
2019-11-26 13:13:25 -05:00
chenjun.cj 455e205726 use context to check client closed instead of http.CloseNotifier in processing watch request
Kubernetes-commit: 1daa08c5c8634af762b0352ff4a49bdef6924c5f
2019-11-18 21:27:05 +08:00
RainbowMango de8c866328 Hide apiserver metrics that have been deprecated in 1.14
Update E2E test accordingly.

Kubernetes-commit: 5e0695e339ff0887ebebddfa8630de191f7fa235
2019-10-12 20:25:10 +08:00
Antoine Pelisse bab2370cac Update structured-merge-diff to latest version
Kubernetes-commit: 4f0346530d3e228db20aca6bb484d3ed3c83e33b
2019-11-06 09:53:38 -08:00
wojtekt ca6e794c60 Eliminate couple unnecessary conversions
Kubernetes-commit: 067d173266303c5c9a4281e962d3662c34a78053
2019-11-12 14:19:14 +01:00
Clayton Coleman 26a8fb1b92 test: Watch should fail immediately on negotiate errors
Instead of returning an error on the watch stream, if we can't properly
negotiate a watch serialization format we should error and return that
error to the client.

Kubernetes-commit: 9aad6aa54d824ba93a6670cd5a0cab6ad337e9f0
2019-11-03 15:08:22 -05:00
attlee-wang 6c2628ccd6 json unmarshal coded error at function applyJSPatch()
Kubernetes-commit: 1da2d00935942a887205f801d4b2acfa227055d2
2019-11-07 20:40:28 +08:00
Ted Yu 48d357e235 Stop Watching when there is encoding error
Kubernetes-commit: 639af77d463a4d07bc5d7d19366bd98310b55724
2019-11-07 14:32:47 -08:00
wojtekt 6fd9ceb0b8 Eliminate some default conversions
Kubernetes-commit: ccded1494116d6aa1ac3f4612b4a613b56a2044a
2019-11-06 14:02:27 +01:00
Mike Danese 44b9fc84ab migrate callers to g/g/uuid
Kubernetes-commit: a4ca9e6c93e45b4a97e7d04df37362299088f64a
2019-11-04 23:15:20 -08:00
Han Kang 00d376192a rename metric for apiserver request terminations and reword corresponding documentation
Change-Id: I47a9c7b10614afe85bb652fa61984f91848d6d65

Kubernetes-commit: f8f1def5f1d92a588f48ebc01293e142f8dd63fd
2019-10-21 13:26:31 -07:00
Han Kang a5356f425d pluralize error metric name
Change-Id: I12eb94f41ded20ed5a16332ada13a7b34f75de18

Kubernetes-commit: 5e652fe12605027509870d5d7f821390f20b1cee
2019-10-08 15:49:12 -07:00
Han Kang 4a680138c0 Fix double counting issue for request metrics on timeout.
Currently we record request metrics during the normal request flow and
we also manually invoke `Record` in the timeout handler to record
timeouts. This means that we effectively double count whenever we
timeout. This PR renames the `Record` function to `RecordRequestError`
to more accurately reflect the intended side-effect of the function
call.

Change-Id: Ie37fd0c1e501bd525640a434433d364a5fd6dde2

Kubernetes-commit: 4c6e7247878477a1f2efc26df7f141258010374f
2019-10-02 15:04:29 -07:00
David Eads bde5fd1449 choose a more unique request timeout default
Kubernetes-commit: e1dd9af8948f983d48dfc0dd81dc31b7d6c1672f
2019-05-30 15:17:40 -04:00
Jianfei Bai a5b9ca7482 feat(apiserver): add user-agent and remote info into trace log for endpoints handlers.
Kubernetes-commit: 91bddd13485082892be8e8e471e358be317c4e9b
2019-10-10 21:30:05 +08:00
Wojciech Tyczynski 5f538bd5e3 Optimize NegotiateMediaTypeOptions
Kubernetes-commit: 1baf4778ae130dc9c305736216b5f5024a962595
2019-10-10 11:49:31 +02:00
RainbowMango 7687c3a4e8 Migrate prometheus bucket functionality to metrics stability framework.
Kubernetes-commit: 1f9ab1b85c5560a155b1702d1b5d28aa2d95a1b7
2019-09-12 17:10:44 +08:00
jennybuckley 72d976a445 Cap the number of managedFields entries for updates at 10
Kubernetes-commit: 61b19c729892a150b61dde19359f6fb19e8d61f1
2019-09-26 12:53:28 -07:00
jennybuckley 49914e3423 Refactor fieldmanager to be more modular
Kubernetes-commit: d72260b9dad186d96aa621dc8594ca9bd6088937
2019-09-19 13:14:36 -07:00
Jordan Liggitt f7fbf2eee4 Limit YAML/JSON decode size
Kubernetes-commit: 8ef4566cefebf49f9a806a36df2105c9149785a1
2019-09-27 16:36:48 -04:00
wojtekt 94a2664cd3 Implement support for CacheableObject
Kubernetes-commit: 970f103e2c079da98743db35e38fd411a64e2e04
2019-08-15 22:02:33 +02:00
wojtekt f186d58ea0 Fix transformObject to work with CacheableObject.
Kubernetes-commit: 1dd43724ce97b610aae7f9e0f3842f0798ec9d7b
2019-08-19 09:55:49 +02:00
wojtekt 4aa6bc019e Implement Encoder.Identifier() method
Kubernetes-commit: cd4215ad8b95773a793f69fc2e8bf93c7ede97aa
2019-08-14 16:23:03 +02:00
Antoine Pelisse 3e0b6a7493 Apply current parses the yaml object 3 times
This is super expensive and not needed at all since we don't have to
reparse the entire object. Remove all allocations but the first one.

Kubernetes-commit: 31c644a1e79c685b52683ed1e84964186a37f3ff
2019-09-25 12:38:38 -07:00
Antoine Pelisse 81b54ad46e Add tests and benchmarks for endpoints and node
Kubernetes-commit: 0b7ea8bb0e9cc10335044f9ef75920d59462a4ca
2019-09-20 13:32:06 -07:00
Antoine Pelisse db9f1ff5ea Improve fieldmanager tests and benchmarks
Kubernetes-commit: fae9d0ee2136d3443cdd87b1a26a06d7857b01ee
2019-09-10 14:06:08 -07:00
RainbowMango 5f565617cd Add metrics of authentication overall latency.
Add alpha tags to authentication_attempts explicitly.

Kubernetes-commit: 0c0d69e8be69fd2e1c62a292ed44be6c0d4158fc
2019-09-04 20:50:24 +08:00
Jordan Liggitt d1d66bda16 Propagate context to Authorize() calls
Kubernetes-commit: 92eb072989eba22236d034b56cc2bf159dfb4915
2019-09-24 10:06:32 -04:00
jennybuckley 6c75819b84 Split fieldmanager with interface
Kubernetes-commit: 2c67bf47db8557b6481a5181bdae924e91665988
2019-09-12 10:57:21 -07:00
Ted Yu a64485969d Verify the response audience matches one of apiAuds
Kubernetes-commit: d66d0472057dc59dff5ac686aea4304e5fe2eded
2019-09-13 06:41:23 -07:00
wojtekt ba8f49cc73 Ensure conversions are registered for metainternalversion codecs
Kubernetes-commit: 54163527a69a8c868b87d301876559495220d1b0
2019-09-11 16:30:08 +02:00
Jordan Liggitt 223a2b92f0 Propagate and honor http.ErrAbortHandler
Kubernetes-commit: 43415294a72d13a6d685ec0e2ecb274fada7587c
2019-09-11 11:16:31 -04:00
Antoine Pelisse 912f3b47b9 Refactor FieldManager tests to make them simpler
This is the first step on this, but there are a few improvements that
I'd like to do here.

Kubernetes-commit: b10ad55119a155b776b272a7139dfbed604b05d6
2019-09-10 15:05:26 -07:00
haoshuwei 5bce489f18 fix some ineffassigns
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>

Kubernetes-commit: aaed9daf9b44757e767d93bd45d1bb0412c00243
2019-09-09 18:52:17 +08:00
Dr. Stefan Schimanski fc05a0cd5b endpoints: fix admission test types
Kubernetes-commit: 420f010f8798a8938ff4332ca53bbac8a8e09c01
2019-09-09 08:36:52 +02:00
Ted Yu a50931ba7e Move Update Apply conflict test to field manager test
Kubernetes-commit: 9828f986afd4db79a10c78bee1cc2e449faee3a6
2019-08-30 14:47:39 -07:00
Kubernetes Prow Robot c229c2ca0a Merge pull request #81453 from joshmsamuels/master
Apply will fail with managed fields + tests

Kubernetes-commit: 64718f678695884c93d6d3df8f5799614746bea2
2019-09-13 08:22:53 +00:00
jennybuckley b1cbdafe99 Use CRD validation field in server-side apply
Kubernetes-commit: c0617933d4bec5b00dbbfcd24edb7d7e7fc5509d
2019-08-28 15:28:49 -07:00
RainbowMango a9e8b3830d Add authentication metrics: overall failure and error count
Kubernetes-commit: a7ac3b9bbe3f3e35117bd7109997e58ce467f0a9
2019-08-16 19:30:43 +08:00
David Eads ad3b19aeee add cache-control headers to kube-apiserver
Kubernetes-commit: f589c1213c8ba4fa0e31c523b2e9dcc27298084f
2019-08-26 09:39:29 -04:00
Antoine Pelisse 625e8a84fc Add new FieldsType to clarify the format of Fields
Kubernetes-commit: ff4e1f3592bfd51aea3018ed7e0a8579e5c0eea1
2019-08-21 16:13:53 -07:00
Han Kang 3e6e1db500 add some documentation around the metrics stability migration changes for clarity
Kubernetes-commit: 4e5d906c4d008f914b0ede26ea91533d6343dec5
2019-08-26 19:15:30 -07:00
Han Kang b9084e350a migrate kube-apiserver metrics to stability framework
Kubernetes-commit: 466980dd747e06e55451301c624eecccfa505123
2019-08-22 15:38:42 -07:00
jennybuckley 263df041f9 Add tests
Kubernetes-commit: 3279c73945553e211ddb7812e07b3c9d46b5e96a
2019-08-22 13:27:38 -07:00
jennybuckley 350fef76f5 Only update managedFields on update if it already exists
Kubernetes-commit: 9a12e37a6dc28fd1d209eb84c210eb0723e6e38f
2019-06-05 14:09:08 -07:00
jennybuckley dcedf932c2 Make sure no op updates don't affect the resource version
Kubernetes-commit: aa1f01ec7e6ebf29444b93de7c3cb65a1a54d47e
2019-08-20 15:09:42 -07:00
wojtekt 983198c58c Fix verb reporting in metrics
Kubernetes-commit: 715f538c7012e190c6bcf276fa329da261ec5d00
2019-08-20 15:40:34 +02:00
Di Xu d9e587908f populate object name for admission attributes when CREATE
Kubernetes-commit: 34cab8f80a9104be7fe5d8a5a22c3207dab46268
2017-09-28 14:59:34 +08:00
Maciej Borsz 9baeaec78d Add 'apiserver_watch_events_sizes'.
That metric can be used to estimate the size of watch events sent out to
the clients.

Kubernetes-commit: 4af189aab9cca61d1a701133596f6f82b1ca0719
2019-07-23 12:55:11 +02:00
Jordan Liggitt 0c706a033c Plumb context to admission Admit/Validate
Kubernetes-commit: 61774cd7176cae0c0324d23ab20e6c6b3038153f
2019-08-19 10:48:08 -04:00
Jordan Liggitt aab7154c4f plumb client-specified request timeout to context
Kubernetes-commit: 89d5c1f3ea8d8e27526e4f558872c4e24ddc526c
2019-08-20 10:36:34 -04:00
jennybuckley 427507ed32 Group update managedFieldsEntries by manager name
Kubernetes-commit: 87eabcdbfa5d551af7ebcae3fb07fd8f386badc3
2019-08-19 13:50:15 -07:00
wojtekt e603adaf68 Deprecate SelfLink + featuregate for setting it
Kubernetes-commit: 3bf4eb70723340cf84abec11e9ce14dfcc02a148
2019-08-05 08:59:25 +02:00
Joe Betz f103fcda51 Replace string concatination with trace fields
Kubernetes-commit: 46a04d50af78e01d06a9879d62cc71fbe892076f
2019-08-02 23:47:24 -07:00
jennybuckley d98d4e6ca0 Use raw bytes in metav1.Fields instead of map
Also define custom proto unmarshaller that understands the old format

Kubernetes-commit: addad99b6f796bc0f0a2eeafa0296396667800e9
2019-07-31 16:05:48 -07:00
Daniel Smith 1fc8fb4c4b fix breaking change
Kubernetes-commit: f55efb8dae5b41a8af083dc96c53b5b6f6e59b49
2019-07-19 15:25:56 -07:00
jennybuckley 6d17cee146 Make changes to integrate new version
Kubernetes-commit: 229894c730c70d39992b27fe3ef98968b2a3fbff
2019-07-08 16:32:03 -07:00
jennybuckley 5751866f63 apiserver: make changes to integrate new structured-merge-patch
Kubernetes-commit: bd333e3ac7f84c33abebc7d55a8c581743d891f7
2019-07-08 16:32:03 -07:00
Maciej Borsz f6a1588a67 Register WatchEvents metric
Kubernetes-commit: bc100cfd0ccd7849b66e29eba62cd2119a83a68a
2019-07-12 14:08:40 +02:00
Jordan Liggitt fd78427347 Populate API version in synthetic authorization requests
Kubernetes-commit: 2899abb65cf459d6ab1d61f24fe82555f87a306f
2019-07-10 21:29:25 -04:00
Antoine Pelisse b19b440e6b Return 400 on invalid patch requests
Kubernetes-commit: 7e964387485f12432bbf616835e034436f52cb4c
2019-06-20 12:17:56 -07:00
Antoine Pelisse 2f450e5e39 Add benchmarks for FieldManager handling
We don't have a lot of data on allocations and how much time it takes to
run apply or update on objects, so adding some benchmark will help us
investigate possible improvements.

Kubernetes-commit: 92cf3764f979e63317c8f483d8e841e0358599f4
2019-07-09 14:00:21 -07:00
xuyasong 394b8d269a staging file fix lint error: receiver name should not be an underscore and rename
Kubernetes-commit: 162b14eca339851aae03725b980acad2c91222c4
2019-07-05 12:49:02 +08: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
Dr. Stefan Schimanski c4286f7b60 apiserver: store httplog in context
Kubernetes-commit: e848eaa566b750ad5e5fd26a64eecfc883f936f3
2019-06-14 13:09:13 +02:00
Maciej Borsz df684d906a Add 'apiserver_watch_events_total' metric.
We found this metric useful to understand the CPU usage of the
kube-apiserver process.

Kubernetes-commit: 58d3338ddd5e406988fdfaa9019fd7200996c49f
2019-06-05 14:27:09 +02:00
Odin Ugedal 1be6195f27 Fix file permissions for non executable files
Normal files should have permissions 644 by default,
and does not require the last bit to be
executable

Signed-off-by: Odin Ugedal <odin@ugedal.com>

Kubernetes-commit: 35cb87f9cf71776e99a970dfff751cd29ba7ebfb
2019-06-14 21:04:39 +02:00
Sukeesh 8f207390a6 Update doc.go in staging/src/k8s.io/
Kubernetes-commit: c8bd20d1b289eadb6abc20f0868f4a5a6a668035
2019-06-25 22:43:44 +09:00
jennybuckley e67aadb10a Don't dereference nil pointer in conflicts
Kubernetes-commit: c71583a31368d1e4e71cd458d6961d8fec2265f1
2019-06-13 14:42:19 -07:00
zhoulin xie 77ddb0c208 remove redundant words 'the' in comment
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>

Kubernetes-commit: 77ba845e6d2f0cba81993621531ae5915e7c072b
2019-02-13 22:40:34 +08:00
Clayton Coleman dc06278276 CRDs should support watch of protobuf PartialObjectMetadata
Correctly ensure CRDs can be watched using protobuf when transformed to
PartialObjectMetadata. To do this we add a set of serializers allowed to
be used for "normal" requests (that return CRDs) while the serializers
supported by the infrastructure is broader and includes protobuf. During
negotatiation we check for transformation requests and protobuf is
excluded from non-transform requests.

As part of the change, correct an error message when the server returns
a 406 but the client doesn't accept the format to avoid confusing users
who set impossible Accept rules for CRDs (the dynamic client doesn't
support Protobuf, so if the server responds with a protobuf status the
message from the server is lost and the generic error was confusing).

Kubernetes-commit: 89e752add07f443248f66e4798d160f2d7529a19
2019-04-16 23:21:44 -04:00
Chao Xu 74be843d4b generated
Kubernetes-commit: 369314959c1bf096c1d3502f10b28a00c3d12691
2019-05-24 17:46:39 -07:00
Jordan Liggitt 6562ecd83a Add GetResourceMapper to admission ObjectInterfaces
Kubernetes-commit: 92f735042e1cae38afe74364c036489fb7a81973
2019-05-13 11:24:20 -04:00
Jordan Liggitt 054e44a286 make ObjectInterfaces impl generic
Kubernetes-commit: 9071d21e3b1989ffeee4f533406e4fef6bf32aa8
2019-05-13 11:22:11 -04:00
Haowei Cai 7620fd14c0 install deleteoptions in deletecollection endpoints
Kubernetes-commit: 277a7413370e56c98f5dc8633660c5e4ea4df13c
2019-05-13 16:13:13 -07:00
Chao Xu 5c9333e4d3 Run deleteValidation at the storage layer so that it will be retried on
conflict.

Adding unit test verify that deleteValidation is retried.

adding e2e test verifying the webhook can intercept configmap and custom
resource deletion, and the existing object is sent via the
admissionreview.OldObject.

update the admission integration test to verify that the existing object
is passed to the deletion admission webhook as oldObject, in case of an
immediate deletion and in case of an update-on-delete.

Kubernetes-commit: 7bb4a3bace048cb9cd93d0221a7bf7c4accbf6be
2019-04-09 13:49:16 -07:00
yue9944882 019679ce23 Cherrypicking #66535
validate deletion admission object

backward compatibility: add validation for direct storage delete calls

apply nil validation to existing tests

revert behavior changes in deleteCollection call

fixes validation on wiring graceful deletion

remove nil validation check

continue admission check on not found error

Kubernetes-commit: 34c4a6e05767e6c6211b88ccc653f2b07021906a
2018-07-24 12:24:59 +08:00
Antoine Pelisse 2d27d30e4d fieldManager: Ignore conversion errors to internal types
Errors on updates are bad because they usually come from controllers and
it's very hard to take actions on them. We also don't want to start
breaking kubernetes clusters if something in a schema happens a way we
didn't foresee (even though we've tried to be diligent and test as much
as possible, these can still happen).

Log an identifiable error when they happen. Ideally people can look in
the logs to find these and report them, or providers can look for these
in logs and make sure they don't happen.

Only conversion to internal types are going to be logged and ignored.

It means that we're still failing for:
- Version conversions. If we can't convert the object from one version
  to another,
- Unions. If we can't normalize the union,
- Invalid MangedFields sent in the object. If something has changed the
  ManagedFields to an invalid value.
- Failure to serialize the manager information, this really shouldn't
  happen.
- Encoding the ManagedFields

Kubernetes-commit: 4e32d183d0257c9f6c7f8342d1f9aa7f28458f2f
2019-05-16 11:07:47 -07:00
Joe Betz 19327df6d5 Pass {Operation}Option to Webhooks
Kubernetes-commit: 140c8c73a64deb102b528109138ca9fb7dbb2392
2019-05-07 13:34:18 -07:00
Clayton Coleman 196c34b775 PartialObjectMetadataList should nest values, not pointers for Items
Typo during setting up PartialObjectMetadataList, it should be a slice
of `PartialObjectMetadata`, not a slice of `*PartialObjectMetadata`.

Kubernetes-commit: f25efd12e63f1d7db5f29fe28831ad0126200c0b
2019-05-13 14:13:00 -04:00
Clayton Coleman 1394d8d85c API server should offer metav1 Table/Partial transforms
Now that internal types are equivalent, allow the apiserver to serve
metav1 and metav1beta1 depending on the client. Test that in the
apiserver integration test and ensure we get the appropriate responses.

Register the metav1 type in the appropriate external locations.

Kubernetes-commit: 33a3e325f754d179b25558dee116fca1c67d353a
2019-05-04 16:55:49 -04:00
Andrew Kim ef71315b08 update import of generic featuregate code from k8s.io/apiserver/pkg/util/feature -> k8s.io/component-base/featuregate
Kubernetes-commit: c91913924543e1d29f3f3d51354701df9df75def
2019-03-04 12:46:52 -05:00
jennybuckley e999a5ebe2 Treat NoCorrespondingTypeError as MissingVersionError
Kubernetes-commit: 13cb241b1833495c8f195dac96dacf54c0ba4a3a
2019-05-06 15:13:36 -07:00
zuoxiu.jm 7195bbdf3c properly transform decoder error into status error
Kubernetes-commit: 1e65162d44f83d74e9802caf34848abed3eb403c
2018-11-28 16:11:11 +08:00
Haowei Cai 4ff581692b remove TrimSuffix and document buffer size
Kubernetes-commit: 0e61b77826f23cbf835002a9eef5722bb1cfdf53
2019-04-01 11:02:39 -07:00
leigh capili 7762f62741 Refactor loops over SupportedMediaTypes() where mediaType is used to match a single SerializerInfo{}
We have an existing helper function for this:  runtime.SerializerInfoForMediaType()

This is common prep-work for encoding runtime.Objects into JSON/YAML for transmission over the wire or writing to ComponentConfigs.

Kubernetes-commit: 47e52d2981dc2a5c5950042f50688cf24dd92eda
2019-04-04 19:01:01 -06:00
Clayton Coleman e4e8608ba0 Use CodecFactory.WithoutConversion() everywhere
Clarifies that requesting no conversion is part of the codec factory, and
future refactors will make the codec factory less opionated about conversion.

Kubernetes-commit: 7f9dfe58f4cbe1e1b9e80f52addff70bac87bed4
2019-04-03 13:24:37 -04:00
fansong.cfs 73057f16b6 add timeout suuport for watch
Kubernetes-commit: b304a1f96d85cd351a0e22a091e17064d5edb35e
2019-04-03 09:37:48 +08:00
Benjamin Elder 8ad12b3912 Revert "add timeout suuport for watch"
This reverts commit c676e234cc1036a2a1147f2eeef9c89468671330.

Kubernetes-commit: 30a56bab42ab14a3a2ee21f5581b02525d4fd110
2019-04-01 18:39:17 -07:00
Clayton Coleman f2b20f65e2 Set list meta on PartialObjectMetadataList during transform
Kubernetes-commit: 6801ce990a48196d871f6b46e1a08938025ce7c5
2019-03-24 21:29:20 -04:00
fansong.cfs 4d2b8eee69 add timeout suuport for watch
Kubernetes-commit: c676e234cc1036a2a1147f2eeef9c89468671330
2019-03-30 20:07:41 +08: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 8e43494f09 Avoid allocating the watch shim object more than once
We can reset and reuse this object repeatedly without triggering an
allocation.

Kubernetes-commit: 316a87ce7dff525555483eaac962899fd365177d
2019-03-26 23:34:25 -04:00
Clayton Coleman 8541248953 Avoid allocations when building SelfLinks and fast path escape
A self link should only require one allocation, and we should skip
url.PathEscape() except when the path actually needs it.

Add a fuzz test to build random strings and verify them against
the optimized implementation. Add a new BenchmarkWatchHTTP_UTF8 that
covers when we have unicode names in the self link.

```
> before
BenchmarkGet-12          	   10000	    118863 ns/op	   17482 B/op	     130 allocs/op
BenchmarkWatchHTTP-12    	   30000	     38346 ns/op	    1893 B/op	      29 allocs/op

> after
BenchmarkGet-12               	   10000	    116218 ns/op	   17456 B/op	     130 allocs/op
BenchmarkWatchHTTP-12         	   50000	     35988 ns/op	    1571 B/op	      26 allocs/op
BenchmarkWatchHTTP_UTF8-12    	   50000	     41467 ns/op	    1928 B/op	      28 allocs/op
```

Saves 3 allocations in the fast path and 1 in the slow path (the
slow path has to build the buffer and then call url.EscapedPath
which always allocates).

Kubernetes-commit: 389a8436b52db4936b56e08f07984da362c91f6b
2019-03-25 18:06:57 -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
Clayton Coleman 70165311bb Avoid 3 object creations when no dryRun parameter is provided
These allocations should only occur rarely.

```
BenchmarkGet-12          	  100000	    108013 ns/op	   17732 B/op	     149 allocs/op

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

Kubernetes-commit: 59b4f47b225029068bf015117ada1a06d54fbd59
2019-03-21 20:57:36 -04:00
Clayton Coleman f24566b3c2 Avoid an allocation on all requests when checking for an old user agent
ReplaceAllStrings always allocates, while scanning a relatively short
regex twice is slightly more CPU immediately but less later.

```
BenchmarkGet-12          	  100000	    108824 ns/op	   17818 B/op	     152 allocs/op

BenchmarkGet-12          	  100000	    108013 ns/op	   17732 B/op	     149 allocs/op
```

Kubernetes-commit: 83c41eab1d6f55c9ccf61744bfc345c95d3a0664
2019-03-21 20:48:00 -04:00
Clayton Coleman 9006e59e3b IsListType uses reflection and is expensive for hot paths
IsListType was causing ~100 allocations for a non list object. It is
used in a wide range of code, so perform a more targeted check.

The use of `%#v` in a hot return path for `fmt.Errorf()` was the main
victim.

Replace `%#v` with a typed error and create a cache of types that are
lists with a bounded size (probably not necessary, but safer).

```
BenchmarkGet-12          	  100000	    119635 ns/op	   20110 B/op	     206 allocs/op
BenchmarkWatchHTTP-12    	  100000	     65761 ns/op	    7296 B/op	     139 allocs/op

BenchmarkGet-12          	  100000	    109085 ns/op	   17831 B/op	     152 allocs/op
BenchmarkWatchHTTP-12    	  200000	     33966 ns/op	    1913 B/op	      30 allocs/op
```

Kubernetes-commit: 58fb665646aa4c1b63f1322a50e3af7a60e39886
2019-03-21 20:43:26 -04:00
Clayton Coleman dd5dd7ec7e Add benchmark for naive endpoint Get so we can measure it
Baseline:

```
BenchmarkGet-12          	  100000	    119635 ns/op	   20110 B/op	     206 allocs/op
BenchmarkWatchHTTP-12    	  100000	     65761 ns/op	    7296 B/op	     139 allocs/op
```

Kubernetes-commit: 2e1506558ac2c82e83cbef469a6e1e845cfc9235
2019-03-21 20:45:19 -04:00
Clayton Coleman 8d7b330c4c Support Table and PartialObjectMetadata on watch
Clean up the code paths that lead to objects being transformed and output with negotiation.
Remove some duplicate code that was not consistent. Now, watch will respond correctly to
Table and PartialObjectMetadata requests. Add unit and integration tests.

When transforming responses to Tables, only the first watch event for a given type will
include the columns. Columns will not change unless the watch is restarted.

Add a volume attachment printer and tighten up table validation error cases.

Disable protobuf from table conversion because Tables don't have protobuf because they
use `interface{}`

Kubernetes-commit: 3230a0b4fd14a6166f8362d4732e199e8779c426
2018-11-28 23:50:12 -05:00
jennybuckley aabe804197 Fix int/float apply bug
Kubernetes-commit: 10259c959e9f20668659f7e20251a217b51c6355
2019-03-11 23:07:21 -07:00
Aaron Prindle a595f8c602 Added version check between patch and live object in server side apply
What is the problem being solved?
https://github.com/kubernetes/kubernetes/pull/75135
Currently version compatibility is not being checked in server side apply between the patch object and the live object.  This is causing a merge that will error to be run and the apiserver returns a 500 error.  The request should fail if the apiVersion provided in the object is different from the apiVersion in the url, but it should fail before trying to merge, and be a 4xx error. Probably a bad request error.

Why is this the best approach?
The approach of serializing the patch byte array and then checking for version equality with the already serialized live object is the simplest and most straightforward solution.

Kubernetes-commit: d5bd17cda0c134e5ef5c03c3eac79a9ce4e18003
2019-03-07 16:52:26 -08:00
Chao Xu d99ef88606 Expose storage version hash
Kubernetes-commit: 3b618af0d435628feedf06f97bd1c69340d07d95
2019-01-14 19:31:25 -08:00
jennybuckley 2deaad0322 Fix version converter
Kubernetes-commit: f9e57744d3e760b1473cb22e655d20c254af03b6
2019-03-07 17:44:21 -08:00
Antoine Pelisse 46d98f52ff Add "fieldManager" to flag to PATCH/CREATE/UPDATE
And add a corresponding flag in kubectl (for apply), even though the
value is defaulted in kubectl with "kubectl".

The flag is required for Apply patch-type, and optional for other PATCH,
CREATE and UPDATE (in which case we fallback on the user-agent).

Kubernetes-commit: eb904d8fa89da491f400614f99458ed3f0d529fb
2019-02-16 20:16:11 -08:00
jennybuckley 638c313e5b Feature-gate the APPLY metric value
Kubernetes-commit: 6e512eb8758fb32878d7baa33daf3c49561086c0
2019-03-07 15:14:43 -08:00
jennybuckley 4a5bf1da2a use utilsets.NewString
Kubernetes-commit: 077dd28df4025c69b89e75b0f32cb0954401ec80
2019-03-07 14:20:10 -08:00
jennybuckley ac3850113b handle validation errors correctly
Kubernetes-commit: 51b75460aa356a6b07cd5d727cc3ad6c00a13f20
2019-03-06 15:57:18 -08:00
jennybuckley 7624354bd9 Track dry-run and apply in metrics
Kubernetes-commit: 4ac0116a5d826d97cc839dca55e3351ef68f2db1
2019-03-06 14:30:04 -08:00
Kevin Wiesmüller a2d254807d fix handling of nil times in managedFields sorting
Kubernetes-commit: 186761efee887cee019bc92a85b3207474b42185
2019-03-07 00:02:52 +00:00
Haowei Cai ac8e3dd3bb apiserver: make endpoint webservice builder helpers public
Kubernetes-commit: 5a971f045364ae12608b2acef1e69acef0805d18
2019-03-04 08:14:41 -08:00
jennybuckley 55fa47be3a add IsMissingVersionError
Kubernetes-commit: db0562bdbd4ffe17459025fdc10c7bf318dfbc01
2019-03-04 17:29:11 -08:00
jennybuckley 0b311f9745 Update conversion code
Kubernetes-commit: bad7599f06cde17e9b4a51087cd0a84836b29c11
2019-03-04 16:30:37 -08:00
Kevin Wiesmüller e08e8cdb33 change managedFields sort order to oldest first
Kubernetes-commit: 4394bf779800710e67beae9bddde4bb5425ce039
2019-03-05 07:45:08 +01:00
Kevin Wiesmüller 64d9391709 cleanup sort implementation
Kubernetes-commit: 081ccdc75e4646a6b619f16852adb9ce2b4c43d4
2019-03-02 12:07:19 +01:00
Kevin Wiesmüller 8f6431c490 implement sorting of managedFields
Kubernetes-commit: 9ac127408d48aa0876330c79c933d4f1cd603761
2019-03-01 12:51:01 +01:00
Kevin Wiesmüller 61f4009197 start implementing managedFields sorting
Kubernetes-commit: 822c0da84474c50ac640629e7cb9cad01904c2f0
2019-02-28 14:24:02 +01:00
danielqsj 822a44db47 convert latency in mertics name to duration
Kubernetes-commit: f7b437cae02c93a0c83a3ad6c044f43751c20346
2019-02-22 21:40:13 +08:00
Kevin Wiesmüller 485fbb474e test that managedFields get stripped recursively
Kubernetes-commit: 8a6a2883f9a38e09ae941b62c14f4e68037b2d21
2019-02-26 20:22:54 +01:00
Kevin Wiesmüller 14b16dd3e2 remove deletionTimestamp from strippedFields
Kubernetes-commit: d73dbfc8c1bdc443cf6bf2f70a7789b689815cf7
2019-02-26 20:22:30 +01:00
Kevin Wiesmüller 752a6fcdc7 add tests for new stripped fields and cleanup test
Kubernetes-commit: 89f4f9d4bfe5dd14a11e94ff13b1efa676a2d59f
2019-02-23 12:54:33 +01:00
Kevin Wiesmüller a0ddba7a54 add more fields to be stripped from managedFields
Kubernetes-commit: 78ba7fa05c4360e217af3854c5ae5ba4e823312f
2019-02-17 22:35:15 +01:00
Davanum Srinivas d0a81fb0fb Avoid using ghodss/yaml - switch to our forked repo
Change-Id: I115bc834b2b8473c3a81812a76b8433fda24a908

Kubernetes-commit: 42aba643290c19a63168513bd758822e8014a0fd
2019-02-21 18:48:28 -05:00
Kevin Wiesmüller 00e253c3da hardcode time
Kubernetes-commit: 332bb15476ed6f7ef0b55a5a3a3a735b915ccee3
2019-02-19 20:17:33 +01:00
Kevin Wiesmüller 0faeae1509 rename mocks to fakes and add nil check
Kubernetes-commit: 96d4fa7e4678430046d8fee98bc715f385242e3f
2019-02-19 19:13:49 +01:00
Kevin Wiesmüller 84fe2e0447 add fieldmanager tests for stripFields
Kubernetes-commit: 2f8e8fa3af4b8adce5562dd1a033fd37ea8244d8
2019-02-18 11:44:07 +01:00
Kenichi Omichi 538ceee47b Fix golint failures on handlers/negotiation
DefaultEndpointRestrictions is only used in the module,
so this renames it to defaultEndpointRestrictions.

Kubernetes-commit: 302ec9859113f322a32ed03673865b32ca5a130a
2019-01-18 22:06:48 +00:00
Mehdy Bohlool 87b5ac0c06 Add ObjectInterfaces to Admission and Validation
Kubernetes-commit: 513a87c7b25aa58f84fafe0dc170cee4c76e481b
2019-02-16 12:27:24 -08:00
Justin SB bf98046128 Remove executable file permission from OWNERS files
Kubernetes-commit: dd19b923b7c26420af39fcf4eedfa213b236c8d3
2019-01-03 12:18:20 -05:00
jennybuckley ddd6f48420 Make apply conflict errors more readable
Kubernetes-commit: 69b9167dcbc8eea2ca5653fa42584539920a1fd4
2019-02-12 15:16:19 -08:00
Antoine Pelisse 3afb63e414 Revert "Temporary fix for alpha features test"
Kubernetes-commit: 845e44dd207fc3793f8bab1b69665a816f966489
2019-02-12 12:25:21 -08:00
Chao Xu 3866fe78d2 Limit the number of operations in a single json patch to be 10,000
Kubernetes-commit: 5e6fc5dce8b12c5ce80e016b208a51c81a8c9ce8
2019-02-12 23:37:01 -08:00
Antoine Pelisse e23fc114aa Add server-side apply members on some apiserver OWNERS
Kubernetes-commit: 83f0653a14ab304ca3c049587e40bb33e9c55353
2019-02-08 16:10:25 -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
Kevin Wiesmüller fa595d7437 strip selected fields from managedFields
refactor fieldstrip and update tests

add checks and remove empty fields

shorten test and check for nil manager

fix gofmt

panic on nil manager

Kubernetes-commit: 9082cac48240ebc316015dabb466e5b24a113dc1
2019-02-03 22:22:10 +01: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
Dr. Stefan Schimanski 9c9f2c012a apiserver: fix openapi extension types to be JSON
Kubernetes-commit: e67d5f2d8dbbc45d28d0fd5566747ef0df93eb6d
2019-02-07 15:34:42 +01:00
Roy Lenferink 4c9524b9fb Updated OWNERS files to include link to docs
Kubernetes-commit: b43c04452f3b563473b5c2a765d4ac18cc0ff58f
2019-01-30 20:05:00 +01:00
Ted Yu ea3640581f gofmt
Kubernetes-commit: 4f50eb49eae1e6561263ff4abc00ea956139a2ef
2019-02-05 13:58:42 -08:00
Ted Yu ac1ef9aea6 change case for error
Kubernetes-commit: 1638e6698403341122cd55df61e6fe12559b0604
2019-02-05 11:34:36 -08:00
Ted Yu cdd65830fd Misc fix for feature-serverside-apply
Kubernetes-commit: f2e59b44ad5610bb749901b505305ba16c44fad5
2019-02-05 10:29:38 -08:00
Jennifer Buckley 9955ab5084 Temporary fix for alpha suite
Kubernetes-commit: 3f947e034fe6436a2075e8eb202aeaaae46e9df5
2019-02-05 13:23:24 -08:00
Antoine Pelisse 3c768f935f Avoid closure
Kubernetes-commit: bbab0d6c5f9fe75388583772ef4f094e863f9627
2019-01-30 14:15:25 -08:00
Antoine Pelisse 91c401c45f Add object information on FieldManager failures
Kubernetes-commit: 79f3135d2ea2884d2d8115dcdd93a0b454c87b6f
2019-01-29 16:19:52 -08:00
jennybuckley f279314dc7 Minor fixes
Kubernetes-commit: 6b2e4682fe883eebcaf1c1e43cf2957dde441174
2019-02-01 11:55:18 -08:00
Antoine Pelisse d1a2d7fd8d Plugin FieldManager in CRD handler, change to API
Kubernetes-commit: b55417f429353e1109df8b3bfa2afc8dbd9f240b
2019-01-29 14:24:52 -08:00
Antoine Pelisse 337fc9ccde API Machinery, Kubectl and tests
Kubernetes-commit: 0e1d50e70fdc9ed838d75a7a1abbe5fa607d22a1
2019-01-16 21:14:42 -08:00
wojtekt 0760bae7df Adjust buckets in apiserver request latency metrics
Kubernetes-commit: d0508c7e872f60826d68c58c458cfd865554b486
2019-02-01 15:59:09 +01:00
Andrew Kim 2b43930b32 replace k8s.io/apiserver/pkg/util/trace with k8s.io/utils/trace
Kubernetes-commit: 93b086f6eafc1e94214fc1d946a1917482751cf3
2019-01-24 11:50:30 -05:00
Jordan Liggitt 80029a760c Deprecate and remove use of alpha metadata.initializers field, remove IncludeUninitialized options
Kubernetes-commit: 17aa60686ebe5fd04b4fe6f442dc36a8d70b6730
2019-01-17 09:19:28 -05:00
Davanum Srinivas a6f07cccd1 Switch location for goautoneg vendored code
Move to github.com/munnerz/goautoneg as bitbucket is flaky!

Change-Id: Iaa6e964ef0d6f308eea59bcc6f365ecd7dbf0784

Kubernetes-commit: 16fd72d6c91ba466a0e955a1d59a6c8d9e8791bc
2018-12-17 20:39:56 -05:00
danielqsj da40ddb2dd Move etcd latency metrics to histogram and update test case
Kubernetes-commit: 8b418631c08cf66ee57c9ec31fe95372a0a3e075
2019-01-02 13:50:02 +08:00
danielqsj e0406b8675 Change endpoints metrics to conform guideline
Kubernetes-commit: 88c4b644005c5f674e9d03abae7e1cccda4fd23e
2018-12-26 22:29:13 +08:00
Jordan Liggitt 8a453581d7 Fix nil panic propagation
Kubernetes-commit: b8c64e30d18d3ea41de703d369e2a97063bce08f
2019-01-12 11:11:47 -05:00
Davanum Srinivas 5bbdd5d7c3 Strengthen ErrorToAPIStatus against bad input
Change-Id: Id44a59f56c074901257760ff4e40ce29820c6c50

Kubernetes-commit: 6858a24835721cae6968ad85cdf4985afaa03923
2019-01-04 11:22:46 -05:00
Jordan Liggitt 5e146b0a14 Flush headers before streaming logs
Kubernetes-commit: 93625f502676f7a89474cdd3d588354a8ffabb78
2019-01-04 10:16:40 -05:00
Md. Emruz Hossain 5c0ad5c6cf Fix a typo
Kubernetes-commit: 83ff55ccc39ecc1adadd96486d5c1a5c02466e33
2018-12-31 12:28:33 +06:00
Yang Li b6d1828116 Fix unreachable code
Kubernetes-commit: 267425667f45f37b0fb70a6e6904efb995cb4924
2018-11-18 04:16:25 +08:00
Clayton Coleman a229479a54 Better organize object conversion in response handling
Prepare to support watch by cleaning up the conversion method and
splitting out each transition into a smaller method.

Kubernetes-commit: 63c49ba55a8da571522a9615dfa64471c5e9041e
2018-11-28 22:01:47 -05:00
Clayton Coleman 065e089126 Ensure all response object modification happens in one place
Make setLink and setListLink the same, and make them happen in transformResponseObject.
Make those methods also responsible for ensuring an empty list. Then move outputMediaType
negotiation before all other calls in the specific methods, to ensure we fail fast.

Refactoring in preparation to support type conversion on watch.

Kubernetes-commit: 56a25d8c5f04ec5401b99c8eb29e980b1e8123d3
2018-11-28 21:32:51 -05: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
Daniel Kłobuszewski 877329b0f3 Add option to k8s apiserver to reject incoming requests upon audit failure
Kubernetes-commit: 7a10f4eda725f55bec9893eb1c03f2402dbcd32f
2018-07-03 14:40:55 +02:00
Jordan Liggitt 67a9161222 apiserver: propagate panics from REST handlers correctly
Kubernetes-commit: 0952c9ee9692dea46b7e1456f984bafa5cdb56ed
2018-11-15 10:07:49 -05:00
jennybuckley 7cc3f112fb Build OpenAPI Definitions per group instead of per resource
Kubernetes-commit: 758e8623e9b08065f053bedf4474626696b6346c
2018-11-14 12:50:02 -08:00
Davanum Srinivas 2710b17b80 Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135

Kubernetes-commit: 954996e231074dc7429f7be1256a579bedd8344c
2018-11-09 13:49:10 -05:00
Patrick Barker ee71388a42 updates audit endpoints test
Kubernetes-commit: 5a84453e4eaab610e2af5346b948091a409327e2
2018-11-01 15:56:50 -06:00
Mike Danese 1692373df9 move audience context functions to authenticator package
Kubernetes-commit: 817cf70191b73d1ee9f4e7af83089e5854e5131d
2018-10-31 14:50:11 -07: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
Samuel Davidson d8ee4bc0cb Revert "limit forbidden error to details of what was forbidden"
This reverts commit ecbd0137957b4afd4cdd94c0209998228fd70e99.

Kubernetes-commit: 294e02ed4b341fe9497cdfadb93cf19f1e64243f
2018-10-26 15:58:09 -07:00
Walter Fender 4749d14e11 Added tracing for long running requests.
Added tracing for use cases where etcd is not the cause of long running
requests.
Fixed spelling.
Factored in Wojtek-t feedback.

Kubernetes-commit: 99ebe8747176a10c718d5e3276c64d8c507bfb3b
2018-10-12 17:36:36 -07:00
Clayton Coleman 4e305103fd Dynamic client watchers should be able to handle ERROR gracefully
Watch can return type "ERROR" and a metav1.Status object. We need to
handle that during wait, and make it easy to handle the status object.

Kubernetes-commit: 5a8afa073f6b8cbb8b09f997f6db747c39dffb6e
2018-10-03 14:16:44 -04:00
Jordan Liggitt dba666528b Allow specifying the hub group-version for a handler
Kubernetes-commit: 0e9b06df0f21b421ff69fd455d4542883d61e8c3
2018-10-22 10:14:52 -04:00
Jordan Liggitt b758170bd7 Inline patch#toUnversioned
Kubernetes-commit: 870d121d5e8033a72c62ef3a64939f0eacab6798
2018-10-22 10:01:27 -04:00
Ibrahim AshShohail 47845b88c3 Update usages of http.ResponseWriter.WriteHeader to use http.Error
Signed-off-by: Ibrahim AshShohail <me@ibrasho.com>

Kubernetes-commit: 2fb3ba71f196031e9b36095d64c921cacc54f44e
2018-10-08 22:20:52 +03:00
Mike Danese 2ced48ac6e rebase authenticators onto new interface.
Kubernetes-commit: e5227216c0796d725c695e36cfc1d54e7631d3a6
2018-10-15 15:17:36 -07:00
xichengliudui 21f232e065 Remove duplicate words
Kubernetes-commit: e39448237370df37d2f77bf98cf951a19b1e5b6c
2018-10-15 15:55:49 -04:00
Mike Danese 37ab80320b tokenreview: add APIAudiences config to generic API server and augment context
Kubernetes-commit: 21fd8f204128a7847786927b460d95be34a6dbde
2018-10-09 22:04:52 -07:00
Antoine Pelisse ab5f00eec9 dry-run: Promote from Alpha to Beta
Also remove the test that used to check that the dry-run flag is
forbidden.

Kubernetes-commit: 5dca8e00e6d5501480244b8fd3e8aca54830042a
2018-10-10 15:44:23 -07: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
Cao Shufeng be442e0127 return 400 status when invalid json patch passed to apiserver
Kubernetes-commit: 1248f569917511c37501b6ef6bbb215ce87353dc
2018-09-11 14:11:39 +08:00