Comments (11)
@clairecng @ptnapoleon thanks for looking into that.
Claire, that sounds good. I had a feeling the Disruption does not get created at all if it fails that validation, isn't it?
On a similar note, I started a discussion on how visibility/troubleshooting could be improved.
from chaos-controller.
@nikos912000 The disruption is already created when passing through the ValidateCreate method of the webhook, and is deleted when an error is returned.
from chaos-controller.
I assume the events that we record on the Disruption object are lacking, but could you expand on why? I do know that the API for reading events on a k8s object is extremely inconvenient compared to reading the status. We could do this, but at least for our users (and we don't use CD for disruptions here too often), they are always checking feedback via kubectl describe
from chaos-controller.
I need to do some digging on the events and on how to get them through our control plane. I'll post an update on this
Do you know if we can somehow get the errors from the validating webhook? Since no Custom Resource gets created in that case we cannot have these errors in the status or in events isn't it?
from chaos-controller.
As far as I know, the validating webhook should already be returning errors, if it finds any? We try to catch every error that can be caught upfront within the webhook
from chaos-controller.
The validating webhook does return errors. However, I am not sure how we can get them from a client.
For instance, when I apply a Disruption with an invalid Service name, the webhook errors as expected from the codebase.
But this error message is not logged in the controller and no events are sent. It is only returned as a response to kubectl apply
:
Error from server (1 error occurred:
* Spec: Network: the service specified in the network disruption (chaos-engineering-framework/dem) does not exist
): error when creating "network_egress_drop_service.yaml": admission webhook "chaos-controller-webhook-service.chaos-engineering-framework.svc" denied the request: 1 error occurred:
* Spec: Network: the service specified in the network disruption (chaos-engineering-framework/dem) does not exist
I guess this response comes from the controller-runtime's webhook handler.
from chaos-controller.
@Devatoria @clairecng opinions on adding this?
from chaos-controller.
If we want to implement this, we would need to create the disruption even if there is an error detected by the disruption webhook validator and let it sit without injection, which would need to be either updated or deleted by the user afterwards. Waiting for @Devatoria's opinion on this, as I don't think I have sufficient knowledge to know if this could be very bad or not.
If it's ok to change this behaviour, I don't think it should be too hard to either add events to the disruption (which could then be broadcasted to all our notifiers) or store failures in the disruption's status! I would have no problem with adding this bit.
If it's not ok to change this behaviour, we could send an event to the chaos-controller pod eventually, however I'm not sure it's a good idea... But we can still log it, if this could help?
from chaos-controller.
After some time thinking/testing, we could send an event on the validation here, even if the disruption is deleted just after that. Using the kubernetes API, it could still be accessible by listing all events and doing a little bit of filtering. (for example: kubectl get events --field-selector involvedObject.kind=Disruption
).
@nikos912000 Would this be a good solution for you?
from chaos-controller.
Sorry for the late answers on most issues, we spent a good amount of time on internal dev efforts for the past months but we're now going back on the chaos-controller more actively and soon with some new features!
from chaos-controller.
For context, we added links to DataDog Events and logs in our Continuous Deployment platform and so far it has been sufficient.
from chaos-controller.
Related Issues (20)
- User Issue: :latest tag did not work for datadog/chaos-injector, but :4.2.1 did HOT 1
- User Issue: injector panics due to cgroupPaths containing an empty string HOT 4
- User Request: Compatibility with Kubernetes 1.22 HOT 2
- User Issue: Injector Pod stuck in Failed phase with reason DeadlineExceeded HOT 12
- User Issue: Injector Pod stuck when executing kernel panic disruption HOT 9
- User Request: Feature flag to disable deletion of Disruption HOT 3
- User Request: Support for percentage in CPU stress HOT 3
- User Request: Debugging instructions HOT 3
- User Issue: Status not being a subresource causes issues with control planes HOT 5
- User Issue: Traffic surge once a packet drop network failure finishes HOT 6
- User Issue: CPU pressure does not consume 100% of the pods allocated CPU HOT 1
- User Issue: Security vulnerabilities flagged in Docker images with Go 1.16 HOT 4
- User Request: Release Dynamic Targeting behind a feature flag in controller HOT 4
- User Issue: Unable to terminate node level network experiments HOT 8
- Static Targeting example HOT 2
- User Request: Release cloudProviders behind a feature flag in controller HOT 5
- User Issue: Unable to gracefully terminate pods container HOT 9
- Guidance running CPU pressure experiments HOT 5
- User Issue / Suggestion: Controller arguments do not supersede config file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chaos-controller.