refactor(seinetwork): move CR-read sites onto canonical sei.io/seinetwork keys (Wave A)#483
Conversation
…/seinetwork keys (Wave A)
The controller dual-stamps both sei.io/nodedeployment{,-ordinal} (frozen
GitOps selector keys) and sei.io/seinetwork{,-ordinal} (canonical) on every
SeiNetwork child. This moves the code that reads/selects child SeiNode *CRs*
onto the canonical keys, without touching the internal-Service pod selector
or the label stamp.
- labels.go: split the shared selector — groupSelector stays frozen
(nodedeployment) for the internal ClusterIP Service pod selector; new
seinetworkSelector (canonical) backs CR-listing.
- nodes.go (listChildSeiNodes, scaleDown list + ordinal parse),
per_pod_services.go (ordinal read), cmd/main.go (assembler-node select),
await_nodes_running.go (listTargetNodes): read via the canonical keys.
- api doc-comments describe seinetwork as primary, nodedeployment as
retained-for-selector-continuity; regenerated CRD YAML (description-only).
No behavior change: every SeiNetwork child carries both key families and all
these read-sites are SeiNetwork-children-scoped, so the selected set is
identical. Pod selector (internal_service.go) and the stamp are unchanged, so
zero pod roll; the internal-Service selector flip is Wave B (fleet-cycle
gated). Standalone SeiNodes (not SeiNetwork children) are never selected here.
Reviewed via /xreview (kubernetes-specialist dissenter + idiomatic-reviewer),
RESOLVED; deployment precondition verified (15/15 SeiNetwork children carry
the canonical label).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR SummaryMedium Risk Overview
API and regenerated CRD YAML updates are description-only, framing Reviewed by Cursor Bugbot for commit 8e5d2fa. Bugbot is set up for automated code reviews on this repo. Configure here. |
Wave A of the
sei.io/nodedeployment→sei.io/seinetworknomenclature migration: move the code that reads/selects SeiNode CRs onto the canonical keys. Zero pod roll; the internal-Service pod selector (Wave B) and the label stamp are untouched.What
labels.go— split the shared selector:groupSelectorstays on the frozennodedeploymentkey for the internal ClusterIP Service pod selector; newseinetworkSelector(canonical) backs CR-listing.nodes.go(listChildSeiNodes,scaleDownlist + ordinal parse),per_pod_services.go(ordinal read),cmd/main.go(assembler-node select),internal/task/await_nodes_running.go(listTargetNodes— confirmed listsSeiNodeList, not pods).seinetworkas primary /nodedeploymentas retained-for-continuity; regenerated CRD YAML (description-only, no served-schema/CEL change).Why it's a no-op / zero-roll
Every SeiNetwork child is dual-stamped with both key families, and all these read-sites are SeiNetwork-children-scoped (list by
sei.io/seinetwork=<network.name>within a SeiNetwork reconcile), so the selected set is identical. The internal-Service pod selector and the stamp are unchanged → nothing rolls. Standalone SeiNodes (not children of any SeiNetwork) are never selected by these sites.Kept for Wave B / follow-up
internal_service.go:94pod-selector flip — Wave B, gated on the fleet fully cycling (kubectl get pods -A -l 'sei.io/nodedeployment,!sei.io/seinetwork'empty).api/v1alpha1const forsei.io/seinetwork(retire the raw literals +sdk/sei's aspirational "single source of truth") — endorsed follow-up.Review
/xreview— Class component, T2. kubernetes-specialist (dissenter) + idiomatic-reviewer: both RATIFY. Verified pod-selector + stamp untouched, all migrated sites are CR readers, the selector split is correct, CRD diff description-only. Deployment precondition empirically verified: all 15 SeiNetwork-child SeiNodes on harbor carry the canonical label (prod's standalone nodes correctly don't, and are never selected). Build +seinetwork/tasktests + envtest green.🤖 Generated with Claude Code