Add support for interactive web terminal
What does this MR do?
Add support of web interactive terminal to GitLab Runner Helm Chart
Why was this MR needed?
What's the best way to test this MR?
- Create a k8s cluster on GKE
- Update the
values.yaml
file as follow:
values.yaml
image: gitlab/gitlab-runner:alpine3.12-bleeding
imagePullPolicy: IfNotPresent
replicas: 1
gitlabUrl: https://gitlab.com/
runnerRegistrationToken: "YOUR_TOKEN"
terminationGracePeriodSeconds: 3600
concurrent: 1
checkInterval: 0
sessionServer:
enabled: true
# timeout: 1800
# internalPort: 8093
# externalPort: 9000
## For RBAC support:
rbac:
create: true
rules: []
clusterWideAccess: false
podSecurityPolicy:
enabled: false
resourceNames:
- gitlab-runner
metrics:
enabled: true
portName: metrics
port: 9252
serviceMonitor:
enabled: false
service:
enabled: false
type: ClusterIP
## Configuration for the Pods that the runner launches for each new job
##
runners:
config: |
[[runners]]
[runners.kubernetes]
namespace = "{{.Release.Namespace}}"
image = "ubuntu:16.04"
cache: {}
builds: {}
services: {}
helpers: {}
securityContext:
runAsUser: 100
fsGroup: 65533
resources: {}
affinity: {}
nodeSelector: {}
tolerations: []
hostAliases: []
podAnnotations: {}
podLabels: {}
secrets: []
configMaps: {}
- Install runner with the following command:
helm install gitlab-runner -f values.yaml .
- Start a new job using the gitlab-ci file below
gitlab-ci
variables:
GIT_STRATEGY: clone
DURATION: 600
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "false"
job:
script:
- 'for i in $(seq 1 $DURATION); do echo $(date); sleep 1; done'
- echo "done :-)"
- The
Debug console
button will be available on the job logs page and once opened the web interactive console will be accessible as shown below
What are the relevant issue numbers?
Closes: #79 (closed)
Edited by Romuald Atchadé