apiserver/pkg/admission
Max Smythe 41adff8c93 Custom match criteria (#116350)
* Add custom match conditions for CEL admission

This PR is based off of, and dependent on the following PR:

https://github.com/kubernetes/kubernetes/pull/116261

Signed-off-by: Max Smythe <smythe@google.com>

* run `make update`

Signed-off-by: Max Smythe <smythe@google.com>

* Fix unit tests

Signed-off-by: Max Smythe <smythe@google.com>

* Fix unit tests

Signed-off-by: Max Smythe <smythe@google.com>

* Update compatibility test data

Signed-off-by: Max Smythe <smythe@google.com>

* Revert "Update compatibility test data"

This reverts commit 312ba7f9e74e0ec4a7ac1f07bf575479c608af28.

* Allow params during validation; make match conditions optional

Signed-off-by: Max Smythe <smythe@google.com>

* Add conditional ignoring of matcher CEL expression validation on update

Signed-off-by: Max Smythe <smythe@google.com>

* Run codegen

Signed-off-by: Max Smythe <smythe@google.com>

* Add more validation tests

Signed-off-by: Max Smythe <smythe@google.com>

* Short-circuit CEL matcher when no matchers specified

Signed-off-by: Max Smythe <smythe@google.com>

* Run codegen

Signed-off-by: Max Smythe <smythe@google.com>

* Address review comments

Signed-off-by: Max Smythe <smythe@google.com>

---------

Signed-off-by: Max Smythe <smythe@google.com>

Kubernetes-commit: e5fd204c33e90a7e8f5a0ee70242f1296a5ec7af
2023-03-16 04:20:31 +00:00
..
cel Implement validationActions and auditAnnotations 2023-03-06 17:29:28 -05:00
configuration Fix N^2 startup for webhook configurations 2023-01-09 23:29:25 +00:00
initializer implmementing type checking 2023-03-07 15:49:19 -08:00
metrics Matchconditions admission webhooks alpha implementation for kep-3716 (#116261) 2023-03-15 07:36:02 +00:00
plugin Custom match criteria (#116350) 2023-03-16 04:20:31 +00: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 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 Consolidate AuditContext 2022-07-12 11:53:57 -07: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 migrate versionedattr to avoid circular dependency 2023-03-03 14:04:29 -06: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