apiserver/pkg/admission
Andrea Nodari 618f4b129a Make the creation of namespace using POST and PATCH consistent
PATCH verb is used when creating a namespace using server-side apply,
while POST verb is used when creating a namespace using client-side
apply.

The difference in path between the two ways to create a namespace led to
an inconsistency when calling webhooks. When server-side apply is used,
the request sent to webhooks has the field "namespace" populated with
the name of namespace being created. On the other hand, when using
client-side apply the "namespace" field is omitted.

This commit aims to make the behaviour consistent and populates the
"namespace" field when creating a namespace using POST verb (i.e.
client-side apply).

Kubernetes-commit: 3cb510e33eecbdc37aad14f121396ccfbf5268cb
2020-09-21 12:13:12 +02:00
..
configuration Switch admission webhook config manager to v1 2019-08-01 21:57:39 -04:00
initializer Move ResourceQuota admission to k8s.io/apiserver 2020-07-29 10:34:39 +02:00
metrics remove prometheus dependencies from k/k and add testcases for LabelsMatch 2020-04-22 14:07:53 +08:00
plugin Make the creation of namespace using POST and PATCH consistent 2020-09-21 12:13:12 +02:00
testing Plumb context to admission Admit/Validate 2019-08-19 10:48:08 -04:00
attributes.go audit & admission: associate annotation with audit level 2019-05-31 15:36:29 -07:00
attributes_test.go audit & admission: associate annotation with audit level 2019-05-31 15:36:29 -07:00
audit.go Plumb context to admission Admit/Validate 2019-08-19 10:48:08 -04:00
audit_test.go Plumb context to admission Admit/Validate 2019-08-19 10:48:08 -04:00
chain.go Plumb context to admission Admit/Validate 2019-08-19 10:48:08 -04:00
chain_test.go Plumb context to admission Admit/Validate 2019-08-19 10:48:08 -04:00
config.go switch over k/k to use klog v2 2020-04-17 15:25:06 -04:00
config_test.go cleanup tempfiles in unit test 2020-06-18 11:24:46 +08:00
decorator.go add an admission decorator chain 2018-02-14 09:27:25 -05:00
errors.go make admission tolerate object without objectmeta for errors 2017-08-29 13:13:06 +00:00
errors_test.go Update tests for: Pass {Operation}Option to Webhooks 2019-05-07 13:37:07 -07:00
handler.go refactor admission handler and add UT 2017-11-03 16:40:15 +08:00
handler_test.go refactor admission handler and add UT 2017-11-03 16:40:15 +08:00
interfaces.go Plumb context to admission Admit/Validate 2019-08-19 10:48:08 -04:00
plugins.go switch over k/k to use klog v2 2020-04-17 15:25:06 -04:00
reinvocation.go Plumb context to admission Admit/Validate 2019-08-19 10:48:08 -04:00
util.go Add GetResourceMapper to admission ObjectInterfaces 2019-05-13 11:24:20 -04:00