From 420b19d50586d67660d0d59047622fcf85f204f4 Mon Sep 17 00:00:00 2001 From: Frederic MARTIN Date: Wed, 12 Jun 2024 15:57:12 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20expose=20init-shared-path=20readOnl?= =?UTF-8?q?y=20var=20(#393)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ expose init-shared-path readOnly var * Update charts/atlantis/values.schema.json Co-authored-by: Gabriel Martinez <19713226+GMartinez-Sisti@users.noreply.github.com> * ⬆️ bump minor version * 📝 update doc template + gen --------- Co-authored-by: Gabriel Martinez <19713226+GMartinez-Sisti@users.noreply.github.com> --- charts/atlantis/Chart.yaml | 2 +- charts/atlantis/README.md | 5 +++-- charts/atlantis/README.md.gotmpl | 4 ++-- charts/atlantis/templates/statefulset.yaml | 2 +- charts/atlantis/values.schema.json | 4 ++++ charts/atlantis/values.yaml | 1 + 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/charts/atlantis/Chart.yaml b/charts/atlantis/Chart.yaml index e833de26..bc34e3b4 100644 --- a/charts/atlantis/Chart.yaml +++ b/charts/atlantis/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v1 appVersion: v0.28.1 description: A Helm chart for Atlantis https://www.runatlantis.io name: atlantis -version: 5.1.1 +version: 5.1.2 keywords: - terraform home: https://www.runatlantis.io diff --git a/charts/atlantis/README.md b/charts/atlantis/README.md index 9f878ad4..bd9b052d 100644 --- a/charts/atlantis/README.md +++ b/charts/atlantis/README.md @@ -137,6 +137,7 @@ extraManifests: | initConfig.script | string | Check values.yaml. | Script to run on the init container. | | initConfig.securityContext | object | `{}` | Security context for the container. | | initConfig.sharedDir | string | `"/plugins"` | SharedDir is set as env var INIT_SHARED_DIR. | +| initConfig.sharedDirReadOnly | bool | `true` | | | initConfig.sizeLimit | string | `"100Mi"` | Size for the shared volume. | | initConfig.workDir | string | `"/tmp"` | | | initContainers | list | `[]` | Optionally specify init containers manifests to be added to the Atlantis pod. Check values.yaml for examples. | @@ -384,9 +385,9 @@ To perform a smoke test of the deployment (i.e. ensure that the Atlantis UI is u ## Update documentation -Documentations is auto-generated using [helm-docs](https://github.com/norwoodj/helm-docs). +Documentation is auto-generated using [helm-docs](https://github.com/norwoodj/helm-docs). -To update run the follwogin (from the root path of the repository): +To update run the following (from the root path of the repository): 1. If required, update `charts/atlantis/README.md.gotmpl` 2. Run `make docs` diff --git a/charts/atlantis/README.md.gotmpl b/charts/atlantis/README.md.gotmpl index 4694ba8a..6be28009 100644 --- a/charts/atlantis/README.md.gotmpl +++ b/charts/atlantis/README.md.gotmpl @@ -219,9 +219,9 @@ To perform a smoke test of the deployment (i.e. ensure that the Atlantis UI is u ## Update documentation -Documentations is auto-generated using [helm-docs](https://github.com/norwoodj/helm-docs). +Documentation is auto-generated using [helm-docs](https://github.com/norwoodj/helm-docs). -To update run the follwogin (from the root path of the repository): +To update run the following (from the root path of the repository): 1. If required, update `charts/atlantis/README.md.gotmpl` 2. Run `make docs` diff --git a/charts/atlantis/templates/statefulset.yaml b/charts/atlantis/templates/statefulset.yaml index aa11e5ba..98134567 100644 --- a/charts/atlantis/templates/statefulset.yaml +++ b/charts/atlantis/templates/statefulset.yaml @@ -567,7 +567,7 @@ spec: {{- if .Values.initConfig.enabled }} - name: init-shared-path mountPath: {{ .Values.initConfig.sharedDir }} - readOnly: true + readOnly: {{ .Values.initConfig.sharedDirReadOnly }} {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/charts/atlantis/values.schema.json b/charts/atlantis/values.schema.json index 73ae7d7b..8163ab6e 100644 --- a/charts/atlantis/values.schema.json +++ b/charts/atlantis/values.schema.json @@ -1010,6 +1010,10 @@ "type": "string", "description": "sharedDir is set as env var INIT_SHARED_DIR" }, + "sharedDirReadOnly": { + "type": "boolean", + "description": "Sets permissions level for the SharedDir in the main container to ReadWrite when true or ReadWrite when false" + }, "workDir": { "type": "string", "description": "Starting directory for the script" diff --git a/charts/atlantis/values.yaml b/charts/atlantis/values.yaml index 7923796c..a72e5e5d 100644 --- a/charts/atlantis/values.yaml +++ b/charts/atlantis/values.yaml @@ -564,6 +564,7 @@ initConfig: imagePullPolicy: IfNotPresent # -- SharedDir is set as env var INIT_SHARED_DIR. sharedDir: /plugins + sharedDirReadOnly: true workDir: /tmp # -- Size for the shared volume. sizeLimit: 100Mi