actionCRD

create_cluster_custom_object

Create a cluster wide custom object

Activity as code

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

Typeaction
Modulechaosk8s.crd.actions
Namecreate_cluster_custom_object
Returnmapping

Usage

JSON

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

YAML

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

Arguments

NameTypeDefaultRequiredTitleDescription
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 cluster wide custom object. See also the Kubernetes documentation.

Signature

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