Actions are a way to describe some task that needs to be performed by some component of the larger system.
Actions progress from start to finish across states.
More details about the states an action goes through are documented in the Developers Notebook.
Actions are scheduled by applying a YAML object using the
(yes, this intentionally mirrors kubernetes.io approach):
$ replictl apply -f path/to/action.yaml Object applied successfully
The YAML object depends on what kind of action you are scheduling.
Agent actions are defined in the specification and are executed on a specific agents.
The YAML object for agent actions has the following specification:
apiVersion: replicante.io/v0 kind: AgentAction metadata: # Can override the namespace with --namespace=test-namespace namespace: default # Can override the cluster with --cluster=test-cluster cluster: target-cluster-id # Can override the namespace with --node=test-node node: target-node-id spec: # Trigger a debug action that executes two dummy steps and then successfully completes. action: agent.replicante.io/debug.progress # Pass additional arguments as structured data. args: options: 'available options change based on the action' format: 'any structured YAML object is fine'
Actions are granted approval by default when they are applied.
To require explicit approval before an action is scheduled onto the target
node you can set the
approval metadata attribute to
Requiring approval for an action means that an action can be created without executing it and someone else can approve it after review. The action executed on approval is exactly the one applied with no change allowed.
metadata: # Require explicit approval before the action is scheduled. approval: required