Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 8 additions & 38 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion charts/langfuse/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: langfuse
version: 0.12.1
version: 0.13.0
description: Open source LLM engineering platform - LLM observability, metrics, evaluations, prompt management.
type: application
keywords:
Expand Down
80 changes: 80 additions & 0 deletions charts/langfuse/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,84 @@ Return PostgreSQL fullname
{{- else }}
{{- printf "%s-postgresql" (include "langfuse.fullname" .) -}}
{{- end }}
{{- end }}

{{/*
Create the name of the secret for clickhouse if we use an external database
*/}}
{{- define "langfuse.clickhouseSecretName" -}}
{{- printf "%s-clickhouse" (include "langfuse.fullname" .) -}}
{{- end }}

{{/*
Return clickhouse fullname
*/}}
{{- define "langfuse.clickhouse.fullname" -}}
{{- if .Values.clickhouse.deploy }}
{{- include "common.names.dependency.fullname" (dict "chartName" "clickhouse" "chartValues" .Values.clickhouse "context" $) -}}
{{- else }}
{{- printf "%s-clickhouse" (include "langfuse.fullname" .) -}}
{{- end }}
{{- end }}

{{/*
Clickhouse host
*/}}
{{- define "langfuse.clickhouse.host" -}}
{{- if .Values.clickhouse.deploy }}
{{- (include "langfuse.clickhouse.fullname" .) -}}
{{- else }}
{{- .Values.clickhouse.host -}}
{{- end }}
{{- end }}

{{/*
Return Valkey fullname
*/}}
{{- define "langfuse.valkey.fullname" -}}
Comment thread
mautini marked this conversation as resolved.
{{- if .Values.valkey.deploy }}
{{- include "common.names.dependency.fullname" (dict "chartName" "valkey" "chartValues" .Values.valkey "context" $) -}}
{{- else }}
{{- printf "%s-valkey" (include "langfuse.fullname" .) -}}
{{- end }}
{{- end }}

{{/*
Valkey host
*/}}
{{- define "langfuse.valkey.host" -}}
{{- if .Values.valkey.deploy }}
{{- printf "%s-primary" (include "langfuse.valkey.fullname" .) -}}
{{- else }}
{{- .Values.valkey.host -}}
{{- end }}
{{- end }}

{{/*
Create the name of the secret for minio if we use an external deployment
*/}}
{{- define "langfuse.minioSecretName" -}}
{{- printf "%s-minio" (include "langfuse.fullname" .) -}}
{{- end }}

{{/*
Return minio fullname
*/}}
{{- define "langfuse.minio.fullname" -}}
{{- if .Values.minio.deploy }}
{{- include "common.names.dependency.fullname" (dict "chartName" "minio" "chartValues" .Values.minio "context" $) -}}
{{- else }}
{{- printf "%s-minio" (include "langfuse.fullname" .) -}}
{{- end }}
{{- end }}

