Repository navigation
Description
Problem or Motivation
The roadmap Service Deployment uses Recreate because of its ReadWriteOnce volume (k8s/devops/roadmap-service/deployment.yaml:13-15). No replica is available for 36.9 minutes a day, about 116 s for each rollout. After the sweep item, the router holds no volume and runs no round, so it can run 2 replicas.
Proposed Solution & Architectural Design
- Remove the volume mount.
strategy: RollingUpdatewithmaxUnavailable: 0andmaxSurge: 1. 2 replicas. A PodDisruptionBudget withminAvailable: 1. - The drain finishes only the open HTTP requests. The round drain goes. Remove
service.drain_timeout_secondsfrom the live ConfigMap before the image that drops the setting rolls (a removed setting crash-looped the Service on 2026-11-07). OTEL_RESOURCE_ATTRIBUTESsetsservice.instance.id=roadmap-serviceand relies on one pod at a time (deployment.yaml:82-86). Use the pod name as the instance, and sum over instances in the queries.- Delete the Mattermost
/roadmapcommand and its handler (owner decision 2026-11-11: it had 0 uses in 7 days; the read-only API, the CLI read and the Grafana dashboard cover the need). No shim.
Removes: the round drain of drain_and_stop (src/devops_cli/server/service.py:889-913), the volume mount, Recreate.
Target Subsystem
Kubernetes & Minikube Automation (k8s/devops/roadmap-service/, src/devops_cli/server/).
Existing Tool Considered
Kubernetes RollingUpdate and PodDisruptionBudget. Cost: about 80,000 tokens and 4 hours to build, about 5,000 tokens a month to keep, about 10,000 tokens to fix. New resources: one more router pod (requests of today).
Acceptance Criteria
- During a rollout, a delivery sent each second gets 2xx every time (a test sender to the cluster route).
- Counters do not double or reset in the dashboards across a rollout.
- Measure: minutes a day with no available router pod, from 36.9 to 0; redeliveries a week near 0.
Dependencies
- "feat(roadmap): run the reconcile sweep on a cluster schedule".
- fix(roadmap): a Service rollout stops stage rounds with no record #4485 (a Service rollout stops stage rounds with no record), in flight: it bounds the round drain that this item removes. Merge it first.
- Owner decision 2026-11-11: delete the Mattermost
/roadmapcommand.
Source: #4517
Alternatives check of 2026-11-26: in-use.
The repository already uses this tool.
Tool: kubernetes/kubernetes (https://github.com/kubernetes/kubernetes), Apache-2.0, last activity 2026-11-25, maintained.
Reason: Searches found no tool beyond the built-in Kubernetes rollout and disruption-budget features (Argo Rollouts adds unneeded canary steps); those cover the deployment side, while the drain, telemetry and command removals stay code in this repo.
Covers:
- RollingUpdate with maxUnavailable 0 and maxSurge 1 keeps a pod serving
- PodDisruptionBudget minAvailable 1 guards voluntary disruptions
- Pod name as instance id through a fieldRef env value
Lacks:
- Removal of the round drain in drain_and_stop
- Dashboard counter queries that sum over instances
- Deletion of the Mattermost /roadmap command and handler
Owner decision 2026-11-13
The router runs a scoped sweep (due_jobs for one item or PR) for each delivery, and it keeps its refusal of the deliveries of the App. Source: tracker #5482, Phase 4.
- Live proof: after the merge, a router restart during a unit stops 0 units. A comment gives the unit names and the restart time.
Proposed design
Problem statement
The roadmap-service Deployment uses Recreate because its home volume is ReadWriteOnce. No router pod answers a webhook for 36.9 minutes a day, about 116 s for each rollout. After #4574 the router holds no volume and runs only a scoped sweep for each delivery. This change runs 2 router replicas with RollingUpdate and a PodDisruptionBudget, drains only open HTTP requests, sets service.instance.id from the pod name, sums the dashboard queries over instances, and deletes the unused Mattermost /roadmap command.
Acceptance criteria
Requirement: Stateless rolling deployment
The roadmap-service kustomization SHALL run 2 router replicas with strategy RollingUpdate, maxUnavailable 0, maxSurge 1, no home volume mount, and a PodDisruptionBudget with minAvailable 1.
Scenario: Validate the roadmap-service manifests
- WHEN
uv run devops ci --check --only k8sruns on the change. - THEN The check passes with no error about
k8s/devops/roadmap-service/.
Requirement: Instance id from the pod name
The roadmap-service Deployment SHALL set service.instance.id from the pod name in OTEL_RESOURCE_ATTRIBUTES.
Scenario: Validate the Deployment env
- WHEN
uv run devops ci --check --only k8sruns on the change. - THEN The check passes with no error about the
OTEL_RESOURCE_ATTRIBUTESofk8s/devops/roadmap-service/deployment.yaml.
Requirement: Two instances answer a delivery
The router SHALL answer each signed webhook delivery with a 2xx response while more than one router instance serves the route.
Scenario: One delivery to each of two instances
- WHEN A test sends one signed delivery to each of two router instances.
- THEN Each response is 2xx and no instance returns a 5xx.
Requirement: A repeated delivery writes nothing twice
The scoped sweep MUST read its marker before it writes, so a delivery that a second instance runs writes nothing twice.
Scenario: Run one delivery twice
- WHEN A test runs the scoped sweep of one delivery two times on one item.
- THEN The item gets one comment and one record mark, and the second run sends no write.
Requirement: HTTP-only drain
On SIGTERM the Service SHALL wait only for the open HTTP requests, MUST wait for no round and no worker, and MUST cut the request budget.
Scenario: SIGTERM with a round in flight
- WHEN A test calls
drain_and_stopwhile a worker holds a round in flight. - THEN
drain_and_stopreturns before the round ends, it waits for no worker, and it cuts the request budget.
Requirement: Counter queries sum over instances
Each devops-cli dashboard panel that reads a roadmap-service counter SHALL aggregate the counter across instances with sum.
Scenario: Validate the dashboard manifests
- WHEN
uv run devops ci --check --only k8sruns on the change. - THEN The check passes with no error about
k8s/monitoring/dashboards/.
Requirement: Mattermost command removed
The change SHALL delete the Mattermost /roadmap slash command, its bootstrap registration and its webhook handler, and MUST add no shim.
Scenario: Search the source for the command
- WHEN A test searches the modules under
src/devops_cli/for the/roadmapslash command and readssrc/devops_cli/server/routes/webhooks.py. - THEN No module registers the
/roadmapslash command, andwebhooks.pynames no Mattermost provider.
Requirement: Pending a person after the merge
After the merge, a person SHALL restart the router during a unit and MUST record the unit names and the restart time in a comment.
Scenario: Restart the router during a unit
- WHEN After the merge, a person restarts the router pod while a unit runs.
- THEN No unit stops, and a comment on the issue gives the unit names and the restart time.
Existing Tool Considered
kubernetes/kubernetes (https://github.com/kubernetes/kubernetes), Apache-2.0, maintained. The alternatives check of 2026-11-26 records the verdict in-use and lists what the tool covers and lacks (see the alternatives block in the issue body). The change builds the code that the tool lacks: it removes the round drain, sums the dashboard queries over instances, and deletes the Mattermost /roadmap command and handler. Written cost: about 80,000 tokens and 4 hours to build, about 5,000 tokens a month to keep, about 10,000 tokens to fix, and one more router pod at today's requests.
Key questions
- Does the router create a unit of work for each delivery, or run a scoped sweep in its own pod?: The router runs a scoped sweep for one item or PR for each delivery in its own pod. It keeps its refusal of the App deliveries. Owner decision 2026-11-13 sets this. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, src/devops_cli/roadmap/run.py]
- Chosen: Run the scoped sweep in the router pod. The owner decision of 2026-11-13 sets it, and the work stays in the pod that receives the delivery.
- Rejected: Create an intake unit for each delivery. A unit adds a pod for each delivery, and the owner decision of 2026-11-13 replaces it.
- Does the stateless router still mount the ReadWriteOnce home volume?: No. ADR 0021 moves the shared state to
valkey-roadmap. The Deployment mounts no volume. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, k8s/devops/roadmap-service/deployment.yaml:13-15]- Chosen: Remove the volume mount and use RollingUpdate. The router keeps no state on the volume after feat(roadmap): run the reconcile sweep on a cluster schedule #4574, and RollingUpdate keeps a pod available.
- Rejected: Keep the volume and Recreate. A ReadWriteOnce volume stops every router pod during a rollout.
- Which rollout strategy and disruption budget does the stateless router use?: RollingUpdate with maxUnavailable 0 and maxSurge 1, 2 replicas, and a PodDisruptionBudget with minAvailable 1. ADR 0021 sets this for the stateless router. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, k8s/devops/roadmap-service/deployment.yaml:13-15]
- Chosen: RollingUpdate with maxUnavailable 0 and maxSurge 1. ADR 0021 sets it for the stateless router, and it keeps one pod available.
- Rejected: Recreate. It stops every router pod during a rollout and leaves no pod available.
- Rejected: argoproj/argo-rollouts canary. It adds canary and analysis steps that this item does not need; the built-in strategy covers the rollout.
- What does the SIGTERM drain wait for after the round leaves the Service?: It waits only for the open HTTP requests. It cuts the request budget so a background scoped sweep ends at its next request. It waits for no worker and no round. (best practice) [sources: src/devops_cli/server/service.py:1109, docs/CLUSTER.md:54, openspec/changes/archive/2026-11-11-4485-a-service-rollout-stops-stage-rounds/proposal.md]
- Chosen: Wait only for open HTTP requests. The router runs no lane round, and a cut scoped sweep is safe because the sweep runs it again.
- Rejected: Keep the 600 s round drain of fix(roadmap): a Service rollout stops stage rounds with no record #4485. No lane round runs in the router, so the wait has nothing to end and it delays each rollout.
- Must this change remove
service.drain_timeout_secondsfrom the live ConfigMap before the image rolls?: No. fix(roadmap): a Service rollout stops stage rounds with no record #4485 already removed the setting and its default.ServiceConfigignores an unknown key, so a live ConfigMap that still holds the key loads. [sources: openspec/changes/archive/2026-11-11-4485-a-service-rollout-stops-stage-rounds/proposal.md, src/devops_cli/config/settings.py, docs/CLUSTER.md:54] - How does each router instance identify itself in telemetry, and how do the dashboard queries count across instances?: The Deployment sets
service.instance.idfrom the pod name. Each dashboard query that reads a router counter sums over the instance. A fixed id makes two pods report one instance, so a counter doubles or resets. (best practice) [sources: k8s/devops/roadmap-service/deployment.yaml:82-86, docs/TELEMETRY.md:34, src/devops_cli/telemetry/tracer.py]- Chosen: Pod name as
service.instance.id, with a sum over instances. Each pod reports a distinct instance, and the sum counts each pod once. - Rejected: Fixed
service.instance.id=roadmap-service. Two pods report one instance, so a counter can collide or reset.
- Chosen: Pod name as
- Should the Mattermost
/roadmapslash command stay?: No. Delete the command, its bootstrap registration and its webhook handler with no shim. The owner decided this on 2026-11-11 after 0 uses in 7 days, and the read-only API, the CLI read and the Grafana dashboard cover the need. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, src/devops_cli/server/routes/webhooks.py]- Chosen: Delete the command and the handler. It had 0 uses in 7 days, and other read paths cover the need.
- Rejected: Keep the command. It keeps a provider in a router that must stay small, and no use holds it.
- How do two router pods keep a repeated delivery from a double scoped sweep?: The scoped sweep reads its marker before it writes. A redelivery that a second instance runs writes nothing twice. The in-memory delivery cache stays a fast path of one pod. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, src/devops_cli/server/routes/webhooks.py, src/devops_cli/roadmap/run.py]
- Chosen: Keep the marker read in the scoped sweep. The sweep is already idempotent, and the marker read makes a second run write nothing.
- Rejected: Move the delivery cache to Valkey. The shared cache adds state and scope, and the marker read already stops a double write.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(service)scope of the title gives the scope.It removes 36.9 minutes of daily downtime but is a planned improvement, not a breaking defect.It eliminates all rollout downtime and removes redeliveries for users.It spans deployment YAML, drain code removal, OTEL attributes, and a Mattermost command deletion.Both work on the Recreate strategy and round drain, but #4485 bounds the drain while this item removes it by making the router stateless.devops-cli-service commentedon Nov 11, 2026
Refine cannot set this item to Ready at 818ac6f while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
The next refine round also looks at the item again when a commit on the default branch changes one of these files:
src/devops_cli/server/service.py.fix(service): route issues webhooks past scoped intake (#4631)
devops-cli-service commentedon Nov 12, 2026
Refine cannot set this item to Ready at c3130a3 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
The next refine round also looks at the item again when a commit on the default branch changes one of these files:
src/devops_cli/server/service.py,src/devops_cli/roadmap/run.py.devops-cli-service commentedon Nov 12, 2026
Alternatives check: partly
Reason: Searches found no separate library for this work; the only relevant tool is Kubernetes itself, whose built-in Deployment RollingUpdate strategy and PodDisruptionBudget already provide the zero-downtime rollout and the one-pod availability guarantee the issue describes. They cannot, however, make the application-side changes: removing the round drain and the ConfigMap setting, switching service.instance.id to the pod name and summing dashboard queries, and deleting the Mattermost /roadmap command.
Tool: kubernetes/kubernetes (https://github.com/kubernetes/kubernetes)
Covers:
Lacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-12. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 14, 2026
Refine cannot set this item to Ready at b15faab while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
feat(service): Roll the Service with a surge release (#6146)
devops-cli-service commentedon Nov 19, 2026
The result in the alternatives block of the issue body changed. Before this check:
partly, tool https://github.com/kubernetes/kubernetes. A person decides what the new result means for the item.Searches (10)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 26, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.