-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add redis for websocket #137
base: main
Are you sure you want to change the base?
Conversation
…r readme and values
f1a6c78
to
3b1bfc2
Compare
By this doc(redis verification), maybe, I can verify redis configuration for 3 scenarios in #135 (Small, Full, External). I will soon be able to ready this draft for review 🥹. |
- add values and corresponding readme - add subchart **redis-20.6.2**
Note If there is something wrong. Please comment and improve it together. Hello folks. I tired add Redis. Please review these commands for reproducing together. 0. Default (+Prerequirement)kind create cluster -n owui-websocket
git clone -b feat/websocket-with-redis https://github.com/jyje/owui-helm-charts.git
cd owui-helm-charts
helm template owui-default ./charts/open-webui \
--namespace owui-default --create-namespace \
--set 'extraEnvVars[0].name=SOCKET_LOG_LEVEL' \
--set 'extraEnvVars[0].value=DEBUG' \
> owui-default.yaml
kubectl create namespace owui-default
kubectl apply -f owui-default.yaml
kubectl wait -n owui-default --for=condition=Ready pod/open-webui-0
kubectl get -n owui-default all
kubectl logs -n owui-default pod/open-webui-0 -c open-webui | grep "open_webui.socket"
## You may see:
# DEBUG [open_webui.socket.main] Running periodic_usage_pool_cleanup
kubectl delete namespace owui-default 1. Small Installationa single redis pod from deployment helm template owui-small ./charts/open-webui \
--namespace owui-small --create-namespace \
--set websocket.enabled=true \
--set 'extraEnvVars[0].name=SOCKET_LOG_LEVEL' \
--set 'extraEnvVars[0].value=DEBUG' \
> owui-small.yaml
kubectl create namespace owui-small
kubectl apply -f owui-small.yaml
kubectl wait -n owui-small --for=condition=Ready pod/open-webui-0
kubectl get -n owui-small all
kubectl logs -n owui-small pod/open-webui-0 -c open-webui | grep "open_webui.socket"
## You may see:
# DEBUG:open_webui.socket.main:Using Redis to manage websockets.
# DEBUG [open_webui.socket.main] Running periodic_usage_pool_cleanup
kubectl delete namespace owui-small 2. Full Installationdeploy and connect redis chart helm template owui-full ./charts/open-webui \
--namespace owui-full --create-namespace \
--set websocket.enabled=true \
--set websocket.redis.enabled=false \
--set websocket.url=redis://open-webui-redis-master:6379/0 \
--set redis-cluster.enabled=true \
--set 'extraEnvVars[0].name=SOCKET_LOG_LEVEL' \
--set 'extraEnvVars[0].value=DEBUG' \
> owui-full.yaml
kubectl create namespace owui-full
kubectl apply -f owui-full.yaml
kubectl wait -n owui-full --for=condition=Ready pod/open-webui-0
kubectl get -n owui-full all
kubectl logs -n owui-full pod/open-webui-0 -c open-webui | grep "open_webui.socket"
## You may see:
# DEBUG:open_webui.socket.main:Using Redis to manage websockets.
# DEBUG [open_webui.socket.main] Running periodic_usage_pool_cleanup
kubectl delete namespace owui-full 3. External Installationconnect external redis url (no redis in k8s) # please set url to `localhost:6379` or `redis.example.com`
helm template owui-external ./charts/open-webui \
--namespace owui-external --create-namespace \
--set websocket.enabled=true \
--set websocket.redis.enabled=false \
--set websocket.url=redis://redis.example.com/0 \
--set 'extraEnvVars[0].name=SOCKET_LOG_LEVEL' \
--set 'extraEnvVars[0].value=DEBUG' \
> owui-external.yaml
kubectl create namespace owui-external
kubectl apply -f owui-external.yaml
kubectl wait -n owui-external --for=condition=Ready pod/open-webui-0
kubectl get -n owui-external all
kubectl logs -n owui-external pod/open-webui-0 -c open-webui | grep "open_webui.socket"
## You may see:
# DEBUG:open_webui.socket.main:Using Redis to manage websockets.
# DEBUG [open_webui.socket.main] Running periodic_usage_pool_cleanup
kubectl delete namespace owui-external Copilot SummaryThis pull request introduces several significant updates to the Version Upgrade:
Note Proposed version needs to be checked Redis Support:
WebSocket Support:
|
Hi @jyje, thank you for another amazing PR. I haven't had the chance to test this one out yet but should hopefully be able to do so in the next few days so we can get this merged if it all works. I'll let you know if I run into any issues when I get a chance to try this out! |
Opinion
Important
I tested this feature in local k8s and personal on-premise k8s. To verify clearly, I hope you guys test and improve with me
Hello folks.
To resolve #135, I added redis deployments for websocket supports without PV+PVC or HA settings. This is small installation scenario in here. After merging this, I will propose the installation of HA redis cluster from bitnami chart step-by-step. Please give me any advise.
Thank you
Copilot Summary
This pull request introduces websocket support to the Open WebUI Helm chart, along with several related enhancements and configurations. The most important changes include adding websocket configuration options, defining Redis deployment and service templates, and updating the chart version.
Websocket support and configuration:
charts/open-webui/README.md
: Added websocket configuration options, including enabling websocket support, specifying the websocket manager, and configuring Redis settings.charts/open-webui/values.yaml
: Introduced websocket configuration parameters such as enabling websocket support, specifying the websocket manager, and defining Redis settings.Redis deployment and service templates:
charts/open-webui/templates/websocket-redis.yaml
: Added a new template for Redis deployment and service, which includes labels, annotations, and container specifications.charts/open-webui/templates/_helpers.tpl
: Defined helper functions for creating labels and selector labels for websocket resources.Chart version update:
charts/open-webui/Chart.yaml
: Updated the chart version from 5.1.1 to 5.2.0.