Split manifests into infra/ and applications/

This commit is contained in:
2026-06-21 12:14:38 +02:00
parent 64e8bf7d78
commit c40577589d
360 changed files with 69 additions and 67 deletions

View File

@@ -0,0 +1,13 @@
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
name: ollama-backend-traffic
namespace: ollama
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: ollama-route
timeout:
http:
requestTimeout: 0s

View File

@@ -0,0 +1,40 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: ollama-route
namespace: ollama
spec:
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: gateway-internal
namespace: envoy-gateway
sectionName: ollama
hostnames:
- "ollama.jsme.be"
rules:
- matches:
- path:
type: PathPrefix
value: /
filters:
- type: RequestHeaderModifier
requestHeaderModifier:
set:
- name: X-Forwarded-Host
value: "ollama.jsme.be"
- name: X-Forwarded-Proto
value: https
- type: ResponseHeaderModifier
responseHeaderModifier:
set:
- name: Strict-Transport-Security
value: "max-age=31536000; includeSubDomains"
- name: X-Content-Type-Options
value: nosniff
backendRefs:
- name: ollama
port: 11434
kind: Service
group: ""
weight: 1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ollama-pvc
namespace: ollama
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: 100Gi

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: ollama
namespace: ollama
spec:
selector:
app: ollama
ports:
- protocol: TCP
port: 11434
targetPort: 11434
type: ClusterIP

View File

@@ -0,0 +1,38 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: ollama
namespace: ollama
spec:
replicas: 1
selector:
matchLabels:
app: ollama
serviceName: ollama
template:
metadata:
labels:
app: ollama
spec:
restartPolicy: Always
terminationGracePeriodSeconds: 60
nodeSelector:
nvidia.com/gpu.present: "true"
containers:
- name: ollama
image: ollama/ollama:latest
ports:
- containerPort: 11434
resources:
limits:
nvidia.com/gpu: "1"
env:
- name: OLLAMA_HOST
value: "0.0.0.0"
volumeMounts:
- name: data
mountPath: /root/.ollama
volumes:
- name: data
persistentVolumeClaim:
claimName: ollama-pvc