Giter VIP home page Giter VIP logo

Comments (6)

asobti avatar asobti commented on May 10, 2024

@gzlatkov Thanks for catching this. This does seem like a bug. A PR would be really appreciated.

A couple of thoughts:

  1. Instead of math.Round(), lets do math.Floor() instead so we never over-kill pods. So, with n=3 and killValue=50, we should never kill 2 pods.
  2. I'm not sure what the best way to get the number of pods in chaos.go is. That info isn't already available there, so it will likely need to be added to the Victim interface so each victim can report the number of pods.

cc @Spellchaser

from kube-monkey.

gzlatkov avatar gzlatkov commented on May 10, 2024

Hey @asobti,

  1. That sounds reasonable!
  2. I think we do have that information as it is extracted from the clientset which we are already have in func (c *Chaos) terminate(clientset kube.Interface) error. Will try to test that tomorrow.

from kube-monkey.

asobti avatar asobti commented on May 10, 2024

Hey @gzlatkov . Just checking in to see if you had a chance to work on this bug.

from kube-monkey.

worldtiki avatar worldtiki commented on May 10, 2024

Hi @asobti. I was looking into adding a fixed percentage mode when I came across this same issue.
I raised a pr with the my proposal for a new kill mode which includes a fix for this bug: #94

from kube-monkey.

gzlatkov avatar gzlatkov commented on May 10, 2024

@asobti Sorry, got caught up in work and was on holiday. My stuff still need the unittest adjustments, so I'm happy to go over @worldtiki's PR, which seems to be expanding on the fix with a new termination mode.

from kube-monkey.

asobti avatar asobti commented on May 10, 2024

Fixed by #94

from kube-monkey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.