Giter Site home page Giter Site logo

Comments (1)

ksatchit avatar ksatchit commented on June 10, 2024

As of today the target identification is done in two ways:

  • (a) At a workload level (deploy/sts/ds/dc/argo rollouts) where the first level filter is done using a single app label & and a further subsequent filter by annotation in case where there are multiple workloads w/ the same label. It is possible for you to annotate more than one workload too if you would like random selection of pods from amongst a workload set.
    All this, only if the spec.annotationCheck is set to true in the chaosengine. The operator in this case passes the targeted workload name/kind details along with label/annotations to the respective experiment pod for actual chaos injection purposes.

  • (b) At a pod level, where the target pods (workloads are out of the picture) are identified purely via label(s) provided in the .spec.appinfo.applabel. You can get a bit inventive here with the way labels are assigned. For example, something like: component in (litmusportal-frontend,litmusportal-server) where the key is common OR via key=value as a comma separated list.

In (b), the operator simply passes the string input in this field to the experiment pod - so it becomes similar to a kube-api/kubectl call with multiple labels in the --selector/-l flag. In (a) the filter logic extracts key/value via some parsing logic that doesn't recognize these multi-label patterns. The improvement needs to be made accordingly.

In both cases, there are additional ENV variable that the experiment takes which influence the eventual list of affected pods as well as the manner in which chaos is applied on them. They are:

  • (i) PODS_AFFECTED_PERC: which controls the percentage of pods subjected to chaos from the filtered list. When targeting a single workload, it effectively becomes the no of app replicas affected. In cases where the filtered pod list is coming from diff workloads, there is a bit if randomness introduced.

  • (ii) SEQUENCE: which controls if eventually selected pods are subject to chaos at once in parallel OR in a serial manner.
    Both (i) & (ii) are available in the native/off-the-shelf litmus experiments & may/may-not be present in your downstream experiments depending upon implementation.

from chaos-operator.

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.