28 lines
916 B
YAML
28 lines
916 B
YAML
apiVersion: argoproj.io/v1alpha1
|
|
kind: WorkflowTemplate
|
|
metadata:
|
|
name: ollama-job-template
|
|
namespace: argo
|
|
spec:
|
|
entrypoint: run
|
|
arguments:
|
|
parameters:
|
|
- { name: task, value: "quick-check" }
|
|
- { name: prompt, value: "reindex embeddings" }
|
|
templates:
|
|
- name: run
|
|
container:
|
|
# Replace with an image that can reach your Ollama endpoint
|
|
image: curlimages/curl:8.9.0
|
|
command: ["/bin/sh","-lc"]
|
|
args:
|
|
- >-
|
|
echo "task: {{workflow.parameters.task}}";
|
|
echo "prompt: {{workflow.parameters.prompt}}";
|
|
# Example call (adjust host/port or service DNS):
|
|
# curl -s http://ollama.ai.svc.cluster.local:11434/api/generate \
|
|
# -H 'content-type: application/json' \
|
|
# -d '{"model":"llama3.1","prompt":"{{workflow.parameters.prompt}}"}' | tee /tmp/out.json;
|
|
echo done.
|
|
|