Skip to content

Commit

Permalink
Added Kustomization for Ollama service.
Browse files Browse the repository at this point in the history
  • Loading branch information
lreimer committed Dec 2, 2024
1 parent a6f47b1 commit b74e7fd
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
49 changes: 49 additions & 0 deletions infrastructure/services/ollama-chat-service/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ollama-chat-service
namespace: default
labels:
app: ollama-chat-service
spec:
replicas: 2
selector:
matchLabels:
app: ollama-chat-service
template:
metadata:
labels:
app: ollama-chat-service
spec:
containers:
- name: ollama-chat-service
image: ghcr.io/lreimer/k8s-native-java-ai-ollama-chat-service:main
imagePullPolicy: Always
ports:
- name: http
containerPort: 8080
- name: management
containerPort: 9000
resources:
requests:
memory: "128Mi"
cpu: "250m"
limits:
memory: "256Mi"
cpu: "500m"
probes:
readinessProbe:
httpGet:
path: /q/health/ready
port: management
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
httpGet:
path: /q/health/live
port: management
initialDelaySeconds: 10
periodSeconds: 10
env:
- name: QUARKUS_LANGCHAIN4J_OLLAMA_BASE_URL
value: "http://ollama-model-llama31.default.svc.cluster.local:11434"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
13 changes: 13 additions & 0 deletions infrastructure/services/ollama-chat-service/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: ollama-chat-service
namespace: default
spec:
selector:
app: ollama-chat-service
ports:
- protocol: TCP
port: 8080
targetPort: http
type: LoadBalancer

0 comments on commit b74e7fd

Please sign in to comment.