Playbook
Playbooks are configurable automated processes that can be used to perform a variety of actions for a component or a config item. They are defined using a YAML configuration.
restart-unhealthy-database.yamlapiVersion: mission-control.flanksource.com/v1
kind: Playbook
metadata:
name: restart-unhealthy-database
spec:
description: Restart when a database becomes unhealthy
on:
component:
- event: unhealthy
filter: component.type == 'database'
labels:
industry: e-commerce
actions:
- name: 'Restart kubernetes deployment'
exec:
script: kubectl rollout restart deployment {{.component.name}}
Fig: Playbooks Page
Spec
Field | Description | Scheme | Required |
---|---|---|---|
description | A short description | string | true |
icon | Icon for the playbook | string | |
on | Specify events to automatically trigger the Playbook. . | []Trigger | |
checks | Specify selectors for checks that can be run on the Playbook. | []ResourceFilter | |
configs | Specify selectors for config items that can be run on the Playbook. | []ResourceFilter | |
components | Specify selectors for component items that can be run on the Playbook. | []ResourceFilter | |
parameters | Define a set of labeled parameters for the Playbook. | []Parameter | |
actions | Specify the set of actions to run. | []Action | true |
approval | Specify who can approve runs on this playbook. | Approval |