Skip to content

Commit

Permalink
made docker-machine options configurable, restructured chart values
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhiendl committed Sep 23, 2022
1 parent 6d35815 commit a6aff70
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/gitlab-runner-hetzner-autoscale/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: gitlab-runner-hetzner-autoscale
name: gitlab-runner-hetzner-autoscale
version: 0.0.2
version: 0.0.3
appVersion: v0.1
keywords:
- gitlab-runner
Expand Down
14 changes: 7 additions & 7 deletions charts/gitlab-runner-hetzner-autoscale/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ type: Opaque

stringData:

REGISTRATION_TOKEN: {{ .Values.registrationToken | quote }}
CI_SERVER_URL: {{ .Values.ciServerUrl | quote }}
REGISTRATION_TOKEN: {{ .Values.runner.registrationToken | quote }}
CI_SERVER_URL: {{ .Values.runner.ciServerUrl | quote }}

register.sh: |
{{ .Files.Get "files/register.sh" | indent 4 | trim }}
Expand All @@ -28,7 +28,7 @@ stringData:
[[runners]]
name = "test-runner"
url = "https://gitlab.com/"
url = "{{ .Values.runner.ciServerUrl }}"
pre_clone_script = "eval \"$CI_PRE_CLONE_SCRIPT\""
executor = "docker+machine"
environment = [
Expand Down Expand Up @@ -65,16 +65,16 @@ stringData:
MachineOptions = [
"hetzner-api-token={{ .Values.hetznerApiToken }}",
# "hetzner-image-id=32116616",
"hetzner-image=ubuntu-20.04",
"hetzner-image={{ .Values.hetzner.image }}",
# "hetzner-image=debian-10",
"hetzner-server-location=ash",
"hetzner-server-type=cpx21",
"hetzner-server-location={{ .Values.hetzner.serverLocation }}",
"hetzner-server-type={{ .Values.hetzner.serverType }}",
# see for available versions: https://github.com/rancher/install-docker/tree/master/dist
# "engine-install-url=https://releases.rancher.com/install-docker/19.03.15.sh"
# "engine-install-url=https://s3.eu-central-1.wasabisys.com/dhswt-public/scripts/noop.sh"
# "engine-install-url=https://raw.githubusercontent.com/davidhiendl/gitlab-runner-hetzner-autoscale/master/chart/install-scripts/hetzner-ubuntu-docker-fastinstall.sh"
# "engine-install-url=https://s3.eu-central-1.wasabisys.com/dhswt-public/scripts/hetzner-ubuntu-docker-fastinstall.sh"
"engine-install-url=https://raw.githubusercontent.com/davidhiendl/gitlab-runner-hetzner-autoscale/master/charts/gitlab-runner-hetzner-autoscale/install-scripts/hetzner-ubuntu-docker-fastinstall.sh"
"engine-install-url={{ .Values.hetzner.engineInstallUrl }}"
]
OffPeakTimezone = ""
OffPeakIdleCount = 0
Expand Down
14 changes: 11 additions & 3 deletions charts/gitlab-runner-hetzner-autoscale/values.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
image: ghcr.io/davidhiendl/gitlab-runner-hetzner-autoscale:master
pullPolicy: Always
registrationToken: ""
ciServerUrl: "https://gitlab.com/"
hetznerApiToken: ""

hetzner:
apiToken:
engineInstallUrl: "https://raw.githubusercontent.com/davidhiendl/gitlab-runner-hetzner-autoscale/master/charts/gitlab-runner-hetzner-autoscale/install-scripts/hetzner-ubuntu-docker-fastinstall.sh"
serverType: "cpx21"
serverLocation: "nbg1"
image: "ubuntu-20.04"

runner:
registrationToken: ""
ciServerUrl: "https://gitlab.com/"

resources:
requests:
Expand Down

0 comments on commit a6aff70

Please sign in to comment.