Commit Graph

65 Commits

Author SHA1 Message Date
Jordan Liggitt
36eb250cbb Switch TableGenerator/TableConvertor interfaces to metav1 2019-11-26 13:18:18 -05:00
Clayton Coleman
2ddeb94b56
storage: Deleting a namespace while spec.finalizers pending should not error
All objects with graceful deletion allow multiple DELETE calls in the pending
state. Namespace is the one outlier, and the error here predates graceful
deletion and finalizers. We should make this behavior consistent with other
calls and merely indicate success and return the state of the object, the
same as if there were pending metadata finalizers.

Clients that previously checked for a conflict error during delete to know
that the server is already deleting will now no longer receive an error
(as if the object were rapidly deleted). There is a small chance that some
clients have error checking for this state, but a much larger chance that
clients that want to trigger a delete of the namespace do not handle this
error case.

Discovered in an e2e test that used the framework namespace and triggered
deletion of that ns itself, and then the AfterEach step in e2e failed
because the namespace was already pending deletion.
2019-10-19 23:08:17 -04:00
Jordan Liggitt
61774cd717 Plumb context to admission Admit/Validate 2019-08-20 11:11:00 -04:00
Ted Yu
87b2a3129b Propagate error from NewREST 2019-08-12 13:55:35 -07:00
wojtekt
a756e20cb5 Update autogenerated files 2019-07-01 15:02:49 +02:00
wojtekt
7497260e54 Move etcd/testing to etcd3/testing 2019-07-01 15:02:49 +02:00
Chao Xu
7bb4a3bace 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.
2019-05-17 09:54:11 -07:00
yue9944882
34c4a6e057 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
2019-05-17 09:50:16 -07:00
Jordan Liggitt
fba885a0d2 Handle updates removing remaining finalizers on deleted objects 2019-05-15 17:17:39 -04:00
Kubernetes Prow Robot
b4cc2a5523
Merge pull request #76051 from zhouhaibing089/rm-orphan-by-default
namespace: remove gc finalizers based on delete options
2019-04-30 16:10:56 -07:00
zhouhaibing089
a458e9bb85 namespace: remove gc finalizers based on delete options
This makes the behavior being consistent with generic store, The
orphan finalizer should be removed if the delete options does not
specify propagarionPolicy as orphan.
2019-04-26 16:13:41 -07:00
Sean Sullivan
abfc5bbbf7 Rename TablePrinter interface to TableGenerator 2019-04-16 12:55:30 -07:00
ajatprabha
4ddc198c39
pin ResourceVersion precondition only when specified 2019-03-12 17:00:41 +05:30
ajatprabha
42f0a36f44
check for ResourceVersion conflict in separate if block 2019-03-12 17:00:39 +05:30
ajatprabha
8f48d76271
add ResourceVersion to DeleteOptions.Preconditions 2019-03-12 17:00:39 +05:30
Chao Xu
3b618af0d4 Expose storage version hash 2019-03-11 10:26:56 -07:00
Antoine Pelisse
68937c4934 dry-run: Use dry-runnable structure 2018-08-03 14:30:50 -07:00
Antoine Pelisse
03b1e14101 dry-run: Create new options for Update/Create and pass it along 2018-07-12 07:18:37 -07:00
jennybuckley
c60fe4fb76 Propagate forceAllowCreate as false to all subresources 2018-06-29 11:28:19 -07:00
jennybuckley
d10e08fc89 Allow override AllowCreateOnUpdate with new argument to Update 2018-06-28 14:24:51 -07:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
David Eads
8ae62517da remove rootscopedkinds from groupmeta 2018-05-01 13:08:23 -04:00
Mike Danese
54fd2aaefd replace request.Context with context.Context 2018-04-24 08:59:00 -07:00
Clayton Coleman
1970f89e43
Namespace should support table printing 2018-02-22 11:37:40 -05:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Dr. Stefan Schimanski
d4d53c0e2a apiserver: remove unneeded scheme from registry tester 2017-11-20 09:39:44 +01:00
Dr. Stefan Schimanski
0b100cb69b registry: move generic registry tester into k8s.io/apiserver 2017-11-16 09:03:42 +01:00
Dr. Stefan Schimanski
3410f536f4 registry: cut-off kube dependencies from registrytest 2017-11-16 08:57:58 +01:00
Dr. Stefan Schimanski
bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski
35bb6823ea Update bazel 2017-11-02 09:33:41 +01:00
Dr. Stefan Schimanski
2452afffe0 admission: wire create+update validation func into kube registries 2017-11-02 09:29:16 +01:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Dr. Stefan Schimanski
509df603b1 apimachinery: mechanical removal of ObjectCopier plumbing 2017-10-06 19:21:03 +02:00
Clayton Coleman
fc2d201e15
Allow watch cache to be disabled per type
Currently setting watch cache size for a given resource does not disable
the watch cache. This commit adds a new `default-watch-cache-size` flag
to map to the existing field, and refactors how watch cache sizes are
calculated to bring all of the code into one place. It also adds debug
logging to startup to allow us to verify watch cache enablement in
production.
2017-09-08 13:42:28 -04:00
Jeff Grafton
a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton
33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Shiyang Wang
2eda19da7b Fix NotFound errors do not line up with API endpoint's group version 2017-08-07 16:30:40 +08:00
Clayton Coleman
2568a92119
Grow signature for predicate attributes to include init status 2017-06-02 22:09:04 -04:00
Jordan Liggitt
aa69c80728
Remove deletecollection support from namespace object 2017-05-25 00:17:08 -04:00
Monis Khan
ed35deb69d
Default ObjectNameFunc for all REST Stores
All Stores in Kubernetes follow the same logic for determining the name
of an object.  This change makes it so that CompleteWithOptions defaults
the ObjectNameFunc if it is not specified.  Thus a user does not need to
remember to use ObjectMeta.Name.  Using the wrong field as the name can
lead to an object which has a name that bypasses normal object name
validation.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-04-21 15:47:25 -04:00
Mike Danese
a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Chao Xu
5bfacf59f6 API 2017-02-28 23:05:40 -08:00
nikhiljindal
4ee81eb037 Updating tests for deleted boolean from Delete() 2017-02-21 11:00:36 -08:00
nikhiljindal
1d32897eed Updating the registry to return whether the resource was immediately deleted 2017-02-21 11:00:35 -08:00
p0lyn0mial
b2cce0ac8e added short names for resources which are exposed during discovery 2017-02-06 23:35:07 +01:00
Dr. Stefan Schimanski
6af3210d6f Update generated files 2017-02-03 08:15:46 +01:00
Dr. Stefan Schimanski
536460e1d9 Mechanical fixup imports: pkg/genericapiserver 2017-02-03 08:15:45 +01:00
Dr. Stefan Schimanski
80b96b441b Mechanical import fixup: pkg/storage 2017-02-03 07:33:43 +01:00