Feat(ollama): Add header auth option to ollama (#21395)

**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  # <!--(issue)-->

**⚙️ 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 <discretizer@users.noreply.github.com>
This commit is contained in:
zenoftheblues@gmail.com
2024-05-01 15:29:33 -04:00
committed by GitHub
parent 8be74dec61
commit 4f6697b572
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -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:
+1
View File
@@ -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