Add interactive web terminal support in helm chart
Description
A deficiency in our docs was kindly pointed out over at gitlab-runner#3713 where it's not very clear on how to the web terminals when using the GitLab runner helm charts. After some investigation, if it's actually possible on how to set up interactive web terminal with helm chart it's possible but requires the user to modify the helm chart which prevents the user from updating to the new version when they are released.
Proposal
Overview
- Invtestage if it's actually possible out of the box, if not create separate issues to and tackle them
- There might some work needed on the helm charts, which most likely require help from ~Distribution (needs investigation) EDIT: This does need a lot of work for the helm chart to support since services and container ports need to be created.
- Write down documentation on how to do it.
https://gitlab.com/charts/gitlab-runner
UpdateThere are few updated that needs to be made for the helm chart to support web terminals which are explained below and are taken from gitlab-runner#3713 (comment 125855357)
- The default configuration to set up the session server, the port for the
session_server.listen_address
will need to be taken note of since it will need to be exposed later in step 2 - The runner container needs to expose a new port for the session server. The session server is what serves the information for the web terminal so the gitlab instance needs to communicate to the gitlab runner. The port that it needs to expose is the one defined in
session_server.listen_address
from theconfig.toml
file from step 1 - Register a new service a
LoadBalancer
type might be the best option that exposes that port from step 2 to the external service. A good example of that service can be found in step 2 of gitlab-runner#3713 (comment 125855357) - Update the runner
config.toml
specifically thesession_server
table withadvertise_address
with the value of the ip:port of the service created in step 3. This is needed becausegitlab-runner
will tell GitLab.com or the self-hosted gitlab instance that to start the terminal it needs to through the following service. As pointed out by @WarheadsSE in gitlab-runner#3713 (comment 125908832) this might be a bit tricky since we would need to first wait for the service to be created and then get the information and then update theconfig.toml
Make it configurable
We don't have to expose the terminal by default this could be done by a configuration in values.yml where the user can toggle it on and off.
Links to related issues and merge requests/references
Edited by Steve Xuereb