From 4f6697b57229fc454bf2a0a0ee39ebfa38e59ab2 Mon Sep 17 00:00:00 2001 From: "zenoftheblues@gmail.com" Date: Wed, 1 May 2024 15:29:33 -0400 Subject: [PATCH] Feat(ollama): Add header auth option to ollama (#21395) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** This PR adds a trusted e-mail header option. The use for this is for is to enable login through treafik proxy auth through something like authentik. ⚒️ Fixes # **⚙️ Type of change** - [X] ⚙️ 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?** Tested through local deployment **📃 Notes:** This could potentially could be handled via adding environment variable support to the UI container (rather than the 'main' container as it appears now. In that case we should fix the environment variable options (i.e. maybe and environment variables to both containers?) **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 I have performed a self-review of my own code - [x] #️⃣ 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 - [x] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):` or `chore(chart-name):` **➕ 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: zenoftheblues@gmail.com --- charts/stable/ollama/questions.yaml | 5 +++++ charts/stable/ollama/values.yaml | 1 + 2 files changed, 6 insertions(+) diff --git a/charts/stable/ollama/questions.yaml b/charts/stable/ollama/questions.yaml index e6713430d86..265f9e389c8 100644 --- a/charts/stable/ollama/questions.yaml +++ b/charts/stable/ollama/questions.yaml @@ -56,6 +56,11 @@ questions: description: User - value: admin description: Admin + - variable: trusted_email_header + label: Trusted E-mail Header + schema: + type: string + default: "" - variable: stable_diffusion label: Stable Diffusion Configuration schema: diff --git a/charts/stable/ollama/values.yaml b/charts/stable/ollama/values.yaml index 671d8efc926..bbc7843dd88 100644 --- a/charts/stable/ollama/values.yaml +++ b/charts/stable/ollama/values.yaml @@ -118,6 +118,7 @@ workload: WHISPER_MODEL: "{{ .Values.ollama.whisper.model }}" RAG_EMBEDDING_MODEL: "{{ .Values.ollama.rag.model }}" RAG_EMBEDDING_MODEL_DEVICE_TYPE: "{{ .Values.ollama.rag.model_device_type }}" + WEBUI_AUTH_TRUSTED_EMAIL_HEADER: "{{ .Values.ollama.registration.trusted_email_header }}" # OPENAI_API_BASE_URL # OPENAI_API_KEY # DEFAULT_MODELS