Commit Graph

233 Commits

Author SHA1 Message Date
Davanum Srinivas c56bc7b872 OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 9682b7248fb69733c2a0ee53618856e87b067f16
2022-01-03 10:59:47 -05:00
Patrick Ohly ec795ae204 avoid klog Info calls without verbosity
In the following code pattern, the log message will get logged with v=0 in JSON
output although conceptually it has a higher verbosity:

   if klog.V(5).Enabled() {
       klog.Info("hello world")
   }

Having the actual verbosity in the JSON output is relevant, for example for
filtering out only the important info messages. The solution is to use
klog.V(5).Info or something similar.

Whether the outer if is necessary at all depends on how complex the parameters
are. The return value of klog.V can be captured in a variable and be used
multiple times to avoid the overhead for that function call and to avoid
repeating the verbosity level.

Kubernetes-commit: 9eaa2dc554e0c3d4485d4c916dfdbc2f517db2e0
2021-12-11 12:10:21 +01:00
Wojciech Tyczyński b4935b065f Slightly improve reliability of storage List tests.
Kubernetes-commit: 8ca6c5922b9a0bafa8c83617d6930b981430334e
2021-12-10 12:05:32 +01:00
Davanum Srinivas b840d63feb Cleanup OWNERS files (No Activity in the last year)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 497e9c1971c9e7d0193bc6d11503ec4ad527f1d5
2021-12-10 15:18:50 -05:00
Davanum Srinivas 56a3a30ae1 Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 9405e9b55ebcd461f161859a698b949ea3bde31d
2021-12-09 21:31:26 -05:00
Wojciech Tyczyński 71bfcaaea1 Simplify storage.Interface by merging Watch and WatchList functions.
Kubernetes-commit: 53653e9b0a7145c3b6e133c5639194ff79b3719d
2021-11-18 12:40:26 +01:00
Kevin Delgado 59227ac996 Server Side Field Validation
Implements server side field validation behind the
`ServerSideFieldValidation` feature gate. With the
feature enabled, any create/update/patch request
with the `fieldValidation` query param set to
"Strict" will error if the object in the request
body have unknown fields. A value of "Warn"
(also the default when the feautre is enabled)
will succeed the request with a warning.

When the feature is disabled (or the query param
has a value of "Ignore"), the request will succeed
as it previously had with no indications of any
unknown or duplicate fields.

Kubernetes-commit: e50e2bbc889eb274ad1463a54188a2805767bfde
2021-08-18 02:25:36 +00:00
Antonio Ojea 4662dacdd3 migrate nolint coments to golangci-lint
Kubernetes-commit: d126b1483840b5ea7c0891d3e7a693bd50fae7f8
2021-11-16 16:57:58 +01:00
Raffaele Di Fazio bd72ab7a82 improve wording for panic message
Kubernetes-commit: 8e9d28eede7a8c81d7a9111cba642246353e0d14
2021-11-05 18:43:12 +01:00
Wojciech Tyczyński 0f1abbd5e4 Fix delete collection error channel size
Kubernetes-commit: f609a8e0b525ee22b3ea1a850a3b0504627525ea
2021-10-25 08:07:21 +02:00
scott 5d7782c370 fix goroutine leak in the DeleteCollection
Kubernetes-commit: 53df1caeef608dd82d6c0d2433646f538dcd2b5a
2021-10-11 20:21:27 +08:00
Vince Prignano 2b1166c385 Object creation with generateName should return a proper error
Signed-off-by: Vince Prignano <vincepri@vmware.com>

Kubernetes-commit: 8a9d61278f6c2177309f58bf2655f2269e8f6afd
2021-08-31 18:04:59 -07:00
Mike Spreitzer b225af44fe Introduce storagebackend.ConfigForResource
This is a Config specialized for a GroupResource.
It will support generating new resource-specific metrics.

Kubernetes-commit: 85bcd243aa3c8769a5904a1aea44ce704f5e7174
2021-08-29 01:06:12 -04:00
Tim Hockin cf0112f87e REST: Document mutable inputs on Create()
If one doesn't DeepCopy() on the way into Create, we can end up writing
into the original object.  This is by design, and should not be a
problem EXCEPT for tests.  If a test compares the input to this function
with the result, but the input was mutated in-situ, it may hide errors,
resulting in tests that pass, but shouldn't.

