probePod

pods_not_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_not_in_phase
Returnboolean

Usage

JSON

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

YAML

name: pods-not-in-phase
provider:
  arguments:
    label_selector: ""
  func: pods_not_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 when the pod is in the given phase and should not have.

Signature

def pods_not_in_phase(label_selector: str,
                      phase: str = 'Running',
                      ns: str = 'default',
                      secrets: Dict[str, Dict[str, str]] = None) -> bool:
    pass