From b1bfa8787f56e00a655d76f8174395a71c140576 Mon Sep 17 00:00:00 2001 From: Sebastien Le Digabel Date: Wed, 30 Jun 2021 01:53:45 +0100 Subject: [PATCH] Optional override of runner image in chart (#666) * Optional override of runner image in chart This commit adds the option to override the actions runner image. This allows running the controller in environments where access to Dockerhub is restricted. It uses the parameter [--runner-image](https://github.com/actions-runner-controller/actions-runner-controller/blob/master/main.go#L89) from the controller. The default value is set as a constant [here](https://github.com/actions-runner-controller/actions-runner-controller/blob/acb906164b6cc8b3604fa816cd3a99acffe991a2/main.go#L40). The default value for the chart is the same. * Fixing actionsRunner name ... to actionsRunnerRepositoryAndTag for consistency. * Bumping chart to v0.12.5 --- charts/actions-runner-controller/Chart.yaml | 2 +- charts/actions-runner-controller/README.md | 1 + charts/actions-runner-controller/templates/deployment.yaml | 1 + charts/actions-runner-controller/values.yaml | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/charts/actions-runner-controller/Chart.yaml b/charts/actions-runner-controller/Chart.yaml index 68c9bc58..6eff93ee 100644 --- a/charts/actions-runner-controller/Chart.yaml +++ b/charts/actions-runner-controller/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.12.4 +version: 0.12.5 # Used as the default manager tag value when no tag property is provided in the values.yaml appVersion: 0.19.0 diff --git a/charts/actions-runner-controller/README.md b/charts/actions-runner-controller/README.md index 7e20e725..91c3608a 100644 --- a/charts/actions-runner-controller/README.md +++ b/charts/actions-runner-controller/README.md @@ -24,6 +24,7 @@ _Default values are the defaults set in the charts values.yaml, some properties | `authSecret.github_token` | Your chosen GitHub PAT token. **This can't be set at the same time as the `authSecret.github_app_*`** | | | `image.repository` | The "repository/image" of the controller container | summerwind/actions-runner-controller | | `image.tag` | The tag of the controller container | | +| `image.actionsRunnerRepositoryAndTag` | The "repository/image" of the actions runner container | summerwind/actions-runner:latest | | `image.dindSidecarRepositoryAndTag` | The "repository/image" of the dind sidecar container | docker:dind | | `image.pullPolicy` | The pull policy of the controller image | IfNotPresent | | `metrics.serviceMonitor` | Deploy serviceMonitor kind for for use with prometheus-operator CRDs | false | diff --git a/charts/actions-runner-controller/templates/deployment.yaml b/charts/actions-runner-controller/templates/deployment.yaml index fdd32b7d..c1cc8e02 100644 --- a/charts/actions-runner-controller/templates/deployment.yaml +++ b/charts/actions-runner-controller/templates/deployment.yaml @@ -40,6 +40,7 @@ spec: - "--enable-leader-election" - "--sync-period={{ .Values.syncPeriod }}" - "--docker-image={{ .Values.image.dindSidecarRepositoryAndTag }}" + - "--runner-image={{ .Values.image.actionsRunnerRepositoryAndTag }}" {{- if .Values.scope.singleNamespace }} - "--watch-namespace={{ default .Release.Namespace .Values.scope.watchNamespace }}" {{- end }} diff --git a/charts/actions-runner-controller/values.yaml b/charts/actions-runner-controller/values.yaml index 90714c68..73a5c800 100644 --- a/charts/actions-runner-controller/values.yaml +++ b/charts/actions-runner-controller/values.yaml @@ -29,7 +29,8 @@ authSecret: #github_token: "" image: - repository: summerwind/actions-runner-controller + repository: "summerwind/actions-runner-controller" + actionsRunnerRepositoryAndTag: "summerwind/actions-runner:latest" dindSidecarRepositoryAndTag: "docker:dind" pullPolicy: IfNotPresent