From ef9fe4711c1a4a0bb6a0e535993a7f4e3bbe2ad1 Mon Sep 17 00:00:00 2001 From: SBado <16034687+SBado@users.noreply.github.com> Date: Sun, 19 May 2024 13:18:59 +0200 Subject: [PATCH] [2FAuth] Add ability to edit APP_URL env variable (#18960) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** APP_URL env variable is set to http://localhost:8000/ inside values.yaml, so it cannot be overwritten. The chart deploy without errors, but if you try to access the web UI after deployment, you will get a blank page and some errors in the browser's console, because the browser is trying to accesso localhost. This PR add the ability to change the value of APP_URL from the "App Configuration" section of the chart's settings. ⚒️ Fixes _no related issue_ **⚙️ 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?** I'm running 2FAuth with this fix on my machine and it's working flawlessy. **📃 Notes:** None. **✔️ 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 - [X] 🧪 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 **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ 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._ --------- Signed-off-by: SBado <16034687+SBado@users.noreply.github.com> Signed-off-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Signed-off-by: Kjeld Schouten Co-authored-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Co-authored-by: Kjeld Schouten --- charts/stable/twofauth/Chart.yaml | 2 +- charts/stable/twofauth/ci/basic-values.yaml | 1 + charts/stable/twofauth/ci/ingress-values.yaml | 8 ++++++++ charts/stable/twofauth/values.yaml | 3 +-- 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 charts/stable/twofauth/ci/basic-values.yaml create mode 100644 charts/stable/twofauth/ci/ingress-values.yaml diff --git a/charts/stable/twofauth/Chart.yaml b/charts/stable/twofauth/Chart.yaml index 2c0d92a08c3..49977c4e182 100644 --- a/charts/stable/twofauth/Chart.yaml +++ b/charts/stable/twofauth/Chart.yaml @@ -34,4 +34,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/twofauth - https://hub.docker.com/r/2fauth/2fauth type: application -version: 2.0.4 +version: 2.0.5 diff --git a/charts/stable/twofauth/ci/basic-values.yaml b/charts/stable/twofauth/ci/basic-values.yaml new file mode 100644 index 00000000000..d3f5a12faa9 --- /dev/null +++ b/charts/stable/twofauth/ci/basic-values.yaml @@ -0,0 +1 @@ + diff --git a/charts/stable/twofauth/ci/ingress-values.yaml b/charts/stable/twofauth/ci/ingress-values.yaml new file mode 100644 index 00000000000..9442c486853 --- /dev/null +++ b/charts/stable/twofauth/ci/ingress-values.yaml @@ -0,0 +1,8 @@ +ingress: + main: + enabled: true + hosts: + - host: twofauth.example.com + paths: + - path: / + pathType: Prefix diff --git a/charts/stable/twofauth/values.yaml b/charts/stable/twofauth/values.yaml index 6f4ca0d8bab..b9a49ff559e 100644 --- a/charts/stable/twofauth/values.yaml +++ b/charts/stable/twofauth/values.yaml @@ -13,7 +13,6 @@ twofauth: app: name: 2FAuth site_owner: mail@example.com - url: http://localhost:8000 session_lifetime: 120 trusted_proxies: [] mail: @@ -62,7 +61,7 @@ workload: key: APP_KEY APP_NAME: "{{ .Values.twofauth.app.name }}" SITE_OWNER: "{{ .Values.twofauth.app.site_owner }}" - APP_URL: "{{ .Values.twofauth.app.url }}" + APP_URL: "{{ .Values.chartContext.appUrl }}" SESSION_LIFETIME: "{{ .Values.twofauth.app.session_lifetime }}" TRUSTED_PROXIES: '{{ join "," .Values.twofauth.app.trusted_proxies }}' # MAIL