From f5a9d16dda7a7fb26de7eae0285878c795d2723a Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 30 Jul 2023 15:42:50 +0300 Subject: [PATCH] fix(authentik): fix bluieprints (#11041) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ 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?** **📃 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 | 17 +++++++++++++++++ .../incubator/authentik/templates/common.yaml | 4 ++++ charts/incubator/authentik/values.yaml | 19 ++++++++++--------- 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/charts/incubator/authentik/Chart.yaml b/charts/incubator/authentik/Chart.yaml index 34ac557cb20..adacb1e4f72 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.10 +version: 13.0.11 annotations: truecharts.org/catagories: | - authentication diff --git a/charts/incubator/authentik/questions.yaml b/charts/incubator/authentik/questions.yaml index e4717806118..c587fe44296 100644 --- a/charts/incubator/authentik/questions.yaml +++ b/charts/incubator/authentik/questions.yaml @@ -98,6 +98,15 @@ questions: schema: type: boolean default: true + - variable: overwriteDefaultBlueprints + label: Overwrite Default Blueprints + description: | + When enabled, all the default blueprints will be overwritten
+ True: mountPath: /blueprints
+ False: mountPath: /blueprints/custom + schema: + type: boolean + default: false - variable: tokenLength label: Token Length description: Configure the length of generated tokens @@ -579,6 +588,14 @@ 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/common.yaml b/charts/incubator/authentik/templates/common.yaml index e721eb300ec..f60f125473f 100644 --- a/charts/incubator/authentik/templates/common.yaml +++ b/charts/incubator/authentik/templates/common.yaml @@ -17,6 +17,10 @@ {{- $_ := set .Values "configmap" $configmaps -}} {{- end -}} +{{- if .Values.authentik.general.overwriteDefaultBlueprints -}} + {{- $_ := set .Values.persistence.blueprints.targetSelector.worker.worker "mountPath" "/blueprints" -}} +{{- end -}} + {{- if .Values.authentik.geoip.enabled -}} {{- $_ := set .Values.workload.geoip "enabled" true -}} {{- else -}} diff --git a/charts/incubator/authentik/values.yaml b/charts/incubator/authentik/values.yaml index 45ab022490b..4194d93107f 100644 --- a/charts/incubator/authentik/values.yaml +++ b/charts/incubator/authentik/values.yaml @@ -36,6 +36,7 @@ authentik: allowUserChangeName: true allowUserChangeEmail: true allowUserChangeUsername: true + overwriteDefaultBlueprints: false gdprCompliance: true tokenLength: 128 impersonation: true @@ -436,15 +437,15 @@ persistence: worker: worker: mountPath: /templates - # - Enabling this will override the - # - default blueprints and initialisation - # - will fail. - # blueprints: - # enabled: true - # targetSelector: - # worker: - # worker: - # mountPath: /blueprints + blueprints: + enabled: true + targetSelector: + worker: + worker: + # This will automatically change to `/blueprints` + # if `overwriteDefaultBlueprints` is set to `true + # Otherwise it will respect the value specified here + mountPath: /blueprints/custom certs: enabled: true mountPath: /certs