theshire/kubernetes/apps/ai/ollama/app/helmrelease.yaml

89 lines
2.2 KiB
YAML
Raw Normal View History

2024-07-17 13:24:41 -05:00
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app ollama
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 3.4.0
2024-07-17 13:24:41 -05:00
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
strategy: rollback
values:
controllers:
ollama:
annotations:
reloader.stakater.com/auto: "true"
pod:
nodeSelector:
nvidia.com/gpu.present: "true"
runtimeClassName: nvidia
containers:
app:
image:
repository: docker.io/ollama/ollama
tag: 0.3.8
2024-07-17 13:24:41 -05:00
env:
- name: OLLAMA_HOST
value: 0.0.0.0
- name: OLLAMA_ORIGINS
value: "*"
- name: OLLAMA_MODELS
value: &modelPath "/models"
- name: OLLAMA_KEEP_ALIVE
value: "24h"
2024-07-17 13:24:41 -05:00
resources:
requests:
nvidia.com/gpu: 1 # requesting 1 GPU
cpu: 500m
memory: 2Gi
limits:
2024-07-22 06:57:15 -05:00
memory: 16Gi
2024-07-17 13:29:39 -05:00
nvidia.com/gpu: 1 # requesting 1 GPU
2024-07-17 13:24:41 -05:00
service:
app:
controller: ollama
ports:
http:
port: 11434
ingress:
app:
enabled: true
className: internal-nginx
hosts:
- host: &host "{{ .Release.Name }}.jahanson.tech"
paths:
- path: /
service:
identifier: app
port: http
tls:
- hosts:
- *host
persistence:
models:
enabled: true
existingClaim: ollama-models
advancedMounts:
2024-07-17 13:28:03 -05:00
ollama:
app:
2024-07-17 13:24:41 -05:00
- path: *modelPath
config:
enabled: true
existingClaim: ollama
globalMounts:
- path: /root/.ollama