Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix(hcc): bound rollout-stall detection with progressDeadlineSeconds

Alfredo Lopez0fd19d25dd11
diff --git a/deploy/base/control-plane/host-context-controller.yaml b/deploy/base/control-plane/host-context-controller.yaml
index 72b86f960..36c6ab8be 100644
--- a/deploy/base/control-plane/host-context-controller.yaml
+++ b/deploy/base/control-plane/host-context-controller.yaml
@@ -23,6 +23,15 @@ spec:
# single-writer assumption through the rollout too.
strategy:
type: Recreate
+ # Recreate + replicas:1 means a botched rollout (new pod never Ready) leaves
+ # the control plane down until a manual `kubectl rollout undo` — the single-
+ # writer invariant forbids any overlap-based auto-recovery. This deadline is
+ # DETECTION ONLY: it flips Progressing=False (ProgressDeadlineExceeded) and
+ # fails `kubectl rollout status` for callers without their own --timeout; it
+ # does not roll back. 300s > worst legitimate startup (imagePullPolicy: Always
+ # pull + startupProbe budget 3s*40=120s + initial safety-inventory pass), so a
+ # slow pull never trips a false positive.
+ progressDeadlineSeconds: 300
selector:
matchLabels:
app: host-context-controller
diff --git a/host-context-controller/package-lock.json b/host-context-controller/package-lock.json
index 0479d26c3..09e1ec4cb 100644
--- a/host-context-controller/package-lock.json
+++ b/host-context-controller/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-host-context-controller",
- "version": "0.1.201",
+ "version": "0.1.202",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-host-context-controller",
- "version": "0.1.201",
+ "version": "0.1.202",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@clerum/image-policy": "file:../packages/image-policy",
diff --git a/host-context-controller/package.json b/host-context-controller/package.json
index 190306bd0..da6bddb33 100644
--- a/host-context-controller/package.json
+++ b/host-context-controller/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-host-context-controller",
- "version": "0.1.201",
+ "version": "0.1.202",
"description": "Host Context Controller - provides McpServer CRDs to mcp-host via REST API",
"main": "dist/main.js",
"engines": {
diff --git a/host-context-controller/src/deploymentStrategy.test.ts b/host-context-controller/src/deploymentStrategy.test.ts
index f4e25360b..77048f231 100644
--- a/host-context-controller/src/deploymentStrategy.test.ts
+++ b/host-context-controller/src/deploymentStrategy.test.ts
@@ -49,4 +49,15 @@ describe('host-context-controller Deployment strategy', () => {
const strategy = deployment?.spec?.strategy as { rollingUpdate?: unknown } | undefined
expect(strategy?.rollingUpdate).toBeUndefined()
})
+
+ it('bounds rollout-stall detection above the worst legitimate startup', () => {
+ // Detection only, not recovery: Recreate + replicas:1 means a botched
+ // rollout is healed operationally (kubectl rollout undo), never by K8s.
+ // This deadline just flips Progressing=False / fails `kubectl rollout
+ // status` deterministically for observers without their own --timeout. It
+ // must exceed the worst legitimate startup — imagePullPolicy: Always pull +
+ // startupProbe budget (3s*40=120s) + the initial safety-inventory pass — so
+ // a slow pull never trips a false ProgressDeadlineExceeded.
+ expect(deployment?.spec?.progressDeadlineSeconds).toBe(300)
+ })
})