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).
Core Design Principles
Section titled “Core Design Principles”- 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 ephemeralkubernetes-sigs/agent-sandboxpods with zero secrets and zero network egress. For universal cluster compatibility, the Helm chart leavessandbox.runtimeClassNameempty by default and recommendsgvisorfor production kernel hardening. - Engine vs Operator Domain Split: The reusable ReAct agent runtime lives under
internal/engine/and is exposed publicly viapkg/engine/alongside the stdlib-onlypkg/trigger/CloudEvents SDK. Boundary tests (internal/engine/boundary_test.go,pkg/engine/boundary_test.go, andpkg/trigger/boundary_test.go) verify that the engine never importsinternal/operator,api/v1beta1,internal/ui, orinternal/store, andTestApacheSDKLicenseBoundaryplusTestTriggerStdlibOnlyBoundaryenforce Apache-2.0 isolation on the SDK subtrees. - 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/v1to the controller withX-Faber-Origin: ui.
Component Topology
Section titled “Component Topology”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"]Custom Resources (faberops.dev/v1beta1)
Section titled “Custom Resources (faberops.dev/v1beta1)”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) withurl,secretRef,capabilities, and optionaldefault: trueper type.kubectl get fconnlists 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.mdlearning.Playbook(fpb): Versioned content and machine-enforced safety contract (triggers,$0preChecks,prompt, strictoutputSchema, typedactions[]withceiling,blastRadius, androllback,requires, andfixturesDigest).Automation(fauto): Team-owned binding linking aPlaybook(or OCI catalog ref) toRepositoryandTargetClustertargets, requested trust level, and earned trust status (status.trust[]).AutomationRun(frun): Execution record holdingstatus.trustDecision, cryptographicstatus.evidence(verdict digest, sandbox claim, egress hosts, validator exit code, dry-run status), and post-mergestatus.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 isHITL.TargetCluster(ftc): Remote Kubernetes cluster target (apiServerorkubeconfigSecretRef) 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”$0Ownership Resolver:internal/operator/ownershipdeterministically maps Kubernetes workloads to their backingRepository, manifest or source path, and commit SHA before sandbox creation or LLM investigation begins, restoring resolvedrepoNameacross HITL resumes.- Evidence Verdict Digest Gate: Every run computes a SHA-256
verdictDigestinAutomationRun.status.evidencebinding inputs, model, sandbox claim, egress hosts, validator exit code, dry-run status, and diff stats.ValidateEvidenceForMutationfails 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, writesstatus.verification, updatesAutomation.status.trust[], promotes eligibility strictly on verified outcomes, and triggers auto-demotion on post-check failure or PR revert.
Execution Tiers and Context Layers
Section titled “Execution Tiers and Context Layers”- 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
Secretaccess), 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, sealsstatus.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, orfaberctl) or opens a PR/MR. - Operational Memory: Optional zero-extra-pod full-text memory backed by SQLite FTS5 or PostgreSQL
tsvectorwith Gold/Silver/Bronze quarantine and pre-persistence PII/secret redaction, strictly isolated from trust promotion. See Operational Memory.
Multi-Tenancy and Namespace Scoping
Section titled “Multi-Tenancy and Namespace Scoping”- 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-scopedRoleandRoleBindingwith zeroClusterRoleresources. - Same-Namespace Reference Isolation: Cross-namespace
repositoryRef,secretRef, andsandbox.templateRefreferences are denied by default (--allow-cross-namespace-refs=false), and--namespace-max-cost-usd-24hcaps 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): ExportsRunner,RunRequest,RunResult,Event,EventSink,LLMClient,OpenAIClient,AnthropicClient,Governor,Tool,MCPClient,Sandbox,StrictSchema,CodeModeConfig,OCIToolkit, andHTTPFetchToolkit.github.com/faberops/faber/pkg/trigger(Apache-2.0, stdlib-only): ExportsClient,ClientConfig,IncidentEvent, andEmitResultfor pushing signeddev.faberops.app.incidentCloudEvents v1.0 payloads to Faber.
See Starlark Code Mode, Built-In Read-Only Tools, and Go SDKs for usage examples.