mirror of
https://github.com/morten-olsen/homelab-apps.git
synced 2026-02-08 01:36:28 +01:00
migate openwebui
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
name: openwebui
|
name: openwebui
|
||||||
|
dependencies:
|
||||||
|
- name: common
|
||||||
|
version: 1.0.0
|
||||||
|
repository: file://../../common
|
||||||
|
|||||||
@@ -1,10 +1 @@
|
|||||||
apiVersion: homelab.mortenolsen.pro/v1
|
{{ include "common.oidc" . }}
|
||||||
kind: OidcClient
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}'
|
|
||||||
spec:
|
|
||||||
environment: '{{ .Values.globals.environment }}'
|
|
||||||
redirectUris:
|
|
||||||
- path: /oauth/oidc/callback
|
|
||||||
subdomain: '{{ .Values.subdomain }}'
|
|
||||||
matchingMode: strict
|
|
||||||
|
|||||||
@@ -1,71 +1 @@
|
|||||||
apiVersion: apps/v1
|
{{ include "common.deployment" . }}
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}"
|
|
||||||
spec:
|
|
||||||
strategy:
|
|
||||||
type: Recreate
|
|
||||||
replicas: 1
|
|
||||||
revisionHistoryLimit: 0
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: "{{ .Release.Name }}"
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: "{{ .Release.Name }}"
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: "{{ .Release.Name }}"
|
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
||||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
livenessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: http
|
|
||||||
readinessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: http
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /app/backend/data
|
|
||||||
name: data
|
|
||||||
env:
|
|
||||||
- name: ENABLE_SIGNUP
|
|
||||||
value: "false"
|
|
||||||
- name: WEBUI_URL # TODO: remove
|
|
||||||
value: https://openwebui.olsen.cloud
|
|
||||||
- name: ENABLE_OAUTH_PERSISTENT_CONFIG
|
|
||||||
value: "false"
|
|
||||||
- name: ENABLE_OAUTH_SIGNUP
|
|
||||||
value: "true"
|
|
||||||
- name: OAUTH_MERGE_ACCOUNTS_BY_EMAIL
|
|
||||||
value: "true"
|
|
||||||
- name: OAUTH_PROVIDER_NAME
|
|
||||||
value: authentik
|
|
||||||
- name: OPENID_PROVIDER_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: "{{ .Release.Name }}-client"
|
|
||||||
key: configuration
|
|
||||||
- name: OAUTH_CLIENT_ID
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: "{{ .Release.Name }}-client"
|
|
||||||
key: clientId
|
|
||||||
- name: OAUTH_CLIENT_SECRET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: "{{ .Release.Name }}-client"
|
|
||||||
key: clientSecret
|
|
||||||
- name: ENABLE_LOGIN_FORM
|
|
||||||
value: "false"
|
|
||||||
- name: OPENID_REDIRECT
|
|
||||||
value: https://openwebui.olsen.cloud/oauth/oidc/callback
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: "{{ .Release.Name }}-data"
|
|
||||||
|
|||||||
@@ -1,11 +1 @@
|
|||||||
kind: PersistentVolumeClaim
|
{{ include "common.pvc" . }}
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}-data'
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- 'ReadWriteOnce'
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: '1Gi'
|
|
||||||
storageClassName: '{{ .Values.globals.environment }}'
|
|
||||||
|
|||||||
@@ -1,15 +1 @@
|
|||||||
apiVersion: v1
|
{{ include "common.service" . }}
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}'
|
|
||||||
labels:
|
|
||||||
app: '{{ .Release.Name }}'
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
targetPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
name: http
|
|
||||||
selector:
|
|
||||||
app: '{{ .Release.Name }}'
|
|
||||||
|
|||||||
@@ -1,39 +1 @@
|
|||||||
apiVersion: networking.istio.io/v1
|
{{ include "common.virtualService" . }}
|
||||||
kind: VirtualService
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-public"
|
|
||||||
namespace: "{{ .Release.Namespace }}"
|
|
||||||
spec:
|
|
||||||
gateways:
|
|
||||||
- "{{ .Values.globals.istio.gateways.public }}"
|
|
||||||
- mesh
|
|
||||||
hosts:
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- mesh
|
|
||||||
http:
|
|
||||||
- route:
|
|
||||||
- destination:
|
|
||||||
host: "{{ .Release.Name }}"
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: networking.istio.io/v1
|
|
||||||
kind: VirtualService
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-private"
|
|
||||||
namespace: "{{ .Release.Namespace }}"
|
|
||||||
spec:
|
|
||||||
gateways:
|
|
||||||
- "{{ .Values.globals.istio.gateways.private }}"
|
|
||||||
- mesh
|
|
||||||
hosts:
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- mesh
|
|
||||||
http:
|
|
||||||
- route:
|
|
||||||
- destination:
|
|
||||||
host: "{{ .Release.Name }}"
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,4 +2,72 @@ image:
|
|||||||
repository: ghcr.io/open-webui/open-webui
|
repository: ghcr.io/open-webui/open-webui
|
||||||
tag: 0.6.43@sha256:9cb724e0bc84f05ba2f81a3da5f53f5add07e1001065d83f3b6b70b9a9eeef19
|
tag: 0.6.43@sha256:9cb724e0bc84f05ba2f81a3da5f53f5add07e1001065d83f3b6b70b9a9eeef19
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
subdomain: openwebui
|
subdomain: openwebui
|
||||||
|
|
||||||
|
# Deployment configuration
|
||||||
|
deployment:
|
||||||
|
strategy: Recreate
|
||||||
|
replicas: 1
|
||||||
|
revisionHistoryLimit: 0
|
||||||
|
|
||||||
|
# Container configuration
|
||||||
|
container:
|
||||||
|
port: 8080
|
||||||
|
healthProbe:
|
||||||
|
type: tcpSocket
|
||||||
|
port: http # Use named port
|
||||||
|
|
||||||
|
# Service configuration
|
||||||
|
service:
|
||||||
|
port: 80
|
||||||
|
type: ClusterIP
|
||||||
|
|
||||||
|
# Volume configuration
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
mountPath: /app/backend/data
|
||||||
|
persistentVolumeClaim: data
|
||||||
|
|
||||||
|
# Persistent volume claims
|
||||||
|
persistentVolumeClaims:
|
||||||
|
- name: data
|
||||||
|
size: 1Gi
|
||||||
|
|
||||||
|
# VirtualService configuration
|
||||||
|
virtualService:
|
||||||
|
enabled: true
|
||||||
|
gateways:
|
||||||
|
public: true
|
||||||
|
private: true
|
||||||
|
|
||||||
|
# OIDC client configuration
|
||||||
|
oidc:
|
||||||
|
enabled: true
|
||||||
|
redirectUris:
|
||||||
|
- "/oauth/oidc/callback"
|
||||||
|
subjectMode: user_username
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
env:
|
||||||
|
ENABLE_SIGNUP: "false"
|
||||||
|
WEBUI_URL:
|
||||||
|
value: "https://{subdomain}.{domain}"
|
||||||
|
ENABLE_OAUTH_PERSISTENT_CONFIG: "false"
|
||||||
|
ENABLE_OAUTH_SIGNUP: "true"
|
||||||
|
OAUTH_MERGE_ACCOUNTS_BY_EMAIL: "true"
|
||||||
|
OAUTH_PROVIDER_NAME: authentik
|
||||||
|
OPENID_PROVIDER_URL: "https://auth.{domain}/application/o/{namespace}-{release}/.well-known/openid-configuration" # TODO: fix!
|
||||||
|
OAUTH_CLIENT_ID:
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{release}-oidc-credentials"
|
||||||
|
key: clientId
|
||||||
|
OAUTH_CLIENT_SECRET:
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{release}-oidc-credentials"
|
||||||
|
key: clientSecret
|
||||||
|
ENABLE_LOGIN_FORM: "false"
|
||||||
|
OPENID_REDIRECT:
|
||||||
|
value: "https://{subdomain}.{domain}/oauth/oidc/callback"
|
||||||
|
|||||||
Reference in New Issue
Block a user