From d2c497305ad73f2c833c210d27513235833d7afd Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:45:29 +0300 Subject: [PATCH] fix(tailscale): mount service account token and fix secret (#7978) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes #7971 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 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?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 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 - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- charts/stable/tailscale/Chart.yaml | 2 +- charts/stable/tailscale/templates/common.yaml | 5 +---- charts/stable/tailscale/values.yaml | 13 +++++++++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/charts/stable/tailscale/Chart.yaml b/charts/stable/tailscale/Chart.yaml index e5343e48307..13342042aa8 100644 --- a/charts/stable/tailscale/Chart.yaml +++ b/charts/stable/tailscale/Chart.yaml @@ -19,7 +19,7 @@ name: tailscale sources: - https://github.com/truecharts/charts/tree/master/charts/stable/tailscale - https://github.com/tailscale/tailscale/blob/main/docs/k8s/run.sh -version: 4.0.4 +version: 4.0.5 annotations: truecharts.org/catagories: | - network diff --git a/charts/stable/tailscale/templates/common.yaml b/charts/stable/tailscale/templates/common.yaml index b8f8b1435e4..2ece816da1a 100644 --- a/charts/stable/tailscale/templates/common.yaml +++ b/charts/stable/tailscale/templates/common.yaml @@ -1,9 +1,6 @@ {{/* Make sure all variables are set properly */}} {{- include "tc.v1.common.loader.init" . }} -{{/* Render secret */}} -{{- include "tailscale.secret" . }} - {{/* Render configmap for tailscale */}} {{- $configmap := include "tailscale.config" . | fromYaml -}} {{- if $configmap -}} @@ -11,7 +8,7 @@ {{- end -}} {{/* Render secret for tailscale */}} -{{- $secret := include "tailscale.config" . | fromYaml -}} +{{- $secret := include "tailscale.secret" . | fromYaml -}} {{- if $secret -}} {{- $_ := set .Values.secret "tailscale-secret" $secret -}} {{- end -}} diff --git a/charts/stable/tailscale/values.yaml b/charts/stable/tailscale/values.yaml index a0346ce7025..c31051beecc 100644 --- a/charts/stable/tailscale/values.yaml +++ b/charts/stable/tailscale/values.yaml @@ -72,15 +72,28 @@ securityContext: workload: main: podSpec: + automountServiceAccountToken: true containers: main: probes: liveness: enabled: false + type: exec + command: + - tailscale + - status readiness: enabled: false + type: exec + command: + - tailscale + - status startup: enabled: false + type: exec + command: + - tailscale + - status envFrom: - configMapRef: name: "tailscale-config"