Skip to content

feat(cluster): Add Fleet autoscaling and notifications - #214

Merged
nfebe merged 46 commits into
mainfrom
feat/cluster-capacity
Aug 22, 2026
Merged

nfebe merged 46 commits into
mainfrom
feat/cluster-capacity

Conversation

@nfebe

@nfebe nfebe commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Turn connected FlatRun servers into one manageable Fleet, with scoped peer access, grouped infrastructure notifications, and autoscaling through Swarm or K3s.

@sourceant sourceant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete. No specific code suggestions were generated. See the overview comment for a summary.

nfebe added 29 commits August 22, 2026 21:21
Administrators can select available orchestration and routing providers without being offered
adapters that are not ready on the server.
The Swarm runtime now declares the Moby API contract it imports directly, keeping module
validation reproducible in CI.
Each deployment can retain validated scaling limits and controller state across agent restarts,
including on a single server without Fleet enabled.
Fleet can publish and remove validated replica routes through the existing Nginx manager,
including configuration checks and reloads before traffic changes take effect.
Autoscaling evaluations now persist their state, execute safe decisions, and group blocked or
failed actions into one deployment incident.
Server Info now reports the stable agent address used by Fleet. Before setup, it derives the
address from the authenticated request so setup can offer an editable default.
Saved targets can be tested without exposing their connection URL. Responses identify the
delivery type so clients can preserve credentials during edits.
Fleet operators can select K3s for stateless workload placement and scaling. Configured cluster
credentials and namespaces are used for readiness checks and workload operations.
Fleet health transitions now open one node incident, suppress repeated outage alerts, and
resolve the same incident when the node recovers. Related deployment failures remain grouped
under that incident.
Fleet provider setup can now save and report the K3s cluster context required for readiness
checks and workload operations.
Scaled replicas now use the existing deployment proxy configuration, retaining SSL, aliases,
security controls, and request behavior. Removing managed routing restores the original
Compose target.
Deployments can declare a portable scaling workload and storage policy. Operators receive
specific compatibility blockers before Fleet activation can move or replicate the service.
Operators can save a scale-ready workload independently of other deployment metadata and
immediately receive an updated compatibility assessment.
Compatibility responses now include the saved workload declaration so clients can edit storage
and portability settings without reconstructing them.
nfebe added 15 commits August 22, 2026 21:21
Scale-ready services now retain inline environment, startup commands, working directories,
health paths, and routed ports across Swarm and K3s. Inputs that cannot yet move safely remain
activation blockers.
Scale-ready Swarm services now join the configured proxy overlay so the existing FlatRun proxy
can reach replicas across Fleet nodes.
Scale-ready deployments can move traffic only after managed replicas are ready. Failed cutovers
restore the original route and remove the incomplete workload.
Scale-ready deployments can cut over from Compose to Swarm through the authenticated deployment
API. Runtime state remains available when policy evaluation is disabled.
Managed deployments retain their provider, service, replica count, and route across agent
restarts so later reconciliation can safely update traffic.
Successful scale changes now retain the actual replica count and routable backends. Restarted
agents no longer reconcile from stale scaling state.
Active managed workloads can now be reconciled on a fixed interval. Observation failures become
one correlated incident per deployment instead of silent gaps.
Managed workloads now react to sustained container and host pressure on a fixed interval. Partial
observations block scaling, and default placement remains on the local node until Fleet capacity
is explicitly granted.
Fleet workloads stay on the local Swarm node unless a connected peer grants capacity. Consenting
nodes receive an isolated placement label and enforce the configured replica ceiling.
K3s deployments now receive a stable Service, native Traefik ingress, and recurring utilization
checks through the Kubernetes Metrics API.
Schema-driven clients can discover workload compatibility, activation, policy, and capacity
claim operations from the agent API description.
Borrowed placement now requires declared workload limits and only uses peers whose CPU, memory,
and replica grants can accommodate each replica.
Borrowed capacity now requires a matching runtime cluster and a live peer grant. Ready replicas
enter routing after asynchronous startup, capacity credentials reach their dedicated claim
operation, and activation state is durable before Compose stops.
Autoscaling now observes only managed replicas, preserves routing identity, and applies
safe provider updates without unnecessary reloads. Fleet health events, capacity claims,
incident fallback, advertised URLs, and request cancellation now follow their intended trust
and lifecycle boundaries.
Managed activation now survives a disconnected request while retaining a bounded lifetime.
Managed Nginx route copies can no longer mutate shared backend state outside synchronization.
nfebe added 2 commits August 22, 2026 22:36
Stored peers receive missing default policies automatically.
Existing credentials adopt those policies without requiring reconnection.
The next beta includes Fleet management, managed scaling, and grouped notifications.
Upgrade notes cover automatic repair for existing peer connections.
@nfebe
nfebe force-pushed the feat/cluster-capacity branch from 5b8bf1c to bc69954 Compare August 22, 2026 21:37
@nfebe
nfebe merged commit 9e18ee3 into main Aug 22, 2026
6 checks passed
@nfebe
nfebe deleted the feat/cluster-capacity branch August 22, 2026 21:46
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