Skip to main content

App Configuration

The .dorgu.yaml file is Dorgu’s primary configuration file. It can be placed at two levels:
  • Workspace level — in your current working directory, applying defaults to all apps analyzed from that directory.
  • App level — inside a specific application directory, providing app-specific configuration.

Creating a Config File

# Create with interactive prompts
dorgu init

# Create a minimal config (fewer fields)
dorgu init --minimal

# Create a full config with all available fields
dorgu init --full

Workspace Configuration Reference

The workspace-level .dorgu.yaml sets organization-wide defaults. Below is the full annotated schema:
version: "1"

org:
  name: "my-company"

naming:
  pattern: "{app}"
  dns_safe: true

resources:
  defaults:
    requests:
      cpu: "100m"
      memory: "128Mi"
    limits:
      cpu: "500m"
      memory: "512Mi"
  profiles:
    api:
      requests: { cpu: "100m", memory: "256Mi" }
      limits: { cpu: "1000m", memory: "1Gi" }
    worker:
      requests: { cpu: "500m", memory: "512Mi" }
      limits: { cpu: "2000m", memory: "2Gi" }
    web:
      requests: { cpu: "50m", memory: "128Mi" }
      limits: { cpu: "500m", memory: "512Mi" }

labels:
  required:
    - "app.kubernetes.io/name"
    - "app.kubernetes.io/managed-by"
  custom: {}

annotations:
  custom:
    "prometheus.io/scrape": "true"

security:
  pod_security_context:
    run_as_non_root: true
    seccomp_profile:
      type: RuntimeDefault
  container_security_context:
    allow_privilege_escalation: false
    read_only_root_filesystem: true
    capabilities:
      drop: [ALL]

ingress:
  class: "nginx"
  domain_suffix: ".apps.local"
  tls:
    enabled: true
    cluster_issuer: "letsencrypt-prod"

argocd:
  project: "default"
  destination:
    server: "https://kubernetes.default.svc"
  sync_policy:
    automated:
      prune: true
      self_heal: true

ci:
  provider: "github-actions"
  registry: "ghcr.io/my-company"

llm:
  provider: "openai"
  model: "gpt-4"

Field Reference

org

FieldTypeDescription
namestringOrganization name used in labels and naming

naming

FieldTypeDescription
patternstringNaming pattern for generated resources. Supports {app}, {env}, and {team} placeholders.
dns_safeboolWhen true, ensures generated names conform to DNS naming rules (lowercase, no underscores)

resources

FieldTypeDescription
defaults.requests.cpustringDefault CPU request for containers
defaults.requests.memorystringDefault memory request for containers
defaults.limits.cpustringDefault CPU limit for containers
defaults.limits.memorystringDefault memory limit for containers
profilesmapNamed resource profiles (api, worker, web) with their own requests/limits
Resource profiles are selected automatically based on the detected application type, or can be specified manually in the app-level config.

labels

FieldTypeDescription
requiredlistLabels that must be present on all generated resources
custommapAdditional key-value labels applied to all resources

annotations

FieldTypeDescription
custommapKey-value annotations applied to all generated resources

security

FieldTypeDescription
pod_security_context.run_as_non_rootboolRequire containers to run as non-root
pod_security_context.seccomp_profile.typestringSeccomp profile type (e.g., RuntimeDefault)
container_security_context.allow_privilege_escalationboolWhether containers can escalate privileges
container_security_context.read_only_root_filesystemboolMount root filesystem as read-only
container_security_context.capabilities.droplistLinux capabilities to drop (e.g., [ALL])

ingress

FieldTypeDescription
classstringIngress controller class (e.g., nginx, traefik)
domain_suffixstringDomain suffix appended to app names for ingress hosts
tls.enabledboolEnable TLS on generated ingress resources
tls.cluster_issuerstringcert-manager ClusterIssuer name for TLS certificates

argocd

FieldTypeDescription
projectstringArgoCD project to assign generated Application resources to
destination.serverstringTarget Kubernetes API server URL
sync_policy.automated.pruneboolAutomatically delete resources removed from Git
sync_policy.automated.self_healboolAutomatically sync when cluster state drifts

ci

FieldTypeDescription
providerstringCI provider (e.g., github-actions, gitlab-ci)
registrystringContainer image registry URL

llm

FieldTypeDescription
providerstringLLM provider for enhanced analysis (openai, anthropic, gemini, ollama)
modelstringSpecific model to use (e.g., gpt-4, claude-3-sonnet-20240229)

App-Level Configuration

When .dorgu.yaml is placed inside an application directory, it can include an additional app section with application-specific metadata and overrides:
version: "1"
app:
  name: "order-service"
  description: "Order processing API"
  team: "commerce-backend"
  owner: "orders@company.com"
  repository: "https://github.com/company/order-service"
  type: "api"      # api, web, worker, cron, daemon
  instructions: |
    High-traffic service; requires MySQL and Redis.
environment: "production"
resources:
  requests: { cpu: "500m", memory: "1Gi" }
  limits: { cpu: "2000m", memory: "2Gi" }
scaling:
  min_replicas: 5
  max_replicas: 50
  target_cpu: 65
health:
  liveness: { path: "/health", port: 8080 }
  readiness: { path: "/ready", port: 8080 }
dependencies:
  - name: mysql
    type: database
    required: true
  - name: redis
    type: cache
    required: true

app

FieldTypeDescription
namestringApplication name
descriptionstringHuman-readable description
teamstringOwning team (used in {team} naming placeholder)
ownerstringContact email for the application owner
repositorystringSource code repository URL
typestringApplication type: api, web, worker, cron, or daemon
instructionsstringFree-form instructions for the LLM analyzer

environment

FieldTypeDescription
environmentstringTarget environment (e.g., production, staging, development)

scaling

FieldTypeDescription
min_replicasintMinimum replica count for HPA
max_replicasintMaximum replica count for HPA
target_cpuintTarget CPU utilization percentage for autoscaling

health

FieldTypeDescription
liveness.pathstringHTTP path for liveness probe
liveness.portintPort for liveness probe
readiness.pathstringHTTP path for readiness probe
readiness.portintPort for readiness probe

dependencies

FieldTypeDescription
namestringDependency name (e.g., mysql, redis)
typestringDependency type (database, cache, queue, service)
requiredboolWhether the dependency is required for the app to function
App-level values override workspace-level values for the same keys. For example, resources set in an app config take precedence over workspace-level resources.defaults.