Skip to content

fix: scope LoadBalancer lookup to IpfsNode instance and kind - #5

Open
plsgiveup wants to merge 1 commit into
zenith-network:mainfrom
plsgiveup:fix/lb-service-selector
Open

plsgiveup wants to merge 1 commit into
zenith-network:mainfrom
plsgiveup:fix/lb-service-selector

Conversation

@plsgiveup

Copy link
Copy Markdown

Summary

  • Scope the existing LoadBalancer Service lookup to the IpfsNode instance and node kind with one combined label selector.
  • Add a regression test for the Kubernetes list request generated for storage and bootstrap nodes.

Why

ListParams::labels() replaces the prior selector. The second call discarded the instance filter and always selected storage Services, so Services belonging to another IpfsNode could be counted. A new node could then skip creating its own LoadBalancer Service and wait for an external IP that never arrives.

Validation

  • cargo +nightly fmt --all -- --check
  • cargo +nightly check --locked --offline --all-targets --all-features
  • cargo +nightly clippy --locked --offline --all-targets --all-features -- -D warnings
  • cargo +nightly test --locked --offline --all-targets --all-features (1 active test passed; 2 existing telemetry tests remain ignored because they require a trace exporter)
  • Built both ipfs-operator and bootstrap-web Containerfile targets.
  • Ran the controller in a local kind v1.37 cluster with MetalLB. One bootstrap node, two single-replica storage nodes, and a two-replica storage node produced five correctly labeled LoadBalancer Services with distinct external IPs and five Ready IPFS pods. A repeat reconcile preserved the Service UIDs.

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