K8s: Gate distributed component replicas on external datastore#3175
Conversation
Distributor, SessionQueue and SessionMap can scale to multiple replicas only when they share state through an external datastore (Redis/Postgres). Add a seleniumGrid.component.replicaCount helper that honors components.<x>.replicas when that component's externalDatastore is enabled and otherwise forces 1, and use it in the three distributed-mode deployments. This prevents silently broken multi-replica setups (no shared state) while keeping replica counts fully settable from chart values once a datastore is configured. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR Summary by QodoHelm: Gate distributed component replica counts on external datastore
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
What
In distributed mode (
isolateComponents: true), the Distributor, SessionQueue, and SessionMap components can be scaled to multiple replicas only when they share state through an external datastore (Redis/Postgres). This gates the replica count on that datastore so multi-replica setups without shared state can't be created by accident.seleniumGrid.component.replicaCounthelper: it honorscomponents.<x>.replicaswhen that component'sexternalDatastore.enabledis true, and otherwise forces1(nil-safe viadig).distributor,session-queue,session-map.Replica counts remain fully settable from chart values once a datastore is configured — this only prevents the silently-broken case of >1 replica with no shared state.
Why
Running multiple Distributor/SessionQueue/SessionMap replicas without a shared datastore breaks the grid (each replica has independent state). Previously
replicas: {{ max 1 (...) }}allowed >1 regardless of datastore.Verify
helm templatewithisolateComponents=true:helm lintpasses.🤖 Generated with Claude Code