{{/*
Minio host
*/}}
{{- define "langfuse.minio.host" -}}
{{- if .Values.minio.deploy }}
{{- (include "langfuse.minio.fullname" .) -}}
{{- else }}
{{- .Values.minio.host -}}
{{- end }}
{{- end }}
11 changes: 11 additions & 0 deletions charts/langfuse/templates/clickhouse-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if and (not .Values.clickhouse.deploy) (.Values.clickhouse.auth.password) -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "langfuse.clickhouseSecretName" . }}
labels:
{{- include "langfuse.labels" . | nindent 4 }}
type: Opaque
data:
admin-password: {{ .Values.clickhouse.auth.password | toString | b64enc | quote }}
{{- end }}
74 changes: 54 additions & 20 deletions charts/langfuse/templates/deployment-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,29 @@ spec:
value: "0.0.0.0"
- name: PORT
value: {{ .Values.langfuse.port | quote }}
- name: NEXTAUTH_URL
value: {{ .Values.langfuse.nextauth.url | quote }}
{{- if .Values.langfuse.nextauth.secret }}
- name: NEXTAUTH_SECRET
valueFrom:
secretKeyRef:
name: {{ include "langfuse.nextauthSecretName" . }}
key: nextauth-secret
{{- end }}
{{- if .Values.langfuse.salt }}
- name: SALT
value: {{ .Values.langfuse.salt | quote }}
{{- end }}
- name: TELEMETRY_ENABLED
value: {{ .Values.langfuse.telemetryEnabled | quote }}
- name: NEXT_PUBLIC_SIGN_UP_DISABLED
value: {{ .Values.langfuse.nextPublicSignUpDisabled | quote }}
- name: ENABLE_EXPERIMENTAL_FEATURES
value: {{ .Values.langfuse.enableExperimentalFeatures | quote }}
{{- if .Values.langfuse.additionalEnv }}
{{- toYaml .Values.langfuse.additionalEnv | nindent 12 }}
{{- end }}
# Postgres
{{- if .Values.postgresql.auth.username }}
- name: DATABASE_USERNAME
value: {{ .Values.postgresql.auth.username | quote }}
Expand Down Expand Up @@ -94,28 +117,39 @@ spec:
key: postgres-shadow-database-url
{{- end }}
{{- end }}
- name: NEXTAUTH_URL
value: {{ .Values.langfuse.nextauth.url | quote }}
{{- if .Values.langfuse.nextauth.secret }}
- name: NEXTAUTH_SECRET
# Redis
- name: REDIS_CONNECTION_STRING
value: "redis://default:{{ .Values.valkey.auth.password }}@{{ (include "langfuse.valkey.host" .) }}:{{ .Values.valkey.primary.service.ports.valkey }}/{{ .Values.valkey.database }}"
# Clickhouse
- name: CLICKHOUSE_MIGRATION_URL
value: "clickhouse://{{ (include "langfuse.clickhouse.host" .) }}:{{ .Values.clickhouse.service.ports.tcp }}"
- name: CLICKHOUSE_URL
value: "http://{{ (include "langfuse.clickhouse.host" .) }}:{{ .Values.clickhouse.service.ports.http }}"
- name: CLICKHOUSE_USER
value: {{ .Values.clickhouse.auth.username }}
- name: CLICKHOUSE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "langfuse.nextauthSecretName" . }}
key: nextauth-secret
{{- end }}
{{- if .Values.langfuse.salt }}
- name: SALT
value: {{ .Values.langfuse.salt | quote }}
{{- end }}
- name: TELEMETRY_ENABLED
value: {{ .Values.langfuse.telemetryEnabled | quote }}
- name: NEXT_PUBLIC_SIGN_UP_DISABLED
value: {{ .Values.langfuse.nextPublicSignUpDisabled | quote }}
- name: ENABLE_EXPERIMENTAL_FEATURES
value: {{ .Values.langfuse.enableExperimentalFeatures | quote }}
{{- if .Values.langfuse.additionalEnv }}
{{- toYaml .Values.langfuse.additionalEnv | nindent 12 }}
{{- end }}
name: {{ include "langfuse.clickhouse.fullname" . }}
key: admin-password
# S3 / MinIO
- name: LANGFUSE_S3_EVENT_UPLOAD_ENABLED
value: "true"
- name: LANGFUSE_S3_EVENT_UPLOAD_BUCKET
value: {{ .Values.minio.defaultBuckets }}
- name: LANGFUSE_S3_EVENT_UPLOAD_REGION
value: auto
- name: LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID
value: {{ .Values.minio.auth.rootUser }}
- name: LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ include "langfuse.minio.fullname" . }}
key: root-password
- name: LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT
value: "http://{{ (include "langfuse.minio.host" .) }}:{{ .Values.minio.service.ports.api }}"
- name: LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE
value: "true"
ports:
- name: http
containerPort: {{ .Values.langfuse.port }}
Expand Down
72 changes: 53 additions & 19 deletions charts/langfuse/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,26 @@ spec:
value: "0.0.0.0"
- name: PORT
value: {{ .Values.langfuse.port | quote }}
- name: NEXTAUTH_URL
value: {{ .Values.langfuse.nextauth.url | quote }}
{{- if .Values.langfuse.nextauth.secret }}
- name: NEXTAUTH_SECRET
valueFrom:
secretKeyRef:
name: {{ include "langfuse.nextauthSecretName" . }}
key: nextauth-secret
{{- end }}
{{- if .Values.langfuse.salt }}
- name: SALT
value: {{ .Values.langfuse.salt | quote }}
{{- end }}
- name: TELEMETRY_ENABLED
value: {{ .Values.langfuse.telemetryEnabled | quote }}
- name: NEXT_PUBLIC_SIGN_UP_DISABLED
value: {{ .Values.langfuse.nextPublicSignUpDisabled | quote }}
- name: ENABLE_EXPERIMENTAL_FEATURES
value: {{ .Values.langfuse.enableExperimentalFeatures | quote }}
# Postgres
- name: DATABASE_USERNAME
value: {{ .Values.postgresql.auth.username | quote }}
- name: DATABASE_PASSWORD
Expand Down Expand Up @@ -82,28 +102,42 @@ spec:
key: postgres-shadow-database-url
{{- end }}
{{- end }}
- name: NEXTAUTH_URL
value: {{ .Values.langfuse.nextauth.url | quote }}
{{- if .Values.langfuse.nextauth.secret }}
- name: NEXTAUTH_SECRET
valueFrom:
secretKeyRef:
name: {{ include "langfuse.nextauthSecretName" . }}
key: nextauth-secret
{{- end }}
{{- if .Values.langfuse.salt }}
- name: SALT
value: {{ .Values.langfuse.salt | quote }}
{{- end }}
- name: TELEMETRY_ENABLED
value: {{ .Values.langfuse.telemetryEnabled | quote }}
- name: NEXT_PUBLIC_SIGN_UP_DISABLED
value: {{ .Values.langfuse.nextPublicSignUpDisabled | quote }}
- name: ENABLE_EXPERIMENTAL_FEATURES
value: {{ .Values.langfuse.enableExperimentalFeatures | quote }}
{{- if .Values.langfuse.additionalEnv }}
{{- toYaml .Values.langfuse.additionalEnv | nindent 12 }}
{{- end }}
# Redis
- name: REDIS_CONNECTION_STRING
value: "redis://default:{{ .Values.valkey.auth.password }}@{{ (include "langfuse.valkey.host" .) }}:{{ .Values.valkey.primary.service.ports.valkey }}/{{ .Values.valkey.database }}"
# Clickhouse
- name: CLICKHOUSE_MIGRATION_URL
value: "clickhouse://{{ (include "langfuse.clickhouse.host" .) }}:{{ .Values.clickhouse.service.ports.tcp }}"
- name: CLICKHOUSE_URL
value: "http://{{ (include "langfuse.clickhouse.host" .) }}:{{ .Values.clickhouse.service.ports.http }}"
- name: CLICKHOUSE_USER
value: {{ .Values.clickhouse.auth.username }}
- name: CLICKHOUSE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "langfuse.clickhouse.fullname" . }}
key: admin-password
# S3 / MinIO
- name: LANGFUSE_S3_EVENT_UPLOAD_ENABLED
value: "true"
- name: LANGFUSE_S3_EVENT_UPLOAD_BUCKET
value: {{ .Values.minio.defaultBuckets }}
- name: LANGFUSE_S3_EVENT_UPLOAD_REGION
value: auto
- name: LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID
value: {{ .Values.minio.auth.rootUser }}
- name: LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ include "langfuse.minio.fullname" . }}
key: root-password
- name: LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT
value: "http://{{ (include "langfuse.minio.host" .) }}:{{ .Values.minio.service.ports.api }}"
- name: LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE
value: "true"
ports:
- name: http
containerPort: {{ .Values.langfuse.port }}
Expand Down
11 changes: 11 additions & 0 deletions charts/langfuse/templates/minio-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if and (not .Values.minio.deploy) (.Values.minio.auth.rootPassword) -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "langfuse.minioSecretName" . }}
labels:
{{- include "langfuse.labels" . | nindent 4 }}
type: Opaque
data:
root-password: {{ .Values.minio.auth.rootPassword | toString | b64enc | quote }}
{{- end }}
43 changes: 15 additions & 28 deletions charts/langfuse/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,33 +57,6 @@ langfuse:
updateMode: Auto

