From 67e2315fa0aa11b2c9b69ddb9d0ad18f2217928f Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 30 Jul 2023 15:05:18 +0300 Subject: [PATCH] fix(authentik): remove blueprints mount (#11033) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ 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/incubator/authentik/Chart.yaml | 2 +- charts/incubator/authentik/questions.yaml | 18 ++++++++++-------- .../incubator/authentik/templates/_config.tpl | 6 +++++- .../incubator/authentik/templates/common.yaml | 5 +++++ charts/incubator/authentik/values.yaml | 19 +++++++++++++------ 5 files changed, 34 insertions(+), 16 deletions(-) diff --git a/charts/incubator/authentik/Chart.yaml b/charts/incubator/authentik/Chart.yaml index daee01a0c6b..34ac557cb20 100644 --- a/charts/incubator/authentik/Chart.yaml +++ b/charts/incubator/authentik/Chart.yaml @@ -23,7 +23,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/authentik - https://github.com/goauthentik/authentik - https://goauthentik.io/docs/ -version: 13.0.9 +version: 13.0.10 annotations: truecharts.org/catagories: | - authentication diff --git a/charts/incubator/authentik/questions.yaml b/charts/incubator/authentik/questions.yaml index d54793b89a1..e4717806118 100644 --- a/charts/incubator/authentik/questions.yaml +++ b/charts/incubator/authentik/questions.yaml @@ -293,6 +293,16 @@ questions: additional_attrs: true type: dict attrs: + - variable: wipeBuiltInDb + label: Wipe Built-In GeoIP DB + description: | + Wipes the built-in GeoIP database.
+ With this set to false, and disabled GeoIP container,
+ It will use the built-in database. + schema: + type: boolean + show_if: [["enabled", "=", false]] + default: false - variable: enabled label: Enabled description: | @@ -569,14 +579,6 @@ questions: additional_attrs: true type: dict attrs: -# Include{persistenceBasic} - - variable: blueprints - label: App Blueprints Storage - description: Stores the Application Blueprints. - schema: - additional_attrs: true - type: dict - attrs: # Include{persistenceBasic} - variable: certs label: App Certs Storage diff --git a/charts/incubator/authentik/templates/_config.tpl b/charts/incubator/authentik/templates/_config.tpl index 849f7e2c8b5..75dacda7771 100644 --- a/charts/incubator/authentik/templates/_config.tpl +++ b/charts/incubator/authentik/templates/_config.tpl @@ -30,8 +30,11 @@ server-worker: {{- $geoipPath := (printf "/geoip/%v.mmdb" .Values.authentik.geoip.editionID) -}} {{- if not .Values.authentik.geoip.enabled -}} {{- $geoipPath = "/tmp/non-existent-file" -}} - {{- end }} + {{- end -}} + + {{- if or .Values.authentik.geoip.enabled .Values.authentik.geoip.wipeBuiltInDb }} AUTHENTIK_GEOIP: {{ $geoipPath }} + {{- end }} {{/* Mail */}} AUTHENTIK_EMAIL__USE_TLS: {{ .Values.authentik.email.useTLS | quote }} @@ -120,6 +123,7 @@ geoip: data: GEOIPUPDATE_EDITION_IDS: {{ .Values.authentik.geoip.editionID }} GEOIPUPDATE_FREQUENCY: {{ .Values.authentik.geoip.frequency | quote }} + GEOIPUPDATE_DB_DIR: {{ .Values.persistence.geoip.targetSelector.geoip.geoip.mountPath | quote }} {{- end -}} {{- end -}} diff --git a/charts/incubator/authentik/templates/common.yaml b/charts/incubator/authentik/templates/common.yaml index 9f1b6424035..e721eb300ec 100644 --- a/charts/incubator/authentik/templates/common.yaml +++ b/charts/incubator/authentik/templates/common.yaml @@ -21,6 +21,11 @@ {{- $_ := set .Values.workload.geoip "enabled" true -}} {{- else -}} {{- $_ := set .Values.workload.geoip "enabled" false -}} + {{- $_ := set .Values.persistence.geoip "enabled" false -}} +{{- end -}} + +{{- if or .Values.authentik.geoip.enabled .Values.authentik.geoip.wipeBuiltInDb -}} + {{- $_ := set .Values.persistence.geoip "enabled" true -}} {{- end -}} {{- if .Values.authentik.outposts.proxy.enabled -}} diff --git a/charts/incubator/authentik/values.yaml b/charts/incubator/authentik/values.yaml index 61fdeb2426f..45ab022490b 100644 --- a/charts/incubator/authentik/values.yaml +++ b/charts/incubator/authentik/values.yaml @@ -67,6 +67,10 @@ authentik: sentryDSN: "" geoip: enabled: false + # Ignored if enabled is true + # If enabled is false, and this is true, the + # built-in GeoIP database will be wiped + wipeBuiltInDb: false editionID: GeoLite2-City frequency: 8 accountID: "" @@ -432,12 +436,15 @@ persistence: worker: worker: mountPath: /templates - blueprints: - enabled: true - targetSelector: - worker: - worker: - mountPath: /blueprints + # - Enabling this will override the + # - default blueprints and initialisation + # - will fail. + # blueprints: + # enabled: true + # targetSelector: + # worker: + # worker: + # mountPath: /blueprints certs: enabled: true mountPath: /certs