actionNode

create_node

Create one new node in the cluster

Activity as code

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

Typeaction
Modulechaosk8s.node.actions
Namecreate_node
Returnkubernetes.client.models.v1_node.V1Node

Usage

JSON

{
  "name": "create-node",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosk8s.node.actions",
    "func": "create_node"
  }
}

YAML

name: create-node
provider:
  func: create_node
  module: chaosk8s.node.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
metamappingnullNoMetadataThe metadata payload for the new node
specmappingnullNoSpecificationThe specification payload for the new node

Due to the way things work on certain cloud providers, you won’t be able to use this meaningfully on them. For instance on GCE, this will likely fail.

See also https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#idempotency

Signature

def create_node(
    meta: Dict[str, Any] = None,
    spec: Dict[str, Any] = None,
    secrets: Dict[str, Dict[str, str]] = None
) -> kubernetes.client.models.v1_node.V1Node:
    pass