-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(kuma-cp): don't panic in webhook if k8s object can't convert to core resource #4455
fix(kuma-cp): don't panic in webhook if k8s object can't convert to core resource #4455
Conversation
…ore resource Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #4455 +/- ##
==========================================
- Coverage 55.42% 55.36% -0.07%
==========================================
Files 947 947
Lines 57938 57976 +38
==========================================
- Hits 32113 32097 -16
- Misses 23284 23326 +42
- Partials 2541 2553 +12
Continue to review full report at Codecov.
|
pkg/plugins/runtime/k8s/controllers/gateway_instance_controller.go
Outdated
Show resolved
Hide resolved
Uhhh, can we recover from the panic in webhook server? We recover from panics in API Server. We should never crash a CP for invalid request. Otherwise, it's very easy to do DDoS a CP. |
Yeah it doesn't crash |
I misunderstand the description then, great! |
Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
Summary
Trying to set, for example, a negative weight on a
TrafficRoute
split results in a confusing error for users:and a panic in the webhook goroutine in
kuma-cp
:Here we can't assume that
GetSpec
succeeds.Now the user gets: