# The only things the capability can ever do. A person writes and approves this file # before the hire. Commands are argument lists (no shell). {service} is only ever # filled with a name from "services". actions: - id: restart-api title: Rolling restart of the api service match: ["connection pool exhausted", "OutOfMemory"] services: [api] command: [kubectl, rollout, restart, "deployment/{service}", -n, prod] reversible: true # a rolling restart can be repeated or rolled back safely auto_allowed: true # may run by itself at autonomy level 3 ... max_per_day: 2 # ... at most twice in one UTC day - id: clear-tmp title: Clear temporary files on the worker volume match: ["No space left on device"] services: [worker] command: [kubectl, exec, "deployment/{service}", -n, prod, --, find, /tmp/work, -mtime, "+1", -delete] reversible: false # deleted files do not come back: always waits for approval auto_allowed: false