Kubernetes-commit: 6dfae64d9bebb2c40680bbd6e8270f69839ab013
2021-08-13 11:54:00 -07:00
Tim Hockin 578388b70b Fix registry tests to look at result objects
Kubernetes-commit: 42c7e62180446910f41d3a064016c0d7cdebb407
2021-08-13 11:54:21 -07:00
Jordan Liggitt 29227fd4ee Avoid spurious calls to update/delete validation
Kubernetes-commit: 561ce035b5b7d577ddb5bb30657bc1f8b399e109
2021-08-05 17:21:40 -04:00
Abu Kashem feb4eefe1c apiserver: add callback to get notified of object count
Kubernetes-commit: 2c60feffbee690af4632d068158e640abe10f678
2021-07-14 16:44:34 -04:00
David Eads 526d12c09b prevent mutation of deletion options during delete collection
Kubernetes-commit: 649b87aaf85dbb6e8190bf7d16c5dc903b5ecedc
2021-03-10 15:41:03 -05:00
astraw99 532c5c3d69 fix delete nil pointer panic
Kubernetes-commit: af19d7f415d70a1de3d67a00921865ba2868b425
2021-06-26 18:06:20 +08:00
Shiming Zhang b76bf120f0 Allow delete with grace period 1s even if metadata period is negative
Kubernetes-commit: a8d4cfac933485b9b4e5e802e267723ce9d2b90f
2021-06-21 15:12:17 +08:00
lala123912 5c11e2a763 staging/src/k8s.io/apiserver/pkg/registry:migrate logs to structured logs
Kubernetes-commit: 8e7b5ff480b04342f78b6d321814f05e31abc4bb
2021-01-22 10:25:47 +08:00
Jordan Liggitt 862269412a Eliminate parallel and unnecessary embedded etcd instances
Kubernetes-commit: 068e4c55a8aef3c9f3b7eb4565fc3babfab186b5
2021-06-04 00:41:09 -04:00
Jordan Liggitt 584c18160b Fix closing of decorated watcher channel on timeout
Kubernetes-commit: bd2d63dd57e6011bfa3218e59e27fddaa295426b
2021-06-02 14:05:52 -04:00
Jordan Liggitt 8dd82c2391 Add WarningsOnCreate,WarningsOnUpdate
Kubernetes-commit: 8c8a4cf3e4a18e97359ce750530a4fa27bbd3b88
2021-04-30 21:46:54 -04:00
mozillazg eca89e844c Fix staticcheck failures for vendor/k8s.io/apiserver/pkg/registry/rest/resttest
Kubernetes-commit: 92ece853be2969fd8f9716434c8fb062e1ebef9b
2021-04-17 16:07:19 +08:00
Jordan Liggitt b97dfc761c allow evictions subresource to accept policy/v1 and policy/v1beta1
Kubernetes-commit: 33ad842480353f2816873bf728d75333948e4817
2021-03-31 16:54:55 -04:00
Kevin Delgado 86db6c67fb Server-Side Apply: Status Wiping/Reset Fields
Adds and implements ResetFieldsProvder interface in order to ensure that
the fieldmanager no longer owns fields that get reset before the object
is persisted.

Co-authored-by: Kevin Wiesmueller <kwiesmul@redhat.com>
Co-authored-by: Kevin Delgado <kevindelgado@google.com>

Kubernetes-commit: a1fac8cbd9289d95db4831a83239292ed56ce59d
2021-03-09 23:54:55 +00:00
chymy 2b123cdcbb Fix staticcheck failures for vendor/k8s.io/apiserver/pkg/registry/generic
Signed-off-by: chymy <chang.min1@zte.com.cn>

Kubernetes-commit: 3bab70b06a9f84b4aeb6dd39ba56f813b4febe44
2021-02-27 03:25:24 -05:00
Nikhita Raghunath d22b238769 *: remove nikhiljindal from OWNERS
Kubernetes-commit: 6cef3a4e33c10c27bb301a1070ea3ff4cdad0c39
2021-02-16 10:50:50 +05:30
Nikhita Raghunath 148a4561b0 *: remove jianhuiz from reviewers
Kubernetes-commit: e1b6089e7e9f3b80a911a4ec86cec6491729c89c
2021-02-16 10:35:01 +05:30
Nikhita Raghunath cce93bd25d *: move gmarek to emeritus_approvers
Kubernetes-commit: b11516d69f2131327931a2cf7452d5e891d7e520
2021-02-16 10:31:19 +05:30
David Eads 67507290ad finish removal of exportoptions
Kubernetes-commit: 37cc89ed8d5194f288bc9f9633e6142647631a07
2021-01-22 09:21:56 -05:00
David Eads 2ea61962bd add metrics for insecure backend proxy
Kubernetes-commit: 782a7a54269cba12bd16f90347127c9efd41fa36
2021-01-07 11:25:43 -05:00
Tim Hockin 12c81a534a Use typedefs for Begin* functions
David asked for this for readability, even if not all other hooks do it.

