diff --git a/charts/open-webui/templates/ollama-statefulset.yaml b/charts/open-webui/templates/ollama-statefulset.yaml index 2750956..6dc85bf 100644 --- a/charts/open-webui/templates/ollama-statefulset.yaml +++ b/charts/open-webui/templates/ollama-statefulset.yaml @@ -48,6 +48,12 @@ spec: - name: NVIDIA_DRIVER_CAPABILITIES value: compute,utility {{- end }} + {{- with .Values.ollama.extraEnvVars }} + {{- range . }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end }} + {{- end }} {{- with .Values.ollama.resources }} resources: {{- toYaml . | nindent 10 }} {{- end }} @@ -58,6 +64,10 @@ spec: nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.ollama.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.ollama.tolerations }} tolerations: {{- toYaml . | nindent 8 }} diff --git a/charts/open-webui/templates/webui-deployment.yaml b/charts/open-webui/templates/webui-deployment.yaml index bbd5706..7c0d468 100644 --- a/charts/open-webui/templates/webui-deployment.yaml +++ b/charts/open-webui/templates/webui-deployment.yaml @@ -42,6 +42,12 @@ spec: env: - name: OLLAMA_BASE_URL value: {{ include "ollama.url" . | quote }} + {{- with .Values.webui.extraEnvVars }} + {{- range . }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end }} + {{- end }} tty: true {{- with .Values.webui.nodeSelector }} nodeSelector: diff --git a/charts/open-webui/values.yaml b/charts/open-webui/values.yaml index 81a4197..9908572 100644 --- a/charts/open-webui/values.yaml +++ b/charts/open-webui/values.yaml @@ -26,6 +26,7 @@ ollama: - key: nvidia.com/gpu operator: Exists effect: NoSchedule + affinity: {} service: type: ClusterIP annotations: {} @@ -35,6 +36,12 @@ ollama: gpu: # -- Enable additional ENV values to help Ollama discover GPU usage enabled: false + ## @param chat.extraEnvVars Extra environment variables + ## e.g: + ## extraEnvVars: + ## - name: FOO + ## value: "bar" + extraEnvVars: [] webui: annotations: {} @@ -65,6 +72,9 @@ webui: selector: {} annotations: {} nodeSelector: {} + # @param chat.affinity Affinity for pod assignment + # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + affinity: {} tolerations: [] service: type: ClusterIP @@ -74,3 +84,9 @@ webui: nodePort: "" labels: {} loadBalancerClass: "" + ## @param chat.extraEnvVars Extra environment variables + ## e.g: + ## extraEnvVars: + ## - name: FOO + ## value: "bar" + extraEnvVars: []