Skip to content

Move SWIM settings under spec.membership.swim, so Local networks carry none #488

Open

Description

@hexfusion

Problem

GridNetwork.spec.swim (gossipNodes, probeInterval, suspicionTimeout) and spec.seeds are top-level fields with schema defaults, so the API server writes them into every GridNetwork, including networks that declare membership.mode: Local. A Local GridNetwork therefore carries SWIM settings that do not apply to it.

  • spec.swim is never read. SwimConfig and its defaults are defined in crates/operator/src/crd/grid_network.rs, and outside that file's tests nothing references it.
  • spec.seeds is read, but only to join SWIM.

Observed on both lab members on v0.3.0-rc.2: each Local GridNetwork carries the defaulted swim block and seeds: [].

Proposal

Move the SWIM settings under the membership mode that uses them, as a discriminated union:

spec:
  membership:
    mode: Swim
    swim:
      seeds: ["east.example:7946"]
      gossipNodes: 3
      probeInterval: 5s
      suspicionTimeout: 10s
---
spec:
  membership:
    mode: Local
  • spec.membership.swim is optional, with no schema default.
  • A CEL rule allows membership.swim only when mode is Swim, alongside the existing rule that Local requires poll.
  • Remove top-level spec.swim and spec.seeds.
  • Wire gossipNodes, probeInterval and suspicionTimeout into the SWIM runtime, or leave them out of membership.swim if nothing should read them.
  • Breaking for v0.3.0. Document the move in the 0.3.x migration guide: a Swim network moves its seeds and swim values under membership.swim; a Local network drops them.

Acceptance criteria

  • A Local GridNetwork has no SWIM fields after admission, and the API refuses one that declares membership.swim.
  • A Swim GridNetwork's membership.swim.seeds are announced to the SWIM runtime as spec.seeds is today.
  • Any SWIM tuning kept under membership.swim reaches the runtime, with a test.
  • docs/architecture/crds.md and the migration guide match the new shape.

Activity

  1. added this to the v0.3.0 milestone on Oct 29, 2026
  2. changed the title [-]GridNetwork spec.swim is defaulted into every network, Local included, and never read[/-] [+]GridNetwork spec.swim and spec.seeds are defaulted into every network, Local included[/+] on Oct 29, 2026
  3. changed the title [-]GridNetwork spec.swim and spec.seeds are defaulted into every network, Local included[/-] [+]Move SWIM settings under spec.membership.swim, so Local networks carry none[/+] on Oct 29, 2026
  4. hexfusion commented on Oct 29, 2026

    @hexfusion
    CollaboratorAuthor

    cc @nerdalert curious your thoughts here

  5. nerdalert commented on Oct 29, 2026

    @nerdalert
    Member

    7. cc @nerdalert curious your thoughts here

    I'm all for it. It helps demystify the combined site topology. Ty!

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions