198 lines
8.2 KiB
YAML
198 lines
8.2 KiB
YAML
---
|
|
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
|
|
spec:
|
|
ingressClassName: apisix
|
|
rules:
|
|
- host: ai.applaude.net
|
|
http:
|
|
paths:
|
|
- backend:
|
|
service:
|
|
name: open-webui
|
|
port:
|
|
number: 80
|
|
path: /
|
|
pathType: Prefix
|
|
|