From 851228fe7f256f6c3f02bc4a39ab77d5890f3d40 Mon Sep 17 00:00:00 2001 From: Benjamin Borbe Date: Sun, 15 Nov 2026 13:17:29 +0100 Subject: [PATCH] feat(chart): render spec.tokenCeiling from agent values (chart 0.23.21) Adds tokenCeiling to the Config render and the CRD schema, so a per-agent token ceiling set in a values file reaches the Config. Declared in the CRD because it sets preserveUnknownFields: false and would otherwise prune the key. --- helm/Chart.yaml | 2 +- helm/crds/config-crd.yaml | 5 +++++ helm/templates/agents.yaml | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 724496a..5e38ef7 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -8,7 +8,7 @@ type: application # name. Without it a setting the executor binary reads but the chart does not # model is unreachable — a values key the template ignores is a silent no-op, # and an operator edit to the live Deployment is dropped by the next apply. -version: 0.23.20 +version: 0.23.21 # Default image tag for the framework components when values don't override. appVersion: "0.3.1" home: https://github.com/bborbe/agent diff --git a/helm/crds/config-crd.yaml b/helm/crds/config-crd.yaml index ede32b3..9491ba6 100644 --- a/helm/crds/config-crd.yaml +++ b/helm/crds/config-crd.yaml @@ -85,6 +85,11 @@ spec: # spawned Job's start. 0 means no separate budget. When both this and # zombieJobTimeoutSeconds are set, the smaller deadline wins. runBudgetSeconds: {type: integer, minimum: 0} + # Optional; caps the tokens the agent may spend across its runs in one + # run window. Unset or 0 means no ceiling. Declared here because this + # CRD sets preserveUnknownFields: false — an undeclared spec.tokenCeiling + # would be pruned and the ceiling silently never fire. + tokenCeiling: {type: integer, minimum: 0} # Optional; restricts the hours in which this agent's Jobs may be # spawned. Unset means no window. A spawn outside the window is # deferred and re-driven when it opens, never dropped. Declared here diff --git a/helm/templates/agents.yaml b/helm/templates/agents.yaml index 393d55d..9ffcd61 100644 --- a/helm/templates/agents.yaml +++ b/helm/templates/agents.yaml @@ -33,6 +33,9 @@ spec: {{- if $agent.runBudgetSeconds }} runBudgetSeconds: {{ $agent.runBudgetSeconds }} {{- end }} + {{- if $agent.tokenCeiling }} + tokenCeiling: {{ $agent.tokenCeiling }} + {{- end }} {{- with $agent.runWindow }} runWindow: {{- with .timezone }}