From 69539807d524e7b2fd1b14dcf2890b91f0c93414 Mon Sep 17 00:00:00 2001 From: Tayyeb Date: Wed, 2 Aug 2017 01:43:48 +0430 Subject: [PATCH] review fixes --- .../1/{docker-compose.yml => docker-compose.yml.tpl} | 5 +++-- templates/gitlab-multi-runner/1/rancher-compose.yml | 10 +++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) rename templates/gitlab-multi-runner/1/{docker-compose.yml => docker-compose.yml.tpl} (89%) diff --git a/templates/gitlab-multi-runner/1/docker-compose.yml b/templates/gitlab-multi-runner/1/docker-compose.yml.tpl similarity index 89% rename from templates/gitlab-multi-runner/1/docker-compose.yml rename to templates/gitlab-multi-runner/1/docker-compose.yml.tpl index f0cabfc..a765ee8 100644 --- a/templates/gitlab-multi-runner/1/docker-compose.yml +++ b/templates/gitlab-multi-runner/1/docker-compose.yml.tpl @@ -27,7 +27,6 @@ services: - /var/run/docker.sock:/var/run/docker.sock - --docker-privileged labels: - io.rancher.container.pull_image: always io.rancher.container.start_once: 'true' gitlab-runner: @@ -42,5 +41,7 @@ services: - run labels: io.rancher.sidekicks: gitlab-runner-config - io.rancher.container.pull_image: always io.rancher.scheduler.global: 'true' + {{- if ne .Values.host_label ""}} + io.rancher.scheduler.affinity:host_label: ${host_label} + {{- end}} diff --git a/templates/gitlab-multi-runner/1/rancher-compose.yml b/templates/gitlab-multi-runner/1/rancher-compose.yml index e2c9479..4c737e4 100644 --- a/templates/gitlab-multi-runner/1/rancher-compose.yml +++ b/templates/gitlab-multi-runner/1/rancher-compose.yml @@ -29,9 +29,17 @@ catalog: default: "dev" required: false + - variable: "host_label" + label: "Host with Label to deploy gitlab-runner on" + description: | + Host label to use as gitlab-runner 'value' tag. + Example: 'gitlab-runner=true' + type: "string" + default: "" + required: false + services: gitlab-runner-config: - scale: 1 start_on_create: true gitlab-runner: start_on_create: true