Skip to content

Schemas

A schema describes platform defaults and system-managed fields. When a value in your input matches a default, it gets stripped.

Bundled schemas

25 schemas ship with decoct, covering 1,494 platform defaults. Reference by short name:

CategorySchemas
Container & Orchestrationdocker-compose (35), kubernetes (50)
Configuration Managementansible-playbook (132), cloud-init (55), sshd-config (35)
Infrastructure as Codeterraform-state, aws-cloudformation (56), azure-arm (65), gcp-resources (42)
CI/CDgithub-actions (8), gitlab-ci (25), argocd (14)
Databasespostgresql (169), mariadb-mysql (76), mongodb (15), redis (61), kafka (63)
Observabilityprometheus (62), grafana (162), opentelemetry-collector (19), fluent-bit (75)
Networkingtraefik (57)
Identitykeycloak (78), entra-id (44), intune (96)
Terminal window
decoct compress config.yaml --schema docker-compose
decoct compress deployment.yaml --schema kubernetes
decoct compress playbook.yaml --schema ansible-playbook
decoct compress cloud-init.yaml --schema cloud-init
decoct compress terraform.tfstate --schema terraform-state

Eight platforms support auto-detection when no --schema or --profile is given: Docker Compose, Kubernetes, Ansible, cloud-init, Terraform state, GitHub Actions, Traefik, and Prometheus.

See Bundled Schemas Reference for full details on each schema.

Custom schemas

platform: my-platform
source: vendor documentation v2.1
confidence: authoritative
defaults:
services.*.restart: "no"
services.*.network_mode: bridge
services.*.privileged: false
drop_patterns:
- "**.uuid"
- "**.managedFields"
system_managed:
- "**.creationTimestamp"
- "**.resourceVersion"

Fields

FieldRequiredDescription
platformYesPlatform name (e.g. docker-compose, kubernetes).
sourceYesWhere the defaults come from (spec name and version).
confidenceYesOne of authoritative, high, medium, low.
defaultsNoMap of path patterns to their default values.
drop_patternsNoList of path patterns to always drop.
system_managedNoList of path patterns for system-generated fields.

Confidence levels

LevelMeaningWith skip_low_confidence
authoritativeFrom official specificationAlways stripped
highVerified against vendor docsAlways stripped
mediumDerived from examplesSkipped
lowInferred or uncertainSkipped

Use skip_low_confidence: true in a profile’s strip-defaults pass config to only strip defaults from authoritative and high confidence schemas.

LLM-assisted schema generation

Instead of writing schemas manually, derive them from examples or documentation:

Terminal window
decoct schema learn -e prod-config.yaml -p my-platform -o schema.yaml
decoct schema learn -d vendor-docs.md -p my-platform -o schema.yaml

Requires pip install decoct[llm]. See Schema Authoring for full details.