Skip to content

Add a built-in rolling-update (zero-downtime) deploy to an existing service #416

Description

@guillempuche

Request

Add a first-class rolling-update / zero-downtime deploy to an existing service group in the unikraft CLI.

Background

The legacy kraftkit kraft cloud deploy had this built in:

kraft cloud deploy --service <group> --rollout remove_sequential --rollout-wait <dur> …

It started the new instance, waited, then removed the old one — a zero-downtime swap of the instance behind a service group, in one command.

The new unikraft CLI (0.4.1) has no equivalent single flag. To replace an instance behind an existing service group without downtime, the caller has to hand-compose it:

unikraft run --service <group> --name <new> --image <ref> …   # add the new instance
unikraft instances wait <new-filter>                          # wait for readiness
unikraft instances delete <old>                               # remove the previous instance

…and manage the naming, ordering, and failure/rollback themselves in CI shell. unikraft run --help exposes no --rollout/--replace/--strategy, so every project reimplements this.

Proposal

A built-in rollout on unikraft run (or unikraft services edit), e.g.:

unikraft run --service <group> --image <ref> --rollout remove_sequential --rollout-wait <dur> …

that atomically: creates the new instance in the service, waits for it to be ready, removes the previous instance(s), and rolls back (leaves the old one serving) if the new one never becomes healthy.

Why

It keeps a CI deploy a single, self-documenting command and gives zero-downtime releases without bespoke per-project shell orchestration — matching the ergonomics teams had on kraftkit.

Context

Migrating CI from kraftkit to the new CLI via unikraft/setup-action + unikraft build --output + unikraft run. CLI: unikraft 0.4.1 (unikraft-cloud/cli).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions