Skip to content

GitOps Engines, Policy Packs, and Storm Guards

Faber natively supports both Flux v2 and Argo CD clusters, ships turnkey starter policy packs under examples/packs/, expands built-in offline validator profiles, and guards against Kubernetes watch cascade storms.

Pack Policies Purpose
examples/packs/flux/ flux-failure-fixer, ops-hygiene, renovate-cochange-fixer Remediate failed Flux Kustomization and HelmRelease reconciliations, run scheduled cluster hygiene checks, and fix Renovate co-change drift.
examples/packs/argocd/ argocd-sync-fixer, rbac-argocd-readonly Watch argoproj.io/v1alpha1 Application resources entering OutOfSync, Degraded, or ComparisonError states and propose validated manifest fixes.
examples/packs/rightsizer/ resource-rightsizer Query Prometheus p95 CPU and memory working-set usage and open rightsizing PRs with requireApproval: true and GPU-pod guardrails.
examples/packs/platform/ alert-triage, cert-and-secret-watch Read-only Tier 0 Alertmanager webhook triage and cert-manager / ExternalSecret health monitoring.

For Argo CD clusters installed via the Helm chart, enable least-privilege read-only Argo CD RBAC (get, list, watch on argoproj.io applications and applicationsets):

Terminal window
helm upgrade --install faber oci://ghcr.io/faberops/charts/faber \
--version 2.0.0 \
--namespace faber \
--set rbac.argocdReadOnly=true

When an upstream dependency fails (such as a Flux DependencyNotReady cascade or a transient Argo CD sync wave), naive watch triggers can enqueue dozens of redundant LLM runs. Faber defends against watch storms in three layers:

  1. CEL Match Exclusions at Watch Time: Starter Flux and Argo CD policies filter out transient progressing and cascade states (such as DependencyNotReady, Progressing, or ReconciliationInProgress) directly in the trigger’s CEL match expression.
  2. Per-Policy Queue Cap (spec.policy.maxQueuedRuns): Before creating a new RemediationRun, K8sWatchManager and the webhook handler serialize queue checks and count all active or queued runs (including newly created runs whose status.phase is still empty "", plus Pending, Settling, Running, and Verifying). When the count reaches maxQueuedRuns (default 10), excess triggers are dropped and recorded in faber_triggers_dropped_total{policy,reason="queue_full"} and the audit log.
  3. Post-Settle Live Object CEL Re-Check: After spec.policy.settleWindow elapses, RemediationRunReconciler re-fetches the watched Kubernetes object via DynamicClient and re-evaluates the trigger’s CEL match expression. If the object has already recovered or been deleted, the run transitions immediately to Skipped (Reason=ConditionCleared) and persists a Skipped store row with zero LLM calls and zero sandbox claims.

Instead of duplicating shell commands across policies, declare validationProfiles on GitOpsRepository.spec.validation or override them on MaintenancePolicy.spec.tools.sandbox. Profiles expand deterministically before any explicit validationCommands and are deduplicated automatically:

Profile Expanded Offline Command
kubeconform kubeconform -strict -ignore-missing-schemas .
helm-template Renders every Chart.yaml found up to depth 4 offline via helm template
kustomize-build Renders every kustomization.yaml or kustomization.yml found up to depth 4 offline via kustomize build
kyverno kyverno apply policies --resource .
conftest conftest test --policy policy .
opentofu tofu validate -no-color

Example configuration on GitOpsRepository:

spec:
validation:
sandboxTemplateRef:
name: faber-validator
validationProfiles:
- kubeconform
- kustomize-build
commands:
- kubeconform -strict -ignore-missing-schemas kubernetes/apps
timeout: 5m

When MaintenancePolicy.spec.tools.sandbox specifies either validationProfiles or validationCommands, those policy-level settings override the repository defaults for that policy.

Test policy behavior, CEL routing, validator profiles, and hard diff gates offline without spending tokens:

Terminal window
make eval
# Or inspect JSON output across all golden fixtures including argocd-sync-fixer:
go run ./cmd/faber-eval --fixtures test/eval/fixtures --json