Comments (3)
Would you like this to be pod specific or a cluster wide probability?
from chaoskube.
I was thinking about making it pod specific but I also see value in a global version of it like you propose in #34.
For the pod specific version I thought one would annotate a PodSpec with something like:
chaos.alpha.kubernetes.io/frequency=2/day
for "kill this twice per day"chaos.alpha.kubernetes.io/frequency=10/hour
for "kill this ten times per hour"chaos.alpha.kubernetes.io/frequency=1/week
for "kill this once a week"- etc.
To implement this: one invokes chaoskube
at a certain interval like before and then calculate a probability per pod based on the desired frequency and how often chaoskube
is invoked.
For instance, let's assume chaoskube
runs at an interval of 1 minute and a pod has the annotation set to twice a day (2/day). Then on each iteration chaoskube
would calculate a probability that this pod should be killed like this:
- twice a day =>
24*60/2
=> every 720 minutes - since chaoskube runs every minute => 1/720 => 0,14% chance to kill this pod in each iteration.
or for ten times an hour (10/hour). - ten times an hour =>
60/10
=> every 6 minutes - since chaoskube runs every minute => 1/6 => 16,6% chance to kill this pod in each iteration.
This would also work with different intervals I think.
I'm not sure if this is correct but if it is it would allow chaoskube
to remain stateless and pods would be killed at roughly the same pace over time regardless of cluster size.
from chaoskube.
Sounds good.
Just a couple of thoughts/questions I had when I read this:
- What do you plan to do with non annotated pods?
- What happens to pods that want a higher kill rate than 60/hour?
- This is more complicated, but might be the better approach because every pod can opt-in and decide its own kill rate.
- Do we want that pod or namespace specific?
from chaoskube.
Related Issues (20)
- chaoskube is restarting with status as Running and crashLoopBackoff HOT 16
- Install in my namespace HOT 8
- Dashboard/Metrics info documentation HOT 5
- Using curl command HOT 5
- Node termination support?
- Add support for terminating multiple pods within a topology
- kinds argument available? HOT 1
- Add flag to stop chaoskube after a given time HOT 1
- Helm chart on Kubeapps is not available HOT 18
- Action Required: Fix Renovate Configuration
- Context deadline exceeded while using slack notifier HOT 9
- maxKill functionality not working using helm chart HOT 1
- Makefile fails HOT 1
- Pod termination timestamp HOT 1
- Dependency Dashboard
- Bug with gracePeriod conversion HOT 3
- [FEATURE] Kill only pods which do have more then 1 sibling replica HOT 2
- Cannot disable dry run HOT 4
- Envar support HOT 3
- Switch to multi-arch docker image 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 chaoskube.