Kubernetes-commit: 37b34f5b53edec78ca33929443bb4ba9a9534ed1
2020-12-15 21:49:16 -08:00
Tim Hockin e0a1a6eb3d Change AfterCreate/Update to take Options
Also adds typedefs for these function signatures for code clarity.

Kubernetes-commit: 25da6a06609265dcd3f637629705686b308b26d0
2020-12-15 21:40:44 -08:00
Tim Hockin f25a4e6d0f Change AfterDelete to take DeleteOptions
All of the After* hooks are called, whether the operation is dry-run or
not.  Create and Upate both have BeginCreate() hooks which know about
dry-run but delete doesn't, and can't (because of graceful deletion and
finalizers, the Delete() method may return and the object is actually
deleted later).

This adds an argument to AfterDelete(), and the others will follow.

This commit also adds tests for AfterDelete being called in the right
places.

Kubernetes-commit: 9402f48e050c25514a95da2e5e1feb6754ad0e0d
2020-12-15 21:24:57 -08:00
Tim Hockin c1a9dd5c5f Remove ObjectFunc
Kubernetes-commit: bb79475a860e908c6d3bbaf25da802c158c356b7
2020-12-15 13:05:13 -08:00
Tim Hockin f723593774 Make REST Decorator funcs not return error
Kubernetes-commit: 625713008d8897670092a125f26d368e96b7268f
2020-11-10 15:07:05 -08:00
Tim Hockin 04148006d1 Make REST After* funcs not return error
Kubernetes-commit: 64491be328128606daa8f91768586257dc393bd0
2020-11-10 14:50:42 -08:00
Tim Hockin 9a5725b94a Add BeginCreate and BeginUpdate REST hooks
These hooks return a "cleanup" func which is called when the top-level
operation completes, with an indicator of which result.

This is to enable much simpler handling of allocations in Service's REST
implementation, in particular.

Some discussion in https://github.com/kubernetes/kubernetes/pull/95967

This also adds tests for the almost totally untested Decorator,
AfterCreate, and AfterUpdate hooks.

Kubernetes-commit: 67c9761623052d147a58807caced1c89262fe30d
2020-11-10 08:40:25 -08:00
wojtekt 3de94d4883 Unify variable naming between GuaranteedUpdate and Delete in storage
Kubernetes-commit: d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
2020-12-16 09:28:44 +01:00
wojtekt 8c25869e43 Add suggestion to storage interface Delete method
Kubernetes-commit: c2d61896f45967cdea15072b7a12faeb635b5dc5
2020-11-03 13:21:00 +01:00
Ken Sipe 92af261bb8 fix SA2006 value of err not used
Signed-off-by: Ken Sipe <kensipe@gmail.com>

Kubernetes-commit: a549d0a75e3a09d26f3a316982ff3711be4ed1d2
2020-06-25 17:23:37 -05:00
wojtekt 942f220e85 Remove variadic argument from storage interface
Kubernetes-commit: 8b98305858b107369f2c9b9fd8ef1c5b0da078c0
2020-11-02 15:52:51 +01:00
wojtekt a5000473c1 Pipe newFunc to etcd3 storage layer
Kubernetes-commit: fbd65a265a47ffe081aaac2f794a55034333d11d
2020-08-31 11:58:45 +02:00
Nikhita Raghunath 3151c1befa apimachinery: remove inactive members from OWNERS
Kubernetes-commit: db495ea9837cf840639a4e02085253fb341e12b5
2020-07-11 19:28:24 +05:30
Ken Sipe 4ad3e91efa changes in imports was unintentional
Signed-off-by: Ken Sipe <kensipe@gmail.com>

Kubernetes-commit: 09cd56b561d0c31421dfc6374b68e0b18c6cc746
2020-06-28 15:26:40 -05:00
Ken Sipe 0c18993949 fix S1008 simplify bool returns
Signed-off-by: Ken Sipe <kensipe@gmail.com>

Kubernetes-commit: b287287a3093e895a77ccf78053adffcaa7a67c9
2020-06-26 10:39:16 -05:00
Ken Sipe ce7f425acc fix S1002 omit comp to bool
Signed-off-by: Ken Sipe <kensipe@gmail.com>

Kubernetes-commit: e8878687b18fd961e9f3e29c1c46fe018157a77d
2020-06-26 10:36:38 -05:00
Nikhita Raghunath 0c10b24f42 apiserver: remove inactive members from OWNERS
As a part of cleaning up inactive members (who haven't been active since
beginning of 2019) from OWNERS files, this commit removes euank and
CaoShuFeng from the list of reviewers.

Kubernetes-commit: 550ad25c0fa93bc2a68a9d58db9bb0d228fa63c5
2020-08-10 15:07:34 +05:30