From eefb48ba3f46f6cb2dfb1696ef44950506630b6f Mon Sep 17 00:00:00 2001 From: brunocous Date: Mon, 22 Nov 2021 20:03:09 +0100 Subject: [PATCH] add `additionalVolumes` and `additionalVolumeMounts` to helm chart (#952) * added additional volumes and volumeMounts --- charts/actions-runner-controller/README.md | 2 ++ .../templates/deployment.yaml | 6 ++++++ charts/actions-runner-controller/values.yaml | 10 +++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/charts/actions-runner-controller/README.md b/charts/actions-runner-controller/README.md index 44587c55..6226c36b 100644 --- a/charts/actions-runner-controller/README.md +++ b/charts/actions-runner-controller/README.md @@ -18,6 +18,8 @@ All additional docs are kept in the `docs/` folder, this README is solely for do | `githubAPICacheDuration` | Set the cache period for API calls | | | `githubEnterpriseServerURL` | Set the URL for a self-hosted GitHub Enterprise Server | | | `logLevel` | Set the log level of the controller container | | +| `additionalVolumes` | Set additional volumes to add to the manager container | | +| `additionalVolumeMounts` | Set additional volume mounts to add to the manager container | | | `authSecret.create` | Deploy the controller auth secret | false | | `authSecret.name` | Set the name of the auth secret | controller-manager | | `authSecret.annotations` | Set annotations for the auth Secret | | diff --git a/charts/actions-runner-controller/templates/deployment.yaml b/charts/actions-runner-controller/templates/deployment.yaml index b15ff98f..6bce76c7 100644 --- a/charts/actions-runner-controller/templates/deployment.yaml +++ b/charts/actions-runner-controller/templates/deployment.yaml @@ -114,6 +114,9 @@ spec: - mountPath: /tmp/k8s-webhook-server/serving-certs name: cert readOnly: true + {{- if .Values.additionalVolumeMounts }} + {{- toYaml .Values.additionalVolumeMounts | nindent 10 }} + {{- end }} {{- if .Values.metrics.proxy.enabled }} - args: - "--secure-listen-address=0.0.0.0:{{ .Values.metrics.port }}" @@ -142,6 +145,9 @@ spec: secretName: {{ include "actions-runner-controller.servingCertName" . }} - name: tmp emptyDir: {} + {{- if .Values.additionalVolumes }} + {{- toYaml .Values.additionalVolumes | nindent 8}} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/actions-runner-controller/values.yaml b/charts/actions-runner-controller/values.yaml index db35c2ff..6a5abeb9 100644 --- a/charts/actions-runner-controller/values.yaml +++ b/charts/actions-runner-controller/values.yaml @@ -126,6 +126,14 @@ env: # https_proxy: "proxy.com:8080" # no_proxy: "" +## specify additional volumes to mount in the manager container, this can be used +## to specify additional storage of material or to inject files from ConfigMaps +## into the running container +additionalVolumes: [] + +## specify where the additional volumes are mounted in the manager container +additionalVolumeMounts: [] + scope: # If true, the controller will only watch custom resources in a single namespace singleNamespace: false @@ -190,4 +198,4 @@ githubWebhookServer: podDisruptionBudget: enabled: false # minAvailable: 1 - # maxUnavailable: 3 \ No newline at end of file + # maxUnavailable: 3