Skip to main content
Dorgu extends Kubernetes with two Custom Resource Definitions (CRDs) that capture application identity and cluster context. These CRDs are the central data model that connects the CLI, Operator, and integrations.

CRD Overview

The primary CRD is ApplicationPersona, which describes a single application’s desired operational profile and the Operator’s observed state. The secondary CRD is ClusterPersona, which captures cluster-level context.

Ownership Model

The spec and status of an ApplicationPersona are owned by different actors. This separation is fundamental to Dorgu’s design.
ActorWritesMechanism
CLI / GitOpsspecdorgu persona apply or ArgoCD sync
OperatorstatusStatus subresource updates during reconciliation
The CLI and GitOps tools define the desired state in the spec. The Operator observes the cluster and writes its findings to the status. The Operator never modifies the spec.

API Group and Scope

Both CRDs belong to the dorgu.io/v1 API group.
ResourceScope
ApplicationPersonaNamespaced
ClusterPersonaCluster
ApplicationPersonas live in the same namespace as the workloads they describe. ClusterPersona is cluster-scoped since it represents the entire cluster.

ApplicationPersona Spec Fields

The spec defines the desired operational profile for an application.
FieldTypeRequiredDescription
namestringYesApplication name (matches app.kubernetes.io/name label)
typeenumYesapi, web, worker, cron, daemon
tierenumNocritical, standard, best-effort
technicalobjectNoLanguage, framework, and description
resourcesobjectNoCPU/memory requests and limits
scalingobjectNominReplicas, maxReplicas, targetCPU, behavior
healthobjectNolivenessPath, readinessPath, port
dependenciesarrayNoEach entry: name, type, required, healthCheck
networkingobjectNoPorts and ingress configuration
ownershipobjectNoteam, owner, repository, oncall
policiesobjectNoSecurity context, deployment strategy, maintenance windows

ApplicationPersona Status Fields

The status is populated entirely by the Operator and reflects the observed state of the application.
FieldTypeDescription
phaseenumPending, Active, Degraded, Failed
validation.passedboolWhether the latest validation passed
validation.issues[]arrayEach entry: severity, field, message, suggestion
health.statusenumHealthy, Degraded, Unhealthy, Unknown
learned.resourceBaselineobjectavgCPU, avgMemory, peakCPU, peakMemory
argoCD.syncStatusenumSynced, OutOfSync, Unknown
argoCD.healthStatusenumHealthy, Degraded, Progressing, Missing, Unknown
recommendations[]arrayImprovement suggestions generated by the Operator

Full ApplicationPersona Example

A complete ApplicationPersona for a critical API service:
apiVersion: dorgu.io/v1
kind: ApplicationPersona
metadata:
  name: order-service
  namespace: commerce
spec:
  name: order-service
  version: "1.0"
  type: api
  tier: critical
  technical:
    language: go
    framework: gin
    description: Order processing and management service
  resources:
    requests:
      cpu: 100m
      memory: 128Mi
    limits:
      cpu: 500m
      memory: 512Mi
  scaling:
    minReplicas: 2
    maxReplicas: 10
    targetCPU: 70
    behavior: balanced
  health:
    livenessPath: /health
    readinessPath: /ready
    port: 8080
    startupGracePeriod: 30s
  dependencies:
    - name: postgres
      type: database
      required: true
    - name: redis
      type: cache
      required: false
  networking:
    ports:
      - port: 8080
        protocol: TCP
        purpose: HTTP API
      - port: 9090
        protocol: TCP
        purpose: Metrics
    ingress:
      enabled: true
      host: orders.example.com
      paths: ["/api/v1/orders"]
      tlsEnabled: true
  ownership:
    team: commerce-platform
    owner: jane.doe@example.com
    repository: https://github.com/example/order-service
  policies:
    security:
      runAsNonRoot: true
      readOnlyRootFilesystem: true
      allowPrivilegeEscalation: false
    deployment:
      strategy: RollingUpdate
      maxSurge: "25%"
      maxUnavailable: "0"

ClusterPersona

ClusterPersona is a cluster-scoped resource that captures the overall cluster context. The Operator’s ClusterPersona controller automatically discovers and populates its status.

ClusterPersona Spec Fields

FieldTypeRequiredDescription
namestringYesHuman-readable cluster name
descriptionstringNoCluster purpose or notes
environmentenumNodevelopment, staging, production
policiesobjectNoCluster-wide policy defaults
conventionsobjectNoNaming and labeling conventions
defaultsobjectNoDefault values for ApplicationPersona fields
resourceQuotasobjectNoCluster-level resource budget

ClusterPersona Status Fields

FieldTypeDescription
phaseenumDiscovering, Ready, Degraded
nodes[]arrayNode names, roles, capacity, and conditions
resourceSummaryobjectTotal and allocatable CPU/memory across all nodes
addons[]arrayDetected add-ons (ArgoCD, Prometheus, Grafana, etc.)
kubernetesVersionstringCluster Kubernetes version
platformstringDetected platform (EKS, GKE, AKS, Kind, etc.)
applicationCountintTotal number of managed ApplicationPersonas
The ClusterPersona controller reconciles every 5 minutes, scanning nodes, namespaces, and well-known add-on namespaces to keep the status current.