Playbooks
Playbooks are configurable automated processes that can be used to perform a variety of actions for a resource like config item, component, & check. They can also operate independently of any specific resource, providing versatility in handling different tasks and processes within a system or environment
Triggers
Context
#...
kind: Playbook
spec:
  # components: ...
  # checks: ...
  configs:
    - types:
        - Kubernetes::Deployment
Self-Service
Parameters
Playbooks have 2 types of parameters:
A playbook can be restricted to specific configs, components or health checks using resource selectors. For example Restarting a Kubernetes Deployment is only applicable to config items of type: Kubernetes::Deployment
#...
kind: Playbook
spec:
  configs:
    - types:
        - Kubernetes::Deployment
   #....
Before running a playbook, users can provide input using parameters
#...
kind: Playbook
spec:
  # user input
  parameters:
    - name: replicas
  # ...
Events
Webhooks
Actions
Playbooks execute a sequence of actions (steps), these actions can update git repositories, invoke pipelines or run command line tools like kubectl and aws.
Templating
The actions values can be templated using Go Templates
#...
kind: Playbook
spec:
  configs:
    - types:
        - Kubernetes::Deployment
  actions:
    - name: 'Restart kubernetes deployment'
      exec:
        script: kubectl rollout restart deployment {{.config.name}} -n {{.config.tags.namespace}}
The parameters to the playbooks are available in the Context

Runners
Approvals
Authorization safeguards can be applied to playbook runs, ensuring their execution is limited to specific individuals or teams who grant approval.
#...
kind: Playbook
spec:
  #...
  approval:
    type: any
    approvers:
      people:
        - admin@local
      teams:
        - DevOps
| Field | Description | Scheme | Required | 
|---|---|---|---|
type | How many approvals required. Defaults to all | any or all | false | 
approvers.[]people | Login or id of a person | People | false | 
approvers.[]teams | Name or id of a team | Team | false |