add ingress for ollama and remote litellm
This commit is contained in:
parent
c175883985
commit
2806142962
|
@ -1,7 +1,26 @@
|
|||
resources:
|
||||
- ollama-deployment.yaml
|
||||
- ollama-ingress.yaml
|
||||
|
||||
namePrefix: ollama-
|
||||
|
||||
commonLabels:
|
||||
app.kubernetes.io/name: ollama
|
||||
|
||||
configMapGenerator:
|
||||
- name: kustomize-generated-config
|
||||
literals:
|
||||
- OLLAMA_EXTERNAL_HOST=ollama.badjnet.home
|
||||
- OLLAMA_EXTERNAL_URL=http://ollama.badjnet.home
|
||||
|
||||
replacements:
|
||||
- source:
|
||||
kind: ConfigMap
|
||||
name: kustomize-generated-config
|
||||
fieldPath: data.OLLAMA_EXTERNAL_HOST
|
||||
targets:
|
||||
- select:
|
||||
kind: Ingress
|
||||
name: server
|
||||
fieldPaths:
|
||||
- spec.rules.0.host
|
||||
|
|
|
@ -30,7 +30,9 @@ spec:
|
|||
- name: server
|
||||
image: ollama/ollama
|
||||
# image: badjware/ollama-tweak
|
||||
# env:
|
||||
env:
|
||||
- name: OLLAMA_KEEP_ALIVE
|
||||
value: 36h
|
||||
# - name: HSA_OVERRIDE_GFX_VERSION
|
||||
# value: 10.1.0
|
||||
# - name: HSA_ENABLE_SDMA
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: server
|
||||
labels:
|
||||
app.kubernetes.io/name: ollama
|
||||
probe: blackbox-http
|
||||
spec:
|
||||
rules:
|
||||
- host: ${OLLAMA_EXTERNAL_HOST}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: server
|
||||
port:
|
||||
name: http
|
|
@ -17,6 +17,7 @@ spec:
|
|||
containers:
|
||||
- name: server
|
||||
image: ghcr.io/open-webui/open-webui:main
|
||||
tty: true
|
||||
env:
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
|
@ -24,10 +25,16 @@ spec:
|
|||
fieldPath: metadata.namespace
|
||||
- name: OLLAMA_BASE_URL
|
||||
value: http://ollama-server.$(NAMESPACE).svc:11434
|
||||
- name: RAG_EMBEDDING_ENGINE
|
||||
value: ollama
|
||||
- name: AUDIO_STT_ENGINE
|
||||
value: openai
|
||||
# - name: GLOBAL_LOG_LEVEL
|
||||
# value: DEBUG
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 1Gi
|
||||
memory: 500Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
model_list:
|
||||
- model_name: llama3-8b
|
||||
- model_name: "*"
|
||||
litellm_params:
|
||||
model: ollama_chat/llama3
|
||||
model: "ollama_chat/*"
|
||||
api_base: http://ollama-server:11434
|
||||
- model_name: gemma2-9b
|
||||
litellm_params:
|
||||
model: ollama_chat/gemma2
|
||||
api_base: http://ollama-server:11434
|
||||
- model_name: phi3-3b
|
||||
litellm_params:
|
||||
model: ollama_chat/phi3:mini
|
||||
api_base: http://ollama-server:11434
|
|
@ -54,15 +54,18 @@ images:
|
|||
newTag: "1.29"
|
||||
- name: ollama/ollama
|
||||
newTag: 0.3.3
|
||||
# newTag: 0.3.3-rocm
|
||||
- name: ghcr.io/berriai/litellm
|
||||
newTag: main-v1.43.1
|
||||
- name: ghcr.io/open-webui/open-webui
|
||||
newTag: v0.3.10 # https://github.com/open-webui/open-webui/discussions/4331
|
||||
|
||||
|
||||
configMapGenerator:
|
||||
- name: litellm-proxy-config
|
||||
namespace: llm
|
||||
behavior: replace
|
||||
files:
|
||||
- config.yaml=./configurations/litellm/config.yaml
|
||||
# - name: litellm-proxy-config
|
||||
# namespace: llm
|
||||
# behavior: replace
|
||||
# files:
|
||||
# - config.yaml=./configurations/litellm/config.yaml
|
||||
# - name: home-assistant-server-config
|
||||
# namespace: home-assistant
|
||||
# behavior: replace
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
resources:
|
||||
- namespace.yaml
|
||||
- ../../bases/ollama
|
||||
- ../../bases/litellm
|
||||
# - ../../bases/litellm
|
||||
- ../../bases/openwebui
|
||||
- ../../bases/sillytavern
|
||||
|
||||
|
|
Loading…
Reference in New Issue