Commit Graph

32 Commits

Author SHA1 Message Date
Chao Xu 98e2d6d11f remove reference to v1alpha1
Kubernetes-commit: 7945ae68d0c7cffb070d60ad4d8bfe6ef585c279
2017-11-19 13:54:50 -08:00
Dr. Stefan Schimanski 2ee052ccdf admission: make metrics compositional and move to metrics sub-package
Kubernetes-commit: baba0c827bfddfdc56b69c88e19406966ef900a2
2017-11-17 11:49:55 +01:00
Chao Xu 86dc6e7b4e Update the validating webhook plugin to be a ValidatingInterface, rather than a MutatingInterface
Kubernetes-commit: cbfc9d33b7c6b9e767e4259910f783c047e83583
2017-11-20 14:57:07 -08:00
Dr. Stefan Schimanski 45dc4adcc3 admission/webhook: move webhook initializer into plugin
Kubernetes-commit: e19257f2ec87d8091defb7935bb3a161fbb229d0
2017-11-15 13:00:24 +01:00
Chao Xu 8a572a63d4 Rename GenericAdmissionWebhook to ValidatingAdmissionWebhook
Kubernetes-commit: d3c0765780fed5576670d6624cc3cc8d691d6392
2017-11-17 21:05:11 -08:00
Chao Xu ed64135818 Rename the testdata package to testcerts.
`godep save` somehow fails if there is a testdata go package. See
https://github.com/kubernetes/kubernetes/pull/54892#issuecomment-345035489

Kubernetes-commit: 2052a7e2a3483e341a5a8d1fc5ae8510dd32b2c6
2017-11-17 13:24:48 -08:00
Chao Xu 1b638a5be7 generated bazel
Kubernetes-commit: 6193360eb52b00727df08f67eb8fc364a8df85e9
2017-11-15 16:21:28 -08:00
Chao Xu cb8d15718f Adding the mutating webhook
Kubernetes-commit: ea123f82aae5bc46b9a91c4543c8f742d0db52da
2017-11-14 16:36:28 -08:00
cheftako 556a83dbf9 Admission request/response handling
AdmissionResponse allows mutating webhook to send apiserver a json patch
to mutate the object.
This reflects the imperative nature of AdmissionReview. It adds
AdmissionRequest and AdmissionResponse in place of status/spec.
The AdmissionResponse the allows the mutating webhook
to send back a json path with the mutated version of the requested
object.
Fixed the integration test to clean up properly.
Switched test image to 1.8v5 to reflect API changes.
Make sure to cache test framework client for cleaup test code.
Switched to pointer for patch type.
Factored in @liggitt's feedback.
Factored in @lavalamp's feedback.

Kubernetes-commit: dac3c2e168784bbcf1cbfef8bf5430101e191715
2017-11-06 15:41:26 -08:00
Chao Xu 0159c24faf generated bazel
Kubernetes-commit: 47ef9aaf2297829998eb1a0a804de9209c1008f1
2017-11-14 16:29:23 -08:00
Chao Xu da1d210644 Reorganize the code in webhook admission plugin.
Move the namespace selector code to package webhook/namespace
Move the conversion related code to package to webhook/versioned
Move errors related code to package webhook/errors
Move admission review related code to package webhook/request

Kubernetes-commit: 51774697b35314b078270e9da24fbe0ff843b981
2017-11-14 15:20:45 -08:00
Chao Xu f88f0f12a1 Reorganize the admission webhook code.
Moved client and kubeconfig related code to webhook/config;
Moved the rule matcher to webhook/rules;
Left TODOs saying we are going to move some other common utilities;
Other code is moved to webhook/validation.

