probePod

pods_in_phase

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_phase
Returnboolean

Usage

JSON

{
  "name": "pods-in-phase",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosk8s.pod.probes",
    "func": "pods_in_phase",
    "arguments": {
      "label_selector": ""
    }
  }
}

YAML

name: pods-in-phase
provider:
  arguments:
    label_selector: ""
  func: pods_in_phase
  module: chaosk8s.pod.probes
  type: python
type: probe

Arguments

NameTypeDefaultRequiredTitleDescription
nsstring“default”YesNamespace
label_selectorstringnullYesLabel SelectorSelectors to target the appropriate pods
phasestring“Running”NoPod PhasePod phase 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_phase(label_selector: str,
                  phase: str = 'Running',
                  ns: str = 'default',
                  secrets: Dict[str, Dict[str, str]] = None) -> bool:
    pass