From 1b72b4c2482f93c142abd8105f35d17958d8f5d7 Mon Sep 17 00:00:00 2001 From: Ariel Sosnovsky Date: Fri, 16 Feb 2024 12:47:55 -0500 Subject: [PATCH] ollama support --- k8s/apps/webapps/templates/deploy-apps.yaml | 2 + k8s/apps/webapps/values-dev.yaml | 48 +++++++++++++++++++++ k8s/argoapps/apps-values/webapps.yaml | 29 ++++++++++++- k8s/argoapps/values.yaml | 10 ++++- 4 files changed, 87 insertions(+), 2 deletions(-) diff --git a/k8s/apps/webapps/templates/deploy-apps.yaml b/k8s/apps/webapps/templates/deploy-apps.yaml index 36ea3a3..89c71d7 100644 --- a/k8s/apps/webapps/templates/deploy-apps.yaml +++ b/k8s/apps/webapps/templates/deploy-apps.yaml @@ -49,6 +49,7 @@ spec: operator: In values: {{ $v.capacity | toYaml | nindent 20 }} + volumes: {{ ($v.volumes | default list) | toJson }} containers: - name: {{$k}} image: "{{ $v.repo }}:{{ $v.tag }}" @@ -93,4 +94,5 @@ spec: initialDelaySeconds: 10 failureThreshold: 10 timeoutSeconds: 30 + volumeMounts: {{ ($v.volumeMounts | default list) | toJson }} {{ end }} \ No newline at end of file diff --git a/k8s/apps/webapps/values-dev.yaml b/k8s/apps/webapps/values-dev.yaml index e69de29..329c82e 100644 --- a/k8s/apps/webapps/values-dev.yaml +++ b/k8s/apps/webapps/values-dev.yaml @@ -0,0 +1,48 @@ +apps: + quirky: + ingress: + middleware: apps-ingresses-https-redirect + repo: ghcr.io/asosnovsky/quirky + tag: "latest" + podResources: + limits: + memory: "250Mi" + requests: + cpu: 250m + memory: "250Mi" + health: + readiness: "/" + liveness: "/" + ports: + tcp: + web: 80 + capacity: + - med + - low + ollama: + ingress: + middleware: apps-ingresses-chain-authentik + repo: ollama/ollama + tag: "latest" + podResources: + limits: + memory: "1Gi" + requests: + cpu: 250m + memory: "1Gi" + health: + readiness: "/" + liveness: "/" + ports: + tcp: + web: 11434 + volumes: + - name: config + persistentVolumeClaim: + claimName: pv-ollama + volumeMounts: + - name: config + mountPath: /root/.ollama + capacity: + - med + - high \ No newline at end of file diff --git a/k8s/argoapps/apps-values/webapps.yaml b/k8s/argoapps/apps-values/webapps.yaml index 18eba5f..ffae5ee 100644 --- a/k8s/argoapps/apps-values/webapps.yaml +++ b/k8s/argoapps/apps-values/webapps.yaml @@ -18,4 +18,31 @@ apps: web: 80 capacity: - med - - low \ No newline at end of file + - low + ollama: + ingress: + middleware: apps-ingresses-chain-authentik + repo: ollama/ollama + tag: "latest" + podResources: + limits: + memory: "1Gi" + requests: + cpu: 250m + memory: "1Gi" + health: + readiness: "/" + liveness: "/" + ports: + tcp: + web: 11434 + volumes: + - name: config + persistentVolumeClaim: + claimName: {{ .Values.storage.ollama.name }} + volumeMounts: + - name: config + mountPath: /root/.ollama + capacity: + - med + - high \ No newline at end of file diff --git a/k8s/argoapps/values.yaml b/k8s/argoapps/values.yaml index cd27167..6e551b7 100644 --- a/k8s/argoapps/values.yaml +++ b/k8s/argoapps/values.yaml @@ -23,7 +23,7 @@ global: email: "ariel.sosnovsky@gmail.com" mqtt: port: 1883 - host: 192.168.0.23 + host: castle.hub.internal apps: webapps: @@ -164,6 +164,14 @@ storage: resources: requests: storage: 8Gi + ollama: + name: ollama + namespace: apps-webapps + accessModes: + - ReadWriteMany + resources: + requests: + storage: 8Gi nextcloudData: name: nextcloud-data namespace: apps-nextcloud