Support Embedded Action Cable in Helm Charts
Summary
We introduced support for running Action Cable in embedded mode in Omnibus gitlab-org/omnibus-gitlab!4407 (merged). It can be enabled by setting the ACTION_CABLE_IN_APP
environment variable. This was enabled in docker-compose in gitlab-org/build/CNG!504 (merged).
We need to expose this environment variable via the Helm chart so that it can be set on webservice
pods when deployed via K8s.
We should also support setting the ACTION_CABLE_WORKER_POOL_SIZE
environment variable. Both are non-secret.
We've also created a container specifically for running Action Cable in a standalone Puma server so it can be scaled independently. This is probably what will be used on gitlab.com and Helm chart work towards that is being tracked in #2284 (closed).
See also: #2043 (closed)
Detail
In Omnibus
- Action Cable is disabled by default;
- Action Cable is enabled in Omnibus using the
actioncable['enabled']
setting; - By default, a separate Action Cable server is started that only serves WebSocket connections. To run it in embedded mode, as part of the same Puma server, the
actioncable['in_app']
setting is used, and - Action Cable thread pool size is configured with the
actioncable['worker_pool_size']
.
In CNG
- A separate
actioncable
container exists, which can be scaled independently; - Action Cable can be run in embedded mode on the
webservice
container by passing in theACTION_CABLE_IN_APP
envvar; - Max AC thread pool size is configured with the
ACTION_CABLE_WORKER_POOL_SIZE
environment variable, and - Workhorse accepts a
cableBackend
argument which accepts a service name and port and can proxy WebSocket requests to the correct service. It defaults to the same as theauthBackend
setting.
An example of a setup proxying requests to a webservice
container running embedded Action Cable is in the CNG docker-compose.yml file.
Currently, Action Cable is only supported for the Puma server, not Unicorn.
Proposal
Modify GitLab Helm chart to allow configuration of Action Cable in embedded mode.