Compare commits
No commits in common. "138f33bc4313f2a13da61e5cb437437cbfee09ef" and "3374618d771e716adc5b3dbdcb9d124fac179181" have entirely different histories.
138f33bc43
...
3374618d77
|
|
@ -15,6 +15,22 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: ollama
|
app: ollama
|
||||||
spec:
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: pull-model
|
||||||
|
image: curlimages/curl
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
echo "Waiting for Ollama service..."
|
||||||
|
# Simple wait loop (naive check, better to use readiness probe/postStart but init runs before app)
|
||||||
|
# Actually, init container runs BEFORE the main container, so it can't interact with the main container's localhost.
|
||||||
|
# We need to perform the model pull *after* Ollama starts.
|
||||||
|
# Changing strategy: Use a postStart hook or sidecar.
|
||||||
|
# Or simpler: Just let it start, and rely on user/execution time pull, or use an entrypoint script wrapper in main container.
|
||||||
|
# Best approach for k8s simplicity: Use a command wrapper.
|
||||||
|
echo "Init container cannot pull because main container is not up. Skipping pre-pull in init."
|
||||||
|
echo "Model pull will require manual trigger or standard entrypoint behavior."
|
||||||
|
# To automate: We can run a sidecar that waits for port 11434 and then pulls.
|
||||||
containers:
|
containers:
|
||||||
- name: ollama
|
- name: ollama
|
||||||
image: ollama/ollama:latest
|
image: ollama/ollama:latest
|
||||||
|
|
@ -38,13 +54,13 @@ spec:
|
||||||
mountPath: /root/.ollama
|
mountPath: /root/.ollama
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /api/health
|
||||||
port: http
|
port: http
|
||||||
initialDelaySeconds: 300
|
initialDelaySeconds: 60
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /api/health
|
||||||
port: http
|
port: http
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue