Skip to content

feat(service): Roll the Service with a surge release #6107

Closed

Description

@dan-petty

Problem

Step 1 of #6058 (pull request #6099) makes the roadmap Service run its rows only in the pod that holds the Kubernetes Lease roadmap-service-rows, but it keeps strategy: Recreate in k8s/devops/roadmap-service/deployment.yaml. This is the expand step of an expand/contract order: the release that carries the Lease code must stop the old pod, which has no Lease code, before the new pod starts, so two pods never run the rows at the same time. Until the strategy changes, each release still stops the GitHub webhooks for the drain of the old pod (5 of 40 deliveries got HTTP 503 during the rollout of 0.169.1, about 19 releases a day). This is the contract step, and it completes #6058 (P1).

Expected behavior

  • deployment/roadmap-service keeps replicas: 1 and rolls with RollingUpdate, maxSurge: 1 and maxUnavailable: 0. The new pod gets the webhooks when /readyz passes, and only then does the old pod get SIGTERM.
  • docs/CLUSTER.md, docs/SERVICE_PATTERNS.md (RL1), k8s/README.md and the spec roadmap-service-deployment state the surge release, with the RL1 exception of one replica and no PodDisruptionBudget (feat(service): make the webhook router stateless #4575).
  • Live check after the next release: zero 5xx in the hook deliveries of the release, and kubectl -n devops get lease roadmap-service-rows -o jsonpath='{.spec.holderIdentity}' shows one holder, which changes only after the drain of the old pod ends.

Premise check

The running image holds the Lease code: kubectl -n devops get lease roadmap-service-rows shows a holder, which is the name of the running pod. Without a holder, the strategy switch would run the rows on two pods during a rollout.

Related

#6058 (step 1, the Lease), #4575 (stateless router, two replicas, a PodDisruptionBudget).

Proposed design

Problem statement

The roadmap Service still uses strategy: Recreate. Each release stops the old pod before the new pod starts, and GitHub webhook deliveries get HTTP 503. The Service must roll with RollingUpdate, maxSurge: 1 and maxUnavailable: 0. It keeps one replica. The docs and spec must state the RL1 exception.

Acceptance criteria

Requirement: Roadmap service uses a surge rollout

The roadmap-service Deployment SHALL set replicas: 1 and use RollingUpdate with maxSurge: 1 and maxUnavailable: 0.

Scenario: Live Deployment strategy check

  • WHEN after Argo CD syncs the change, a developer runs kubectl -n devops get deployment roadmap-service -o jsonpath='{.spec.strategy.type}{" "}{.spec.strategy.rollingUpdate.maxSurge}{" "}{.spec.strategy.rollingUpdate.maxUnavailable}{" "}{.spec.replicas}'
  • THEN the command prints RollingUpdate 1 0 1.

Requirement: The new pod is ready before the old pod stops

The rollout SHALL keep the old pod running until the new pod passes /readyz.

Scenario: Live surge rollout

  • WHEN after the next release, a developer watches kubectl -n devops get pods -l app.kubernetes.io/name=roadmap-service -w during the rollout
  • THEN the new pod reaches Ready before the old pod gets SIGTERM, and the ready pod count never falls to zero.

Requirement: One Lease holder during the rollout

The roadmap Service SHALL hold the Lease roadmap-service-rows on one pod at a time, and the holder SHALL change only after the old pod drains.

Scenario: Lease holder live check

  • WHEN after the next release, a developer runs kubectl -n devops get lease roadmap-service-rows -o jsonpath='{.spec.holderIdentity}' before, during and after the rollout
  • THEN each read shows one holder, and the holder changes only after the old pod's drain ends.

Requirement: No webhook delivery returns HTTP 5xx

The release SHALL serve GitHub webhook deliveries with no HTTP 5xx response during the rollout.

Scenario: Webhook delivery live check

  • WHEN after the next release, a developer reads the hook deliveries for the release window with uv run devops gh api repos/<owner>/<name>/hooks/<hook-id>/deliveries --jq '[.[] | select(.status_code >= 500)] | length'
  • THEN the command prints 0.

Requirement: Docs and spec state the surge release

docs/CLUSTER.md, docs/SERVICE_PATTERNS.md (RL1), k8s/README.md and the roadmap-service-deployment spec SHALL state the surge release and the RL1 exception of one replica and no PodDisruptionBudget.

Scenario: Documentation text check

  • WHEN a developer runs rg -n 'maxSurge: 1|maxUnavailable: 0|RL1|PodDisruptionBudget' docs/CLUSTER.md docs/SERVICE_PATTERNS.md k8s/README.md openspec/specs/roadmap-service-deployment/spec.md
  • THEN each file names the surge release and the RL1 exception, and the spec matches the Deployment.

Existing Tool Considered

No alternatives check has run. The Kubernetes Deployment RollingUpdate strategy covers the need. It is built in and maintained. It lacks no feature for this change. The project builds no replacement code, so the cost is zero tokens and zero elapsed time.

Key questions

  • Which rollout strategy and parameters should roadmap-service use?: Use RollingUpdate with maxSurge: 1 and maxUnavailable: 0. Keep replicas: 1. (best practice) [sources: k8s/devops/roadmap-service/deployment.yaml, docs/CLUSTER.md]
    • Rejected: Recreate. It stops the old pod before the new pod starts. GitHub webhook deliveries then get HTTP 503.
    • Chosen: RollingUpdate with maxSurge 1 and maxUnavailable 0. It starts the new pod first and keeps the old pod until the new pod passes readiness.
    • Rejected: RollingUpdate with maxSurge 0 and maxUnavailable 1. It can stop the old pod before the new pod is ready. Webhook deliveries can then fail.
  • Does the roadmap-service-home ReadWriteOnce local-path volume allow the old and new pods to run during a surge?: Yes, if both pods run on the same node. ReadWriteOnce limits the volume to one node, not one pod. The local-path PV binds to one node, so the new pod must schedule on that node. The Lease serializes the rows. [sources: k8s/devops/roadmap-service/deployment.yaml]
  • Does the one-replica roadmap-service need a PodDisruptionBudget?: No. RL1 gives an exception for one replica and no PodDisruptionBudget. A PDB with one replica gives no availability and can block a node drain. (best practice) [sources: docs/SERVICE_PATTERNS.md, docs/CLUSTER.md]
    • Rejected: Add a PodDisruptionBudget. It gives no availability with one replica and can block a voluntary node drain.
    • Chosen: Keep no PodDisruptionBudget under the RL1 exception. The Service has one replica, and RL1 records this exception.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/feature
    source/agent
    on Nov 17, 2026
  2. dan-petty commented on Nov 17, 2026

    @dan-petty
    OwnerAuthor
    • Priority: P1-High. Each of about 19 daily releases loses webhook deliveries (5 of 40 got HTTP 503), causing increased error rates and lost events.
    • Related: feat(service): Roll each Service release with no webhook gap #6058, which asks for a different change. Both target the roadmap Service rollout gap; #6058 is the umbrella for the full expand/contract, while the candidate is its contract step (strategy switch to RollingUpdate).
  3. added
    status/new
    effort/low
    value/high
    scope/service
    priority/p1-high
    on Nov 17, 2026
  4. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

  5. added 2 commits that reference this issue on Nov 17, 2026
  6. added
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 17, 2026
  7. removed
    status/in-progress
    owner/agent
    on Nov 17, 2026
  8. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-17 09:25 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p1-highscope/servicesource/agenttype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions