From 0927658f581b694dfdae987952dbd77a728e283a Mon Sep 17 00:00:00 2001 From: chemavx Date: Wed, 15 Apr 2026 08:13:13 +0000 Subject: [PATCH] chore: pin ollama and cloudflare-ddns to exact running versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ollama/ollama:latest → 0.20.7 - favonia/cloudflare-ddns:latest → 1.16.2 Co-Authored-By: Claude Sonnet 4.6 --- .../deployment-cloudflare-ddns.yaml | 2 +- ollama/ollama.yaml | 140 ++++++++++++++++++ 2 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 ollama/ollama.yaml diff --git a/cloudflare-ddns/deployment-cloudflare-ddns.yaml b/cloudflare-ddns/deployment-cloudflare-ddns.yaml index b7d496b..3ff6400 100644 --- a/cloudflare-ddns/deployment-cloudflare-ddns.yaml +++ b/cloudflare-ddns/deployment-cloudflare-ddns.yaml @@ -41,7 +41,7 @@ spec: value: '@every 5m' - name: IP4_PROVIDER value: cloudflare.trace - image: favonia/cloudflare-ddns:latest + image: favonia/cloudflare-ddns:1.16.2 imagePullPolicy: Always name: cloudflare-ddns resources: diff --git a/ollama/ollama.yaml b/ollama/ollama.yaml new file mode 100644 index 0000000..a89ed1b --- /dev/null +++ b/ollama/ollama.yaml @@ -0,0 +1,140 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: ollama + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: ollama-models + namespace: ollama +spec: + accessModes: + - ReadWriteOnce + storageClassName: local-path + resources: + requests: + storage: 20Gi + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ollama + namespace: ollama + labels: + app: ollama +spec: + replicas: 1 + selector: + matchLabels: + app: ollama + template: + metadata: + labels: + app: ollama + spec: + nodeSelector: + kubernetes.io/hostname: chemavx-k8 + containers: + - name: ollama + image: ollama/ollama:0.20.7 + command: ["/usr/bin/bash", "-c"] + args: + - | + ollama serve & + SERVE_PID=$! + echo "Waiting for ollama to start..." + until ollama list >/dev/null 2>&1; do + sleep 2 + done + echo "Pulling llama3.1:8b..." + ollama pull llama3.1:8b + ollama rm llama3.2:3b 2>/dev/null || true + echo "Model ready." + wait $SERVE_PID + ports: + - name: http + containerPort: 11434 + protocol: TCP + env: + - name: OLLAMA_MODELS + value: /root/.ollama/models + - name: OLLAMA_NUM_CTX + value: "8192" + - name: OLLAMA_KEEP_ALIVE + value: "-1" + resources: + requests: + memory: 8Gi + cpu: "500m" + limits: + memory: 20Gi + volumeMounts: + - name: ollama-data + mountPath: /root/.ollama + livenessProbe: + httpGet: + path: /api/tags + port: 11434 + initialDelaySeconds: 60 + periodSeconds: 30 + failureThreshold: 5 + readinessProbe: + httpGet: + path: /api/tags + port: 11434 + initialDelaySeconds: 30 + periodSeconds: 10 + failureThreshold: 15 + volumes: + - name: ollama-data + persistentVolumeClaim: + claimName: ollama-models + +--- +apiVersion: v1 +kind: Service +metadata: + name: ollama + namespace: ollama + labels: + app: ollama +spec: + type: ClusterIP + selector: + app: ollama + ports: + - name: http + port: 11434 + targetPort: 11434 + protocol: TCP + +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: ollama + namespace: ollama + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.entrypoints: websecure +spec: + ingressClassName: traefik + rules: + - host: ollama.chemavx.xyz + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: ollama + port: + number: 11434 + tls: + - hosts: + - ollama.chemavx.xyz + secretName: ollama-tls