Add the streaming-worker subchart - #244
Merged
Merged
Conversation
Adds the `lago-rails` alias that consumes the `streaming` Sidekiq queue, gated on `global.sidekiq.queues.streaming`. It runs `./scripts/start.streaming.worker.sh` (config/sidekiq/sidekiq_streaming.yml), which lago-api adds in getlago/lago-api#6298. The alias renders no enqueue-side env var, unlike alerts, wallets, and aiAgent. `DeliverEventJob` is pinned to the queue with `queue_as :streaming`, and nothing is enqueued unless the organization holds a `streaming_destinations` row. So a cluster that leaves the toggle off never fills the queue, and no rails pod needs a `SIDEKIQ_STREAMING` flag. The worker writes to a customer transport through `sts:AssumeRole`, so its pod needs an AWS identity the other workers do not have. The lago-rails ServiceAccount values carry that: `serviceAccount.create` and `serviceAccount.name` let a cluster bind the pods to one fixed account, which is what EKS Pod Identity needs, since it maps one account to one role with no wildcard. Verified with `helm unittest charts/lago` (65 PASS, 4 of them new) and `helm template`: the toggle off renders nothing, and on it renders the Deployment with the start script plus its own ServiceAccount. Refs INF-415
IxDay
approved these changes
Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The streaming events feature needs a Sidekiq worker with an AWS identity of
its own. The lago-api side is getlago/lago-api#6298, which adds
config/sidekiq/sidekiq_streaming.ymlandscripts/start.streaming.worker.sh, and states that the worker deployment isinfrastructure work. Tracked as INF-415.
Description
Adds the
lago-railsaliasstreaming-worker, gated onglobal.sidekiq.queues.streamingand off by default. It runs./scripts/start.streaming.worker.sh, which consumes the hard-codedstreamingqueue.The alias renders no enqueue-side env var, unlike
alerts,wallets, andaiAgent.DeliverEventJobis pinned to the queue withqueue_as :streaming, and nothing is enqueued unless the organization holds astreaming_destinationsrow. So a cluster that leaves the toggle off neverfills the queue, and no rails pod needs a
SIDEKIQ_STREAMINGflag.The worker writes to a customer transport through
sts:AssumeRole, so its podneeds an identity the other workers do not have. The lago-rails
serviceAccount.createandserviceAccount.namevalues cover that: a clustercan bind the pods to one fixed account. EKS Pod Identity maps one account to
one role with no wildcard, and preview releases name their accounts per
branch, so the fixed account is what keeps that to a single association.
Verification
helm unittest charts/lago— 65 pass in 8 suites, 4 cases new:serviceAccount.create: falseplus a name binds the pods to that account,helm templatewith the toggle off renders nolago-streaming-workerobject.With it on it renders
rel-lago-streaming-workeras a Deployment and aServiceAccount, with
command: ["./scripts/start.streaming.worker.sh"].Notes for review
chart-release.ymlbumps every chart and commits it,so the release is a
workflow_dispatchonlago-v2after this merges.charts/lago/README.mdis not regenerated.helm-docsgives 91 lines ofdiff because the checked-in file is stale since
0.6.0, and neither theai-agent-worker commit nor the architecture split touched it.
Chart.lockmoved becausehelm dependency updateis needed to run the unittests.