probePod

pods_in_conditions

Lookup a pod by `label_selector` in the namespace `ns`.

Activity as code

Below are the details and signature of the activity Python module.

Typeprobe
Modulechaosk8s.pod.probes
Namepods_in_conditions
Returnboolean

Usage

JSON

{
  "name": "pods-in-conditions",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosk8s.pod.probes",
    "func": "pods_in_conditions",
    "arguments": {
      "label_selector": "",
      "conditions": []
    }
  }
}

YAML

name: pods-in-conditions
provider:
  arguments:
    conditions: []
    label_selector: ""
  func: pods_in_conditions
  module: chaosk8s.pod.probes
  type: python
type: probe

Arguments

NameTypeDefaultRequiredTitleDescription
nsstring“default”YesNamespace
label_selectorstringnullYesLabel SelectorSelectors to target the appropriate pods
conditionslistYesPod ConditionsList of conditions as defined by Kubernetes

Raises :exc:chaoslib.exceptions.ActivityFailed if one of the given conditions type/status is not as expected

Signature

def pods_in_conditions(label_selector: str,
                       conditions: List[Dict[str, str]],
                       ns: str = 'default',
                       secrets: Dict[str, Dict[str, str]] = None) -> bool:
    pass