otwld / ollama-helm

Helm chart for Ollama on Kubernetes
https://artifacthub.io/packages/helm/ollama-helm/ollama
MIT License
216 stars 36 forks source link

Hard coded volumeMounts section causes problems in Openshift #65

Closed dboschbach-bw closed 2 months ago

dboschbach-bw commented 2 months ago

Hi, depending on policy restrictions I have to patch this section of the helm chart or make my own helm chart when I want to deploy to Openshift.

volumeMounts:
  - name: ollama-data
    mountPath: /root/.ollama

https://github.com/otwld/ollama-helm/blob/main/templates/deployment.yaml#L89-L90

Can this be moved to the values.yaml or another separate volume section?

ntrehout commented 2 months ago

Thanks for reaching out!

You’re right, this should be configurable with the values.yaml. I'll make the modification ASAP (~48h).

Meanwhile, join our Discord for real-time updates and help :)

You are talking about a manual patch that you are doing on your side, can you provide us some example ? @dboschbach-bw

dboschbach-bw commented 2 months ago

Here is the example I use. The route part is openshift specific. But that is not the problem I am talking about and isn't your problem to deal with.

cat kustomization.yaml

resources:
  - ../base
  - resource-route.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

patches:
  - target:
      group: apps
      version: v1
      kind: Deployment
      name: ollama
    path: patch-volume-mount.yaml

patch-volume-mount.yaml

- op: replace
  path: /spec/template/spec/containers/0/volumeMounts/0/mountPath
  value: /.ollama

helm upgrade -i ollama ollama-helm/ollama -n <namespace> -f values.yaml --atomic --cleanup-on-fail --timeout 600s--post-renderer ./hook.sh

#!/bin/bash
cat <&0 >./base/resources.yaml
oc kustomize ./openshift/
rm ./base/resources.yaml
jdetroyes commented 2 months ago

Hey @dboschbach-bw

You can now override the default path for ollama-data volume using ollama.mountPath in release 0.44.0.