actionNetwork

deny_all_egress

Deny all egress from pods

Activity as code

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

Typeaction
Modulechaosk8s.networking.actions
Namedeny_all_egress
Returnnone

Usage

JSON

{
  "name": "deny-all-egress",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosk8s.networking.actions",
    "func": "deny_all_egress"
  }
}

YAML

name: deny-all-egress
provider:
  func: deny_all_egress
  module: chaosk8s.networking.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
nsstring“default”YesNamespace
label_selectorsstringnullNoLabel SelectorsPod label selectors to target with the action

Convenient helper rule to deny all egress network from all pods in a namespace, unless label_selectors, in which case, only matching pods will be impacted.

Signature

def deny_all_egress(label_selectors: Dict[str, Any] = None,
                    ns: str = 'default',
                    secrets: Dict[str, Dict[str, str]] = None):
    pass