Skip to content

feat(chart): agent.updateStrategy.surge rolls the node agent with a standby (proposal 041) - #1157

Merged
bpalermo merged 2 commits into
mainfrom
feat/041-agent-surge-chart
Oct 3, 2026
Merged

bpalermo merged 2 commits into
mainfrom
feat/041-agent-surge-chart

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Refs #1123. Part 3 of 4 of proposal 041. Stack: #1155 ← #1156 ← this PR ← e2e gate. Base: feat/041-agent-ready.

What

agent.updateStrategy.surge (default false).

  • true renders maxSurge: 1, maxUnavailable: 0.
  • false renders the explicit maxSurge: 0, maxUnavailable: 1, which is what the DaemonSet already rolled with.

The following apply in both modes, so flipping the value later changes only the strategy.

No ports: on the agent pod.

Exec probes: /agent-ready --path=/healthz|/readyz over --health-socket=/tmp/aether-agent-health.sock, with --health-probe-bind-address=0. Periods and thresholds are unchanged: readiness 2 s × 15, liveness 10 s.

Lock and priority.

  • The node lock lives on the /run/aether hostPath the agent already mounts. The mount is now documented as such.
  • system-node-critical stays.

Capacity. Requests are unchanged: 200m / 64Mi, no CPU limit (#1116).

  • A surge needs that much headroom per node for the overlap.
  • system-node-critical preempts if it has to. Otherwise the surge pod stays Pending and the roll stalls on that node, visibly.
  • Documented in the values, in the runbook's headroom pre-flight, and in the new runbook section.

Chart 2.3.0.

Docs.

  • runbook § Agent surge roll (proposal 041):
    • turning it on, including in the same upgrade that first ships it;
    • what the overlap looks like in the logs;
    • the stuck-terminating case, and why never to delete the lock file;
    • kubectl delete pod.
  • The readiness one-liner now uses /agent-ready.
  • configuration.md: the value, --node-lock, --health-socket, --health-probe-bind-address, and agent-ready.

Tests

  • aether_agent_update_strategy_default_test and aether_agent_update_strategy_surge_test cover both values. The surge one also pins the socket flags, the exec liveness probe, the /run/aether mount and system-node-critical.
  • aether_agent_no_host_ports_test asserts no containerPort: 8080/8082 and no port: health in the agent DaemonSet, with a control.
  • aether_agent_restart_fast_path_test now pins the exec readiness probe.
  • //charts/aether/... 52/52. //agent/internal/cmd (chart flags exist on the binary) passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

@bpalermo

bpalermo commented Oct 3, 2026

Copy link
Copy Markdown
Owner Author

Review fix pushed (89e4f0c): removed the 'safe in the same upgrade that first ships it' claim from values.yaml and the runbook. Rollout is now two steps: upgrade to 2.3.0 with surge=false, then set surge=true. The runbook gives the reasons: an older registrar ignores instance, so watch streams ping-pong full resyncs; a lock-less old agent restarting between socket probes can rebind and later unlink the node sockets; its deferred observed-upstreams flush can land after the takeover. configuration.md notes the same. The runbook's kubectl -n aether lines now use aether-system.

🤖 Generated with Claude Code

@bpalermo
bpalermo force-pushed the feat/041-agent-ready branch from 3abc095 to ca13a5e Compare October 3, 2026 18:54
@bpalermo
bpalermo changed the base branch from feat/041-agent-ready to main October 3, 2026 18:54
bpalermo and others added 2 commits October 3, 2026 17:27
…tandby (proposal 041)

- agent.updateStrategy.surge (default false): true renders maxSurge 1 /
  maxUnavailable 0, false the explicit delete-then-create (maxSurge 0 /
  maxUnavailable 1) the DaemonSet already rolled with.
- The agent pod declares no ports: on a hostNetwork pod containerPort 8080 and
  8082 default to hostPorts, and the scheduler's NodePorts filter would keep a
  surge pod Pending beside the old one. They were informational; metrics bind
  once the agent owns the node.
- Liveness and readiness are exec probes through /agent-ready over the pod-local
  --health-socket (/tmp emptyDir), --health-probe-bind-address=0. Same periods
  and thresholds as before (readiness 2 s x 15).
- The /run/aether hostPath already carries the node lock; documented at the
  mount. system-node-critical stays.
- helm tests: both strategy values, the probes, the lock mount, and the absence
  of any containerPort.
- Chart 2.3.0. Docs: runbook "Agent surge roll (proposal 041)" (turning it on,
  what the overlap looks like, a standby that never takes over), the headroom
  pre-flight, configuration.md (value, flags, agent-ready).

Refs #1123

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…that ships it (proposal 041 review)

values.yaml and the runbook claimed surge was safe to enable in the same
upgrade that first ships chart 2.3.0. It is not: in that upgrade
- an older registrar ignores the watch `instance` key, so the owner's and the
  standby's watch streams replace each other (DataLoss, full resync) for the
  whole overlap;
- a lock-less old agent that restarts between the standby's socket probes can
  rebind xds.sock/cni.sock and unlink them by name on pod delete, leaving the
  node with no sockets;
- its deferred observed-upstreams flush can land after the takeover.

Now: upgrade to 2.3.0 with surge=false, then set surge=true, with the reasons
in the runbook. Also documents that a standby whose registry gate only timed
out stays NotReady, and unifies the runbook's `kubectl -n aether` to the
`aether-system` it uses everywhere else.

Refs #1123

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo force-pushed the feat/041-agent-surge-chart branch from 89e4f0c to 267eacd Compare October 3, 2026 20:27
@bpalermo
bpalermo marked this pull request as ready for review October 3, 2026 20:27
@bpalermo
bpalermo merged commit cf508c6 into main Oct 3, 2026
24 checks passed
@bpalermo
bpalermo deleted the feat/041-agent-surge-chart branch October 3, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant