refactor: migrate open-webui to interface layer and remove legacy ai-agents manifests
This commit is contained in:
parent
10c393bce9
commit
a1a028b2e9
|
|
@ -1,200 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: ollama
|
|
||||||
namespace: ai-agents
|
|
||||||
spec:
|
|
||||||
progressDeadlineSeconds: 600
|
|
||||||
replicas: 1
|
|
||||||
revisionHistoryLimit: 10
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: ollama
|
|
||||||
strategy:
|
|
||||||
rollingUpdate:
|
|
||||||
maxSurge: 25%
|
|
||||||
maxUnavailable: 25%
|
|
||||||
type: RollingUpdate
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
|
||||||
app: ollama
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- image: ollama/ollama:latest
|
|
||||||
imagePullPolicy: Always
|
|
||||||
name: ollama
|
|
||||||
ports:
|
|
||||||
- containerPort: 11434
|
|
||||||
protocol: TCP
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: '2'
|
|
||||||
memory: 4Gi
|
|
||||||
terminationMessagePath: /dev/termination-log
|
|
||||||
terminationMessagePolicy: File
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /root/.ollama
|
|
||||||
name: ollama-data
|
|
||||||
dnsPolicy: ClusterFirst
|
|
||||||
restartPolicy: Always
|
|
||||||
schedulerName: default-scheduler
|
|
||||||
securityContext: {}
|
|
||||||
terminationGracePeriodSeconds: 30
|
|
||||||
volumes:
|
|
||||||
- name: ollama-data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: ollama-pvc
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: open-webui
|
|
||||||
namespace: ai-agents
|
|
||||||
spec:
|
|
||||||
progressDeadlineSeconds: 600
|
|
||||||
replicas: 1
|
|
||||||
revisionHistoryLimit: 10
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: open-webui
|
|
||||||
strategy:
|
|
||||||
rollingUpdate:
|
|
||||||
maxSurge: 25%
|
|
||||||
maxUnavailable: 25%
|
|
||||||
type: RollingUpdate
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
|
||||||
app: open-webui
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- env:
|
|
||||||
- name: OLLAMA_BASE_URL
|
|
||||||
value: http://ollama.ai-agents.svc.cluster.local:11434
|
|
||||||
image: ghcr.io/open-webui/open-webui:main
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
name: open-webui
|
|
||||||
ports:
|
|
||||||
- containerPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
resources: {}
|
|
||||||
terminationMessagePath: /dev/termination-log
|
|
||||||
terminationMessagePolicy: File
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /app/backend/data
|
|
||||||
name: open-webui-data
|
|
||||||
dnsPolicy: ClusterFirst
|
|
||||||
restartPolicy: Always
|
|
||||||
schedulerName: default-scheduler
|
|
||||||
securityContext: {}
|
|
||||||
terminationGracePeriodSeconds: 30
|
|
||||||
volumes:
|
|
||||||
- name: open-webui-data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: open-webui-pvc
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: ollama
|
|
||||||
namespace: ai-agents
|
|
||||||
spec:
|
|
||||||
internalTrafficPolicy: Cluster
|
|
||||||
ipFamilies:
|
|
||||||
- IPv4
|
|
||||||
ipFamilyPolicy: SingleStack
|
|
||||||
ports:
|
|
||||||
- port: 11434
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: 11434
|
|
||||||
selector:
|
|
||||||
app: ollama
|
|
||||||
sessionAffinity: None
|
|
||||||
type: ClusterIP
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: open-webui
|
|
||||||
namespace: ai-agents
|
|
||||||
spec:
|
|
||||||
allocateLoadBalancerNodePorts: true
|
|
||||||
externalTrafficPolicy: Cluster
|
|
||||||
internalTrafficPolicy: Cluster
|
|
||||||
ipFamilies:
|
|
||||||
- IPv4
|
|
||||||
ipFamilyPolicy: SingleStack
|
|
||||||
ports:
|
|
||||||
- nodePort: 31583
|
|
||||||
port: 80
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: 8080
|
|
||||||
selector:
|
|
||||||
app: open-webui
|
|
||||||
sessionAffinity: None
|
|
||||||
type: LoadBalancer
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
finalizers:
|
|
||||||
- kubernetes.io/pvc-protection
|
|
||||||
name: ollama-pvc
|
|
||||||
namespace: ai-agents
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 20Gi
|
|
||||||
storageClassName: longhorn
|
|
||||||
volumeMode: Filesystem
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
finalizers:
|
|
||||||
- kubernetes.io/pvc-protection
|
|
||||||
name: open-webui-pvc
|
|
||||||
namespace: ai-agents
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 5Gi
|
|
||||||
storageClassName: longhorn
|
|
||||||
volumeMode: Filesystem
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: applaud-ingress
|
|
||||||
namespace: ai-agents
|
|
||||||
annotations:
|
|
||||||
k8s.apisix.apache.org/enable-websocket: "true"
|
|
||||||
spec:
|
|
||||||
ingressClassName: apisix
|
|
||||||
rules:
|
|
||||||
- host: ai.applaude.net
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- backend:
|
|
||||||
service:
|
|
||||||
name: open-webui
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
path: /
|
|
||||||
pathType: Prefix
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- placeholder.yaml
|
- open-webui/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: open-webui
|
||||||
|
namespace: interface
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: open-webui
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: open-webui
|
||||||
|
strategy:
|
||||||
|
type: Recreate # Better for single PVCs
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: open-webui
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: open-webui
|
||||||
|
# Pinning to a specific version is recommended, but keeping main if user prefers.
|
||||||
|
# Alternatively, using a recent stable tag like v0.3.32
|
||||||
|
image: ghcr.io/open-webui/open-webui:main
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
env:
|
||||||
|
- name: OLLAMA_BASE_URL
|
||||||
|
value: "http://litellm.ai-core.svc.cluster.local:4000" # Pointing to LiteLLM router!
|
||||||
|
- name: WEBUI_AUTH
|
||||||
|
value: "False" # Based on default, keeping it simple or whatever they had
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 512Mi
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 2Gi
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 15
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /app/backend/data
|
||||||
|
name: open-webui-data
|
||||||
|
volumes:
|
||||||
|
- name: open-webui-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: open-webui-pvc
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: open-webui-ingress
|
||||||
|
namespace: interface
|
||||||
|
annotations:
|
||||||
|
k8s.apisix.apache.org/enable-websocket: "true"
|
||||||
|
spec:
|
||||||
|
ingressClassName: apisix
|
||||||
|
rules:
|
||||||
|
- host: ai.applaude.net
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
service:
|
||||||
|
name: open-webui
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
path: /
|
||||||
|
pathType: Prefix
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- deployment.yaml
|
||||||
|
- service.yaml
|
||||||
|
- pvc.yaml
|
||||||
|
- ingress.yaml
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: open-webui-pvc
|
||||||
|
namespace: interface
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: open-webui
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
|
storageClassName: longhorn
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: open-webui
|
||||||
|
namespace: interface
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: open-webui
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: open-webui
|
||||||
|
type: ClusterIP # We use Ingress now instead of LoadBalancer with NodePort
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: interface-gitops-placeholder
|
|
||||||
namespace: interface
|
|
||||||
data:
|
|
||||||
note: "Replace with Slack bot and HQ dashboard workloads when ready."
|
|
||||||
Loading…
Reference in New Issue