apiserver/pkg/admission
Cici Huang 04b26c4697 ValidatingAdmissionPolicy: support namespace access (#118267)
* Support namespace access from cel expression in validatingadmissionpolicy.

* Whitelist the exposed fields in namespace object and add test

* better handling of cluster-scoped resources.

* [API REVIEW] namespaceObject in Expression doc.

* compatibility with composition.

* generated: ./hack/update-codegen.sh && ./hack/update-openapi-spec.sh

* workaround namespace of namespace is unexpectedly set.

* basic test coverage for namespaceObject.

---------

Co-authored-by: Jiahui Feng <jhf@google.com>

Kubernetes-commit: 13172cba5c0e1c6a076dbda4aeebbccaf658c7f1
2023-07-15 01:33:59 +00:00
..
cel Implement validationActions and auditAnnotations 2023-03-06 17:29:28 -05:00
configuration Pre-allocate webhook accessors arrays for mutating and validating 2023-07-13 23:43:12 +01:00
initializer implmementing type checking 2023-03-07 15:49:19 -08:00
metrics update histogram 2023-07-14 10:10:56 -05:00
plugin ValidatingAdmissionPolicy: support namespace access (#118267) 2023-07-15 01:33:59 +00:00
testing Replace uses of ObjectReflectDiff with cmp.Diff 2023-03-23 11:34:03 -07:00
attributes.go audit & admission: associate annotation with audit level 2019-05-31 15:36:29 -07:00
attributes_test.go remove psp in extensions api/apis 2022-11-02 21:12:43 +08:00
audit.go Don't add audit annotations directly to the audit event 2022-03-28 11:38:38 -07:00
audit_test.go Initialize the AuditEvent with the AuditContext (#113611) 2023-07-03 18:28:13 +00: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
conversion.go migrate versionedattr to avoid circular dependency 2023-03-03 14:04:29 -06:00
conversion_test.go Replace uses of ObjectReflectDiff with cmp.Diff 2023-03-23 11:34:03 -07: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 Fix the doc string of GetOldObject func 2021-10-28 17:03:18 +03:00
plugins.go grammar: replace all occurrences of "the the" with "the" 2022-09-17 22:58:01 +02: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