Skip to main content
PUT
/
runbooks
/
{name}
Update Runbook
curl --request PUT \
  --url http://{host}:{port}/{basePath}/runbooks/{name} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "<string>",
  "severity": [
    "<string>"
  ],
  "automated": true,
  "approvalRequired": true,
  "rollbackOnFailure": true,
  "steps": [
    {
      "name": "<string>",
      "description": "<string>",
      "command": "<string>",
      "timeout": "60s",
      "continueOnFailure": false
    }
  ],
  "matchConditions": {
    "resourceTypes": [
      "<string>"
    ],
    "descriptionPatterns": [
      "<string>"
    ],
    "namespaces": [
      "<string>"
    ]
  }
}
'
{
  "apiVersion": "v1",
  "kind": "Runbook",
  "metadata": {
    "name": "runbook-oomkill-standard",
    "updatedAt": "2026-03-19T16:30:00Z",
    "updatedBy": "admin@empresa.com",
    "version": "1.4.0"
  },
  "spec": {
    "category": "oomkill",
    "description": "Remediacao padrao para eventos OOMKill — ajusta memory limits com analise de historico",
    "severity": ["high", "critical"],
    "automated": true,
    "approvalRequired": true,
    "rollbackOnFailure": true,
    "steps": [
      {
        "name": "diagnose-memory-usage",
        "description": "Coletar metricas de uso de memoria do container",
        "action": "kubectl",
        "command": "top pod $POD --containers",
        "timeout": "30s"
      },
      {
        "name": "analyze-memory-history",
        "description": "Analisar historico de consumo de memoria via Prometheus",
        "action": "ai-analyze",
        "timeout": "60s"
      },
      {
        "name": "patch-resource-limits",
        "description": "Atualizar memory limit do Deployment",
        "action": "kubectl",
        "command": "patch deployment $DEPLOYMENT -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"$CONTAINER\",\"resources\":{\"limits\":{\"memory\":\"$NEW_LIMIT\"}}}]}}}}'",
        "timeout": "120s"
      },
      {
        "name": "verify-stability",
        "description": "Verificar estabilidade do pod apos patch",
        "action": "wait",
        "timeout": "180s"
      }
    ]
  }
}
name
string
required
Unique runbook name (e.g., runbook-oomkill-standard)
description
string
New runbook description
severity
string[]
Updated list of target severities
automated
boolean
Whether the runbook can be executed automatically
approvalRequired
boolean
Whether approval is required before execution
rollbackOnFailure
boolean
Whether to perform automatic rollback on failure
steps
object[]
Updated list of runbook steps
matchConditions
object
Updated conditions for automatic matching
{
  "apiVersion": "v1",
  "kind": "Runbook",
  "metadata": {
    "name": "runbook-oomkill-standard",
    "updatedAt": "2026-03-19T16:30:00Z",
    "updatedBy": "admin@empresa.com",
    "version": "1.4.0"
  },
  "spec": {
    "category": "oomkill",
    "description": "Remediacao padrao para eventos OOMKill — ajusta memory limits com analise de historico",
    "severity": ["high", "critical"],
    "automated": true,
    "approvalRequired": true,
    "rollbackOnFailure": true,
    "steps": [
      {
        "name": "diagnose-memory-usage",
        "description": "Coletar metricas de uso de memoria do container",
        "action": "kubectl",
        "command": "top pod $POD --containers",
        "timeout": "30s"
      },
      {
        "name": "analyze-memory-history",
        "description": "Analisar historico de consumo de memoria via Prometheus",
        "action": "ai-analyze",
        "timeout": "60s"
      },
      {
        "name": "patch-resource-limits",
        "description": "Atualizar memory limit do Deployment",
        "action": "kubectl",
        "command": "patch deployment $DEPLOYMENT -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"$CONTAINER\",\"resources\":{\"limits\":{\"memory\":\"$NEW_LIMIT\"}}}]}}}}'",
        "timeout": "120s"
      },
      {
        "name": "verify-stability",
        "description": "Verificar estabilidade do pod apos patch",
        "action": "wait",
        "timeout": "180s"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer token issued by the operator. Format: Authorization: Bearer <token>.

Path Parameters

name
string
required

Unique runbook name.

Example:

"runbook-oomkill-standard"

Body

application/json
description
string
severity
string[]
automated
boolean
approvalRequired
boolean
rollbackOnFailure
boolean
steps
object[]
matchConditions
object

Response

Runbook updated

apiVersion
string
Example:

"v1"

kind
string
Example:

"Runbook"

metadata
object
spec
object