additionalEnv:
# REDIS
- name: "REDIS_CONNECTION_STRING"
value: "redis://default:changeme@langfuse-valkey-primary:6379/0"
# CLICKHOUSE
- name: "CLICKHOUSE_MIGRATION_URL"
value: "clickhouse://langfuse-clickhouse:9000"
- name: "CLICKHOUSE_URL"
value: "http://langfuse-clickhouse:8123"
- name: "CLICKHOUSE_USER"
value: "default"
- name: "CLICKHOUSE_PASSWORD"
value: "changeme"
# S3 / MinIO
- name: "LANGFUSE_S3_EVENT_UPLOAD_ENABLED"
value: "true"
- name: "LANGFUSE_S3_EVENT_UPLOAD_BUCKET"
value: "langfuse"
- name: "LANGFUSE_S3_EVENT_UPLOAD_REGION"
value: "auto"
- name: "LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID"
value: "minio"
- name: "LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY"
value: "miniosecret"
- name: "LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT"
value: "http://langfuse-minio:9000"
- name: "LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE"
value: "true"

serviceAccount:
create: true
Expand Down Expand Up @@ -113,12 +86,12 @@ tolerations: []
affinity: {}

postgresql:
deploy: true
host: langfuse-postgresql
auth:
username: postgres
password: postgres
database: postgres_langfuse
deploy: true
architecture: standalone
primary:
service:
Expand All @@ -127,25 +100,39 @@ postgresql:

clickhouse:
deploy: true
host: langfuse-clickhouse
shards: 1 # Fixed. Langfuse does not support multi-shard clusters.
replicaCount: 3
resourcesPreset: 2xlarge
service:
ports:
http: 8123
tcp: 9000
auth:
username: default
password: changeme

valkey:
deploy: true
host: langfuse-valkey-primary
database: 0
architecture: standalone
primary:
service:
ports:
valkey: 6379
extraFlags:
- "--maxmemory-policy noeviction"
auth:
password: changeme

minio:
deploy: true
host: langfuse-minio
defaultBuckets: 'langfuse'
service:
ports:
api: 9000
auth:
rootUser: 'minio'
rootPassword: 'miniosecret'
Expand Down