From 02a22714de5f65c6e76675519eb32d73b8c8edca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roy?= Date: Fri, 5 May 2023 23:46:59 -0700 Subject: [PATCH] fix(portainer) portainer requires automountServiceAccountToken true (#8791) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Set `automountServiceAccountToken: true` for portainer's main pod. Without this, the token is not projected into the container and portainer fails to connect to the local cluster. ``` error.go:34 > HTTP error | error="open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory" msg="Unable to initiate communications with environment" status_code=500 ``` **โš™๏ธ Type of change** - [ ] โš™๏ธ Feature/App addition - [x] ๐Ÿช› Bugfix - [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] ๐Ÿ”ƒ Refactor of current code **๐Ÿงช How Has This Been Tested?** Run `helm template --namespace=ix-portainer .` in the chart and verify that the output contains `automountServiceAccountToken: true` in the `Deployment` object's `spec.template.spec`. Mutated an existing portainer app's `Deployment` object with kubectl to add `automountServiceAccountToken: true` and verified it could then connect to the local cluster. **๐Ÿ“ƒ Notes:** **โœ”๏ธ Checklist:** - [x] โš–๏ธ My code follows the style guidelines of this project - [x] ๐Ÿ‘€ I have performed a self-review of my own code - [ ] #๏ธโƒฃ I have commented my code, particularly in hard-to-understand areas - [ ] ๐Ÿ“„ I have made corresponding changes to the documentation - [x] โš ๏ธ My changes generate no new warnings - [ ] ๐Ÿงช I have added tests to this description that prove my fix is effective or that my feature works - [x] โฌ†๏ธ I increased versions for any altered app according to semantic versioning --- charts/stable/portainer/Chart.yaml | 2 +- charts/stable/portainer/values.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/stable/portainer/Chart.yaml b/charts/stable/portainer/Chart.yaml index cbca48dbaf4..ee60d4439c0 100644 --- a/charts/stable/portainer/Chart.yaml +++ b/charts/stable/portainer/Chart.yaml @@ -19,7 +19,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/portainer - https://docs.portainer.io/start/install-ce/server - https://docs.portainer.io/start/install/server -version: 4.0.2 +version: 4.0.3 annotations: truecharts.org/catagories: | - management diff --git a/charts/stable/portainer/values.yaml b/charts/stable/portainer/values.yaml index 04c7a224549..d20835d5124 100644 --- a/charts/stable/portainer/values.yaml +++ b/charts/stable/portainer/values.yaml @@ -63,6 +63,7 @@ portal: workload: main: podSpec: + automountServiceAccountToken: true containers: main: imageSelector: image