File tree Expand file tree Collapse file tree 5 files changed +33
-4
lines changed
argocd/apps/applications/open-webui Expand file tree Collapse file tree 5 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 1818 syncOptions :
1919 - CreateNamespace=true
2020 - Prune=true
21+ ignoreDifferences :
22+ - group : apps
23+ kind : StatefulSet
24+ name : open-webui
25+ jqPathExpressions :
26+ - ' .spec.template.spec.containers[0].env[] | select(.name == "OLLAMA_BASE_URLS") | .value'
Original file line number Diff line number Diff line change @@ -21,15 +21,15 @@ ollama:
2121 - qwen3-coder:30b
2222 - qwen3:30b
2323 create :
24- - name : gpt-oss:20b-131k-context
24+ - name : gpt-oss:20b
2525 template : |
2626 FROM gpt-oss:20b
2727 PARAMETER num_ctx 131072
28- - name : qwen3-coder:30b-32k-context
28+ - name : qwen3-coder:30b
2929 template : |
3030 FROM qwen3-coder:30b
3131 PARAMETER num_ctx 32768
32- - name : qwen3:30b-32k-context
32+ - name : qwen3:30b
3333 template : |
3434 FROM qwen3:30b
3535 PARAMETER num_ctx 32768
Original file line number Diff line number Diff line change 1616 name : {{ include "open-webui.name" . }}-lb-ip-patch
1717 spec :
1818 serviceAccountName : {{ .Values.serviceAccount.name | default (include "open-webui.name" .) }}
19+ automountServiceAccountToken : true
1920 restartPolicy : OnFailure
2021 containers :
2122 - name : kubectl
2425 args :
2526 - |
2627 set -e
28+
29+ # Patch the open-webui service with its LoadBalancer IP
2730 IP=$(kubectl get secret {{ include "open-webui.name" . }}-lb-ip -n {{ include "open-webui.namespace" . }} -o jsonpath="{.data.LOAD_BALANCER_IP}" | base64 -d)
2831 CURRENT_IP=$(kubectl get svc {{ include "open-webui.name" . }} -n {{ include "open-webui.namespace" . }} -o jsonpath="{.spec.loadBalancerIP}" 2>/dev/null || echo "")
2932 if [[ "$CURRENT_IP" != "$IP" ]]; then
3033 kubectl patch svc {{ include "open-webui.name" . }} -n {{ include "open-webui.namespace" . }} -p '{"spec":{"loadBalancerIP":"'$IP'"}}' --type=merge
34+ echo "Service LoadBalancer IP patched to: $IP"
3135 fi
36+
37+ # Get Ollama LoadBalancer IP from ollama-app-lb-ip secret
38+ OLLAMA_IP=$(kubectl get secret ollama-app-lb-ip -n {{ include "open-webui.namespace" . }} -o jsonpath="{.data.loadBalancerIP}" 2>/dev/null | base64 -d)
39+ if [[ -z "$OLLAMA_IP" ]]; then
40+ echo "ERROR: Failed to read Ollama IP from secret ollama-app-lb-ip"
41+ echo "Available secrets:"
42+ kubectl get secrets -n {{ include "open-webui.namespace" . }}
43+ exit 1
44+ fi
45+ OLLAMA_URL="http://${OLLAMA_IP}:11434"
46+ echo "Ollama URL: $OLLAMA_URL"
47+
48+ # Patch the StatefulSet with OLLAMA_BASE_URLS environment variable (using set env to merge, not replace)
49+ kubectl set env statefulset/{{ include "open-webui.name" . }} -n {{ include "open-webui.namespace" . }} OLLAMA_BASE_URLS="$OLLAMA_URL"
50+
51+ echo "StatefulSet patched with Ollama URL: $OLLAMA_URL"
3252{{- end }}
Original file line number Diff line number Diff line change 1313- apiGroups : [""]
1414 resources : ["services"]
1515 verbs : ["get", "patch"]
16+ - apiGroups : ["apps"]
17+ resources : ["statefulsets"]
18+ verbs : ["get", "patch"]
1619---
1720apiVersion : rbac.authorization.k8s.io/v1
1821kind : RoleBinding
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ollama:
1010# A list of Ollama API endpoints. These can be added in lieu of automatically installing the Ollama Helm chart, or in addition to it.
1111# This will be patched during deployment
1212# @section -- External Tools configuration
13- ollamaUrls : []
13+ ollamaUrls : ["http://placeholder-will-be-patched:11434" ]
1414
1515# -- Disables taking Ollama Urls from `ollamaUrls` list
1616# @section -- External Tools configuration
You can’t perform that action at this time.
0 commit comments