Skip to content

Implement ADR 0021 workload reservations and surge admission for single-machine installations #352

Open

Description

@samuelmbabhazi

Scope

Implement the capacity/isolation portion of accepted ADR 0021, merged in #341. The ADR changes documentation only; its resource protections are not implemented by that merge.

On a machine hosting the control plane and applications, admission must protect the control plane while old and new application releases overlap. The current generic placement policy discounts the replaced release while it is still serving.

Acceptance criteria

  • Implement and report the ADR's control-plane reservation (default 0.5 CPU and 1 GiB) and minimum single-machine installer capacity (2 CPUs / 3 GiB).
  • On nodes with the specified reservation, count old and new releases concurrently during switch-then-drain and refuse an oversized redeployment before starting it.
  • Enforce the ADR's application memory slice, including correct Docker/systemd membership and bounded aggregate workload memory.
  • Verify successful and refused placements, concurrent deployments, restart behavior and cleanup of failed/superseded reservations.
  • On a real disposable VM, demonstrate that memory pressure from applications and a rejected rolling deployment leave the control plane available.
  • Coordinate with the remaining single-machine installation work; this issue alone does not make single-machine installation supported.

Boundaries

Follow the accepted ADR rather than silently changing ordinary nodes' placement policy. The ADR explicitly preserves their current behavior; a general surge-policy change needs a separate decision. No host resource-exhaustion experiment was performed during the audit.

Decision: https://github.com/shipkeepdev/shipkeep/blob/fcc587713eaab45778e633ffa66de8c04e8bbd67/docs/adr/0021-single-machine-installation.md

Activity

  1. added
    priority:P1
    on Nov 19, 2026
  2. samuelmbabhazi commented on Nov 20, 2026

    @samuelmbabhazi
    CollaboratorAuthor

    Status: code complete, merged in #373 and #374.

    Checked end to end on a fresh Ubuntu 24.04 container installed by the single-machine installer:

    • the slices and their memory.low and memory.max;
    • the OOM scores (-900 for the control plane, 1000 for applications);
    • the reservation in the node facts;
    • a 16 GiB redeploy refused with nothing started;
    • a reboot that restores everything.

    What remains is the acceptance on a real VM (#200), including behavior under real memory pressure, which a container cannot show faithfully.

  3. added
    v0.1-stable
    on Nov 21, 2026
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

    priority:P1security-reviewtasktrack:agenttrack:control-planev0.1-stable

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions