Skip to content

BudgetPolicy

apiVersion
governance.nanohype.dev/v1alpha1
kind
BudgetPolicy
scope
Namespaced
reconciled by
eks-agent-platform
short names
budget

BudgetPolicy caps monthly spend per Platform and triggers the kill-switch at 120% of the threshold.

BudgetPolicySpec sets monthly spend caps per Platform.

What kubectl get shows

ColumnTypeMeaning
Platformstring
MonthlyUSDstring
Spendstring
Pctinteger

Spec

  • killSwitchEnabledbooleanrequireddefault true

    KillSwitchEnabled — when false, breach at 120% is logged but not acted on. Use sparingly; SOC2 platforms must keep this true.

  • monthlyUsdstringrequired

    MonthlyUsd is the soft threshold expressed as a decimal-string USD amount (e.g. "2500", "1500.50"). KillSwitch fires at 120% of this. Modeled as string for symmetry with Status.CurrentSpendUsd and so future v1 can support fractional cents without a lossy int32 → string conversion. The pattern enforces non-negative decimal with optional 2-digit fraction.

  • platformRefobjectrequired

    LocalRef references a CR by name in the same namespace.

    • namestringrequired

  • alertThresholdsPercent[]integer (int32)default [50,80,100]

    AlertThresholdsPercent — fire WarnEvent at these % of the threshold.