Skip to main content

Overview

The dorgu remediation command group is how you work with RemediationAction resources — the fixes the Dorgu Operator proposes after it detects and diagnoses an incident. You list them, read the proposed plan as a diff, then approve or reject. Approving does two things: it records your decision on the RemediationAction, and it heals the running workload. The operator patches the ApplicationPersona (desired state); the CLI patches the Deployment with your credentials. See Self-healing for the full loop.
All subcommands shell out to kubectl, so kubectl must be on your PATH and your current context must point at the target cluster. The alias dorgu rem works everywhere dorgu remediation does.

Lifecycle

Completed only arrives after the verification window — 10 minutes by default (spec.rollback.healthCheckAfter). Your pod recovers within seconds of approve, but the remediation sits in Applying and then Verifying for the rest of that window. This is not stuck. It is the operator waiting long enough to be able to tell a real fix from a temporary one, so it can auto-roll-back if the health regresses.

remediation list

Synopsis

Lists RemediationAction resources. By default it shows only active ones — Pending, Approved, Applying, Verifying, and Failed. Use --all to include Completed, RolledBack, Rejected, and Expired.

Flags

Example output

Output columns

There is no severity here. RemediationAction carries no severity field, so this command cannot filter or sort by it — the blank SEVERITY column and the --severity flag that matched nothing were both removed. Filter by --phase, and read severity from the linked incident with dorgu incidents describe, where --severity does work.

Examples


remediation diff

Synopsis

Shows the full proposal: the target, the confidence, the AI’s plan summary, and every step in execution order with its own YAML diff. This is the review surface — read this before you approve anything.

Flags

Example output

Each step line reads [order] type (risk; mode): description, with the AI’s rationale indented underneath and a unified diff of prePatchState → patch where the step carries one.
Only persona-update steps can ever be auto. The Kubernetes API server enforces this with a CEL validation rule on the CRD, so no plan — AI-written or otherwise — can mark a workload change as auto-executable.
Older RemediationAction objects that carry a single spec.action instead of an ordered plan render a single Proposed change: diff rather than a Plan (n steps): block.

remediation approve

Synopsis

Approves a Pending remediation and, by default, heals the workload.

What approval actually does

1

The CLI records your decision

It patches the RemediationAction status subresource to phase: Approved, with approvedBy: cli-user and the current timestamp.
2

The operator patches the ApplicationPersona

Seeing Approved, the operator applies the JSON merge patch to the persona’s spec — the app’s desired-state record — then moves the action to Applying. It never touches your Deployment.
3

The CLI heals the workload

The CLI translates the approved resource change into an equivalent strategic-merge patch on the matching Deployment and applies it with your credentials, so the pod actually restarts with the new limits. Use --no-heal to skip this.
Advisory steps (restart, scale, config-change, manual, and any persona-update that is not a resource change) are printed as numbered manual instructions. They are never executed.

Flags

--heal and --no-heal are mutually exclusive.
--next takes the oldest pending remediation, so the longest-waiting incident goes first; ties break on namespace and name, making the pick reproducible. It previously ranked by severity, which RemediationAction does not carry — every candidate tied, so the winner was effectively arbitrary.

Examples

Only Pending remediations can be approved. Anything else exits with an error naming the current phase.

remediation reject

Synopsis

Moves a remediation to Rejected. Works from Pending or Approved — any other phase is refused.

Flags

Rejecting is also a safety gate: dorgu remediation heal refuses to run against a rejected remediation.

remediation heal

Synopsis

Applies an approved remediation’s resource change to the workload on its own. approve runs this for you unless you passed --no-heal, so reach for heal when you deferred the apply, or when a previous heal failed and you want to retry it.

Flags

How the workload is found

1

Namespace

The persona’s namespace (spec.personaRef.namespace), falling back to the remediation’s own namespace. Never anywhere else.
2

Deployment

Deployments labelled app.kubernetes.io/name=<persona.spec.name>, falling back to app=<persona.spec.name>. Zero or more than one match is an error that asks for --workload.
3

Container

The only container if there is one, otherwise the container whose name matches the app. Anything else asks for --container.
4

Patch

A strategic-merge patch that sets exactly the resources.limits and resources.requests fields the remediation changed (cpu and memory only) — nothing broader than the proposal.

Safety gates

heal only auto-applies resource limits and requests (cpu, memory) — the OOM and saturation path. A remediation with no resource change reports that there is nothing to heal automatically and prints its advisory steps instead.

Next steps

Self-healing

How detection, diagnosis, planning, and verification fit together

AI setup

Turn on the AI planner with your own Anthropic key

dorgu incidents

Inspect the IncidentMemory a remediation was proposed for

CRD reference

Full RemediationAction schema, including steps[] and rollback