Skip to content

Architecture

Faber (faberops.dev/v1beta1, maintained by FaberOps) is an autonomous reliability, security, and operations operator across Kubernetes, infrastructure (Terraform and OpenTofu), and application code (BYO container validators across Java, C/C++, Rust, Go, Python, Node, and .NET). The controller runs as a single statically compiled Go binary (CGO_ENABLED=0, ~64Mi memory request), paired with the optional standalone Proba web console (ghcr.io/faberops/proba).

  1. Split Control and Execution Planes: The operator pod (faber-controller) owns secrets, cluster watches, LLM calls, hard diff gates, evidence verdict verification, persistence, and forge PR writes. Untrusted shell commands and validation run inside ephemeral kubernetes-sigs/agent-sandbox pods with zero secrets and zero network egress. For universal cluster compatibility, the Helm chart leaves sandbox.runtimeClassName empty by default and recommends gvisor for production kernel hardening.
  2. Engine vs Operator Domain Split: The reusable ReAct agent runtime lives under internal/engine/ and is exposed publicly via pkg/engine/ alongside the stdlib-only pkg/trigger/ CloudEvents SDK. Boundary tests (internal/engine/boundary_test.go, pkg/engine/boundary_test.go, and pkg/trigger/boundary_test.go) verify that the engine never imports internal/operator, api/v1beta1, internal/ui, or internal/store, and TestApacheSDKLicenseBoundary plus TestTriggerStdlibOnlyBoundary enforce Apache-2.0 isolation on the SDK subtrees.
  3. Decoupled Proba Web Console: The controller binary is completely Node-free and serves only /api/v1, SSE /api/v1/events, synchronous /v1/invoke/{automation}, MCP (/mcp), webhook and CloudEvents receivers (/webhooks/*, optionally split onto --webhook-bind-address), /openapi.json, and Prometheus /metrics. The standalone Proba web console (ui/ -> ghcr.io/faberops/proba) runs unprivileged nginx with zero cluster secrets and proxies /api/v1 to the controller with X-Faber-Origin: ui.
flowchart LR
Triggers["Triggers: Alertmanager, Grafana, PagerDuty, Cilium Hubble/Tetragon, K8s Watches, Logs, Metrics, Cron, CloudEvents"] --> PreCheck["$0 Pre-Checks + Ownership Resolver"]
PreCheck -->|"Fail / Evidence"| Reconcilers
subgraph Control["Trusted Control Plane (faber-controller)"]
Reconcilers["CR Reconcilers (7 v1beta1 CRDs: Connector, Repository, Playbook, Automation, AutomationRun, TrustPolicy, TargetCluster)"]
Engine["Agent Engine + Batch Compaction + Starlark Code Mode"]
Gates["Single Trust Formula + Verdict Digest Gate + Server-Side dryRun=All"]
Verify["PostMergeVerifier + Operational Memory (FTS5 / tsvector)"]
Store["Persistence (SQLite WAL or PostgreSQL HA + LISTEN/NOTIFY)"]
API["REST/SSE API + /v1/invoke + /mcp + /metrics + Audit JSONL"]
Reconcilers --> Engine
Engine --> Gates
Gates --> Verify
Reconcilers --> Store
API --> Store
end
subgraph ProbaPod["Standalone Proba Console (zero secrets)"]
Proba["Unprivileged nginx (uid 101) + Static React UI"]
end
subgraph Sandbox["Untrusted Execution Plane (agent-sandbox, gVisor recommended)"]
SB["Ephemeral SandboxClaim (zero secrets, egress: [], base/security/iac/byo validator)"]
end
Proba -->|"X-Faber-Origin: ui -> /api/v1"| API
Engine -->|"sandboxd HTTP :8080 + gRPC :9090"| SB
Gates -->|"Slack interactive quorum / Proba / CLI"| Approvers["HITL Approvers"]
Gates -->|"PR, Issue, Webhook, or opt-in K8sAction"| Forge["GitHub / GitLab / Forgejo / Gitea / Cluster"]

Faber consolidates all domain state into 7 orthogonal namespaced CRDs (categories=faber, see ADR 0001 and the generated CRD API Reference):

  • Connector (fconn): Single typed external endpoint inventory (llm, prometheus, loki, victorialogs, alertmanager, grafana, pagerduty, hubble, tetragon, slack, matrix, webhook, mcp) with url, secretRef, capabilities, and optional default: true per type. kubectl get fconn lists every outbound integration in the namespace.
  • Repository (frepo): GitOps, IaC (Terraform/OpenTofu), Helm, or application repository with forge auth, zero-egress validator (base, security, iac, or BYO container image), guardrails, ownership overrides, and .faber/rules.md learning.
  • Playbook (fpb): Versioned content and machine-enforced safety contract (triggers, $0 preChecks, prompt, strict outputSchema, typed actions[] with ceiling, blastRadius, and rollback, requires, and fixturesDigest).
  • Automation (fauto): Team-owned binding linking a Playbook (or OCI catalog ref) to Repository and TargetCluster targets, requested trust level, and earned trust status (status.trust[]).
  • AutomationRun (frun): Execution record holding status.trustDecision, cryptographic status.evidence (verdict digest, sandbox claim, egress hosts, validator exit code, dry-run status), and post-merge status.verification. Outputs over 64 KiB compact off etcd into the backing store.
  • TrustPolicy (ftp): Security-owned governance object defining ceilings per action class, protected workloads, change freezes, budgets, approver quorums, and promotion or demotion thresholds. When omitted, the built-in default ceiling is HITL.
  • TargetCluster (ftc): Remote Kubernetes cluster target (apiServer or kubeconfigSecretRef) for multi-cluster read-only inspection.

Deterministic Ownership, Evidence Verdict Gate, and Post-Merge Verification

Section titled “Deterministic Ownership, Evidence Verdict Gate, and Post-Merge Verification”
  • $0 Ownership Resolver: internal/operator/ownership deterministically maps Kubernetes workloads to their backing Repository, manifest or source path, and commit SHA before sandbox creation or LLM investigation begins, restoring resolved repoName across HITL resumes.
  • Evidence Verdict Digest Gate: Every run computes a SHA-256 verdictDigest in AutomationRun.status.evidence binding inputs, model, sandbox claim, egress hosts, validator exit code, dry-run status, and diff stats. ValidateEvidenceForMutation fails closed and refuses any write action lacking a valid verdict digest.
  • Post-Merge Verification (PostMergeVerifier): A leader-elected controller loop monitors merged PRs and cluster mutations over the configured verification window, writes status.verification, updates Automation.status.trust[], promotes eligibility strictly on verified outcomes, and triggers auto-demotion on post-check failure or PR revert.
  • Tier 0 (Read-Only Investigation and Triage): Runs the bounded ReAct loop with deterministic batch compaction (preserving the static system and tool prefix for prompt caching), 429/5xx model fallback, strict JSON Schema validation with single-turn repair, read-only Kubernetes scopes (unconditionally refusing Secret access), Cilium Hubble/Tetragon eBPF Connectors, and allowlisted HTTP MCP tools. No sandbox pod is created.
  • Tier 1 (Zero-Egress Code Edit and Validation): Downloads a repository archive, creates an ephemeral SandboxClaim (faber-validator, faber-validator-security, faber-validator-iac, or a BYO application container image), runs offline validation inside /workspace, extracts the diff operator-side against the clean baseline, seals status.evidence.verdictDigest, tears down the sandbox, runs hard operator-side diff gates and optional second-model verification, and then pauses for HITL quorum approval (via Slack interactive webhooks, Proba, or faberctl) or opens a PR/MR.
  • Operational Memory: Optional zero-extra-pod full-text memory backed by SQLite FTS5 or PostgreSQL tsvector with Gold/Silver/Bronze quarantine and pre-persistence PII/secret redaction, strictly isolated from trust promotion. See Operational Memory.
  • Watched Namespaces (--watch-namespace): Restricts caches, watches, webhooks, /v1/invoke, /mcp, and HTTP API list/detail/mutation endpoints to configured namespaces (controller.watchNamespaces).
  • Namespaced RBAC Mode (rbac.namespaced=true): Deploys a namespace-scoped Role and RoleBinding with zero ClusterRole resources.
  • Same-Namespace Reference Isolation: Cross-namespace repositoryRef, secretRef, and sandbox.templateRef references are denied by default (--allow-cross-namespace-refs=false), and --namespace-max-cost-usd-24h caps rolling 24-hour spend per namespace.

Public Go SDKs (pkg/engine and pkg/trigger)

Section titled “Public Go SDKs (pkg/engine and pkg/trigger)”

External Go applications can embed Faber’s bounded agent runtime and CloudEvents incident emitter directly without Kubernetes dependencies:

  • github.com/faberops/faber/pkg/engine (Apache-2.0): Exports Runner, RunRequest, RunResult, Event, EventSink, LLMClient, OpenAIClient, AnthropicClient, Governor, Tool, MCPClient, Sandbox, StrictSchema, CodeModeConfig, OCIToolkit, and HTTPFetchToolkit.
  • github.com/faberops/faber/pkg/trigger (Apache-2.0, stdlib-only): Exports Client, ClientConfig, IncidentEvent, and EmitResult for pushing signed dev.faberops.app.incident CloudEvents v1.0 payloads to Faber.

See Starlark Code Mode, Built-In Read-Only Tools, and Go SDKs for usage examples.