action CRD

create_custom_object

Create a namespaced custom object

Activity as code

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

Typeaction
Modulechaosk8s.crd.actions
Namecreate_custom_object
Returnmapping

Usage

JSON

{
  "name": "create-custom-object",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosk8s.crd.actions",
    "func": "create_custom_object",
    "arguments": {
      "group": "",
      "version": "",
      "plural": ""
    }
  }
}

YAML

name: create-custom-object
provider:
  arguments:
    group: ''
    plural: ''
    version: ''
  func: create_custom_object
  module: chaosk8s.crd.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
nsstring“default”YesNamespace
groupstringYesGroup
versionstringYesVersion
pluralstringYesPlural
resourcemappingnullNoResourceDefinition of the custom object, or the the resource as file below
resource_as_yaml_filestringnullNoResource as YAMLDefinition of the custom object as a YAML file, or the the resource above

Create a namespaced custom object. See also the Kubernetes documentation.

Signature

def create_custom_object(
        group: str,
        version: str,
        plural: str,
        ns: str = 'default',
        resource: Dict[str, Any] = None,
        resource_as_yaml_file: str = None,
        secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass