probe Pod

count_min_pods

Ensure there is a minimal required number of pods in a giving phase

Run it now
View details
Typeprobe
Modulechaosk8s.pod.probes
Namecount_min_pods
Returnboolean

Usage

JSON

{
  "name": "count-min-pods",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosk8s.pod.probes",
    "func": "count_min_pods",
    "arguments": {
      "label_selector": ""
    }
  }
}

YAML

name: count-min-pods
provider:
  arguments:
    label_selector: ''
  func: count_min_pods
  module: chaosk8s.pod.probes
  type: python
type: probe

Arguments

NameTypeDefaultRequiredTitleDescription
nsstringdefaultYesNamespace
label_selectorstringnullYesLabel SelectorSelectors to target the appropriate pods
phasestringRunningNoPod PhasePod phase as defined by Kubernetes. If not provided, count all pods no matter their phase
min_countinteger1NoMinimum CountThe minimal expected count of pods in the phase

Signature

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