From 6d29aa85c0e6c843874ea560cf80f9d015b8b6d0 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sat, 4 May 2019 14:53:19 -0400 Subject: [PATCH] Added ability to add extra hosts for the runners --- templates/GitLab-Runner/0/docker-compose.yml | 10 +++++++--- templates/GitLab-Runner/0/rancher-compose.yml | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 80f66a2..9862157 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -12,9 +12,6 @@ services: - ${GITLAB_TOKEN} - --executor - "docker" - - --docker-image - - docker:latest - - --docker-privileged {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} - --description - ${GITLAB_RUNNER_DESCRIPTION} @@ -24,6 +21,13 @@ services: - ${GITLAB_TAGS} {{- end}} - --locked=false + - --docker-image + - docker:latest + - --docker-privileged + {{- if .Values.GITLAB_IP}} + - --docker-extra-hosts + - ["gitlab:${GITLAB_IP}"] + {{- end}} {{- if .Values.GITLAB_LINK}} external_links: - ${GITLAB_LINK}{{- if .Values.GITLAB_LINK_ALIAS}}:${GITLAB_LINK_ALIAS}{{- end}} diff --git a/templates/GitLab-Runner/0/rancher-compose.yml b/templates/GitLab-Runner/0/rancher-compose.yml index be2c9f2..72f3f4b 100644 --- a/templates/GitLab-Runner/0/rancher-compose.yml +++ b/templates/GitLab-Runner/0/rancher-compose.yml @@ -66,6 +66,14 @@ catalog: required: false type: string + - variable: "GITLAB_IP" + label: "Local GitLab IP" + description: | + (Optional) The local IP address of the GitLab service. + # default: "" + required: false + type: string + - variable: "DATA_DIR" label: "Data Directory" description: |