probeService

service_is_initialized

Check if a service is initialized

Activity as code

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

Typeaction
Modulechaosk8s.service.probes
Nameservice_is_initialized
Returnboolean

Usage

JSON

{
  "name": "service-is-initialized",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosk8s.service.probes",
    "func": "service_is_initialized"
  }
}

YAML

name: service-is-initialized
provider:
  func: service_is_initialized
  module: chaosk8s.service.probes
  type: python
type: probe

Arguments

NameTypeDefaultRequiredTitleDescription
nsstring“default”YesNamespace
namestringnullNoService NameName of a service or use the label selector below
label_selectorstringnullNoService Label SelectorLabel selector or use the service name above
raise_if_service_not_initializedboolfalseNoFail Action if Service Not InitializedShould we raise an error or return a boolean when not initialized?

Signature

def service_is_initialized(name: str = None,
                           ns: str = 'default',
                           label_selector: str = None,
                           raise_if_service_not_initialized: bool = True,
                           secrets: Dict[str, Dict[str, str]] = None) -> bool:
    pass