Skip to main content

Overview

The dorgu persona command group manages ApplicationPersona custom resources. An ApplicationPersona is a Kubernetes CRD that captures the operational identity of your application — its resource requirements, scaling behavior, health characteristics, and deployment preferences — as a declarative, version-controlled resource. There are two ways in, depending on where the app is. For a greenfield app the workflow is: generate a persona YAML from your application source, apply it to the cluster, and check status to verify the operator has reconciled it. For a cluster that already has apps, import does it in one step from what is already running.

persona import

Requires CLI v0.9.0 or newer.

Synopsis

Read the live Deployments in a namespace and synthesize an ApplicationPersona for each from what is already in the spec: resources, probes, replicas, ports, image, and ownership labels. This is the onboarding path for a cluster that already has apps. Unlike persona generate, it needs no local source, no Dockerfile, and no relabelling of your workloads. Dorgu only watches workloads that have a persona, so until one exists a broken app raises no incident and gets no proposed fix. It prints the YAML by default so you can read it before anything reaches the cluster. --apply creates the personas; -o writes them to a file.

Flags

Exactly one of --all or --name is required, and they are mutually exclusive. --apply and --dry-run are mutually exclusive.

Examples

> personas.yaml is safe. Only the rendered YAML goes to stdout; every diagnostic, warning, and summary line goes to stderr. Redirecting stdout gives you a clean multi-document manifest you can commit to Git, and you still see the warnings on your terminal.

What gets inferred, and why it matters

Import reads the Deployment and invents as little as possible. Anything it does invent, it says out loud on stderr.
The warning to read is the one about resource limits. The remediation proposer skips any persona with no resources.limits, because without a current value it has nothing to compute a bounded change from. A persona that cannot heal is worse than no persona, so where a container declares no limits, import derives them:
  • Limits are derived from the container’s requests at 2x where requests exist.
  • Where there is neither a request nor a limit, Dorgu’s own defaults are used (500m CPU, 512Mi memory).
Either way you get a line naming the container and the number:
Remediation resizes from the persona, not from the workload, so review these before you rely on them.
Other things import reports rather than guesses at silently:

How the persona is named

metadata.name is the Deployment’s name. spec.name is chosen so the operator’s discovery chain resolves it back to that same Deployment and no other: candidates are tried in chain order (app.kubernetes.io/name label, app label, then the Deployment name) and each is kept only if it resolves uniquely across the whole namespace. Where no candidate works, because another Deployment carries a label that outranks this one’s name match, the CLI says so rather than pointing Dorgu at the wrong workload:

After importing

Phase Active means the operator resolved the persona to its Deployment. Phase Pending means it did not: check the Ready condition for NoDeployment or AmbiguousDeployment and see troubleshooting. The full walkthrough, from install through breaking an imported app and healing it, is the brownfield quickstart.

persona generate

Synopsis

Analyze an application directory and produce an ApplicationPersona YAML manifest. The path should point to a directory containing a Dockerfile or docker-compose.yml. Defaults to . if omitted.

Flags

Examples

persona apply

Synopsis

Analyze an application and apply the resulting ApplicationPersona directly to the cluster. This combines the generate and kubectl apply steps into a single command. The path defaults to . if omitted.

Flags

Examples

persona list

Synopsis

List the ApplicationPersona resources on the cluster with their phase, health, and age. Defaults to every namespace.

Flags

Example output

Examples

With no personas, the command says so and points at dorgu persona generate. Use dorgu persona import instead when the apps are already running. If the CRD is missing entirely, it reports that the operator is not installed rather than reporting an empty list.

persona status

Synopsis

Check the reconciliation status of an ApplicationPersona by name. Requires exactly one argument: the persona name.

Flags

Examples

Status fields

The persona status command reports the following fields from the ApplicationPersona resource:
Requires the Dorgu Operator installed on the cluster with the ApplicationPersona CRD registered. See the Operator installation guide for setup instructions.