Kubernetes-commit: 1adfacc7eb41da109e970a9c2985fd55b4cbbdfd
2017-11-05 18:11:47 -08:00
Joe Betz 5f443f1654 Align admission metric names with prometheus guidelines
Kubernetes-commit: 369fd81ca151fe2ccb1ac0e6d44aad0eee99abf1
2017-11-14 11:18:31 -08:00
Joe Betz a1e35e7bfe Add system namespaces to admission metrics. Add tests and leverage test code from PR#55086
Kubernetes-commit: 9d13d1baece20fc611176aad3b6f39ccf9fa4b36
2017-11-06 17:48:59 -08:00
Joe Betz f2028cc5a5 Add admission metrics
Kubernetes-commit: 3940e4f0533a7ee8e50ec939cdcb44c33d4a0ae9
2017-11-06 14:14:33 -08:00
Chao Xu 9dda7d3efb let validation webhook convert objects to the external version before sending them
Kubernetes-commit: ab053a224d27aa48ea4b34ba7591cfd72c3f567d
2017-11-03 16:49:56 -07:00
Daniel Smith bee24b37a5 fix docs and validation
Kubernetes-commit: e73fd8784484235d5010f4b2bba2251a584c5dd0
2017-11-11 18:00:32 -08:00
Daniel Smith 51c2612984 Add URL beside service
Kubernetes-commit: a0cb2ce697c195d22daeef4fbe6545bdaba11e2f
2017-10-31 16:28:06 -07:00
Chao Xu 640cf74d8c generated
Kubernetes-commit: 2f83748068e45fd548b1caaac2cc0ca06a769653
2017-11-10 11:06:07 -08:00
Chao Xu 512274139c add NamespaceSelector to the api
business logic in webhook plugin and unit test

add a e2e test for namespace selector

Kubernetes-commit: 7006d224bebb5a1aee9c70387a8584e0a0e8b10f
2017-10-27 14:42:09 -07:00
hzxuzhonghu 69a65358c5 update bazel
Kubernetes-commit: b845e26983741c5d12e621604b5e064e03d4fed1
2017-11-03 10:06:07 +08:00
hzxuzhonghu 45d6a78b3f cache admission webhook restClient
Kubernetes-commit: 42d9153a03e971453ccf8e46e149a20a9ff3d656
2017-10-31 19:08:29 +08:00
mbohlool 3846cb803e Rename ExternalAdmissionHookConfiguration to ValidatingWebhookConfiguration
Kubernetes-commit: 9ddea83a2ce0937cf0fc8f8c35614bb18e74cfad
2017-11-07 12:46:54 -08:00
Dr. Stefan Schimanski d10f10b8ac pkg/apis/core: mechanical import fixes in dependencies
Kubernetes-commit: 012b085ac870d359131f4251213bf2fff1d15aa0
2017-11-08 23:34:54 +01:00
supereagle 80475e014f use versiond group clients from client-go
Kubernetes-commit: b694d518428ac655780d812f7dd4cf72d3e24763
2017-07-28 15:54:13 +08:00
Janet Kuo 201480baa2 Add hook information when rejecting a request
Kubernetes-commit: 948bd7bbc18b343161120b365c089528f8fc0550
2017-10-27 14:59:54 -07:00
Dr. Stefan Schimanski 45afa13373 admission: rename Validate{ -> Initialization}, Validat{ingAdmit -> e}
Kubernetes-commit: aedcf681b32618be3cf9ad40eeb039f1bb26c5ae
2017-10-27 17:09:39 +02:00
Dr. Stefan Schimanski 777cf3c0ef admission: unify plugin constructors
Kubernetes-commit: 131905cdb8b929f7c15f810e02ec9a45b306b769
2017-10-30 14:20:40 +01:00
hzxuzhonghu 749c4d2360 fix import warning
Kubernetes-commit: fcf4a0e191449925148783517cfe7ade234a2510
2017-10-30 10:16:13 +08:00
Chao Xu 7d5fb56d23 Add a e2e test for the admission webhook
Kubernetes-commit: 88cb71c421e4db6c15b9ec9f4c605c8779b15a33
2017-10-13 14:37:37 -07:00
Chao Xu 3843f2885c remove the nesting directory webhook/webhook
Kubernetes-commit: ca8131877ad4fcab76388360e04ff9eb05af41a4
2017-10-26 14:19:49 -07:00
David Eads 3cb246ace6 move webhook admission to generic apiserver
Kubernetes-commit: 8c1fe1f61a1de754a2cfed1966f4a1f8024ca618
2017-10-24 08:48:05 -04:00