Skip to content

Commit 6fb9269

Browse files
authored
feat: allow dedicated resources config for web and worker (#57)
Signed-off-by: Ole Markus Kristiansen Ternø <79976935+oterno@users.noreply.github.com>
1 parent 3fac11b commit 6fb9269

File tree

7 files changed

+12
-7
lines changed

7 files changed

+12
-7
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ The following table lists the useful configurable parameters of the Langfuse cha
8686
| `langfuse.web.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe. | `5` |
8787
| `langfuse.web.readinessProbe.failureThreshold` | Failure threshold for readinessProbe. | `5` |
8888
| `langfuse.web.readinessProbe.successThreshold` | Success threshold for readinessProbe. | `1` |
89+
| `langfuse.web.resources` | Set container requests and limits for CPU and memory. | `{}` |
8990
| `langfuse.web.hpa.enabled` | Enable Horizontal Pod Autoscaler (HPA) for the web component. | `false` |
9091
| `langfuse.web.hpa.minReplicas` | Minimum number of replicas for HPA for the web component. | `1` |
9192
| `langfuse.web.hpa.maxReplicas` | Maximum number of replicas for HPA for the web component. | `2` |
@@ -102,6 +103,7 @@ The following table lists the useful configurable parameters of the Langfuse cha
102103
| `langfuse.worker.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe. | `5` |
103104
| `langfuse.worker.livenessProbe.failureThreshold` | Failure threshold for livenessProbe. | `5` |
104105
| `langfuse.worker.livenessProbe.successThreshold` | Success threshold for livenessProbe. | `1` |
106+
| `langfuse.worker.resources` | Set container requests and limits for CPU and memory. | `{}` |
105107
| `langfuse.worker.hpa.enabled` | Enable Horizontal Pod Autoscaler (HPA) for the worker component. | `false` |
106108
| `langfuse.worker.hpa.minReplicas` | Minimum number of replicas for HPA for the worker component. | `1` |
107109
| `langfuse.worker.hpa.maxReplicas` | Maximum number of replicas for HPA for the worker component. | `2` |
@@ -118,6 +120,7 @@ The following table lists the useful configurable parameters of the Langfuse cha
118120
| `service.additionalLabels` | Add additional annotations to the service deployed with the application | `[]` |
119121
| `ingress.enabled` | Enable ingress for the application | `false` |
120122
| `ingress.annotations` | Annotation to add to the deployed ingress | `[]` |
123+
| `resources` | Set shared container requests and limits for web and worker components (not recommended). | `{}` |
121124
| `ingress.hosts` | Hosts to define for the deployed ingress. Effective only if `ingress.enabled` is set to true | `[]` |
122125
| `postgresql.deploy` | Enable postgres deployment (via Bitnami Helm Chart). If you want to use a postgres server already deployed (or a managed one), set this to false | `true` |
123126
| `postgresql.auth.username` | Username to use to connect to the postgres database deployed with Langfuse. In case `postgresql.deploy` is set to `true`, the user will be created automatically. | `postgres` |

charts/langfuse/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: langfuse
3-
version: 0.10.0
3+
version: 0.10.1
44
description: Open source LLM engineering platform - LLM observability, metrics, evaluations, prompt management.
55
type: application
66
keywords:

charts/langfuse/templates/deployment-web.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels:
66
{{- include "langfuse.labels" . | nindent 4 }}
77
spec:
8-
{{- if not .Values.langfuse.web.hpa.enabled }}
8+
{{- if not ((.Values.langfuse.web).hpa).enabled }}
99
replicas: {{ coalesce (.Values.langfuse.web).replicas .Values.replicaCount 1 }}
1010
{{- end }}
1111
selector:
@@ -135,7 +135,7 @@ spec:
135135
successThreshold: {{ coalesce ((.Values.langfuse.web).readinessProbe).successThreshold 1 }}
136136
failureThreshold: {{ coalesce ((.Values.langfuse.web).readinessProbe).failureThreshold 5 }}
137137
resources:
138-
{{- toYaml .Values.resources | nindent 12 }}
138+
{{- toYaml (coalesce ((.Values.langfuse).web).resources .Values.resources) | nindent 12 }}
139139
{{- if .Values.langfuse.extraVolumeMounts }}
140140
volumeMounts:
141141
{{- toYaml .Values.langfuse.extraVolumeMounts | nindent 12 }}

charts/langfuse/templates/deployment-worker.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels:
66
{{- include "langfuse.labels" . | nindent 4 }}
77
spec:
8-
{{- if not .Values.langfuse.worker.hpa.enabled }}
8+
{{- if not ((.Values.langfuse.worker).hpa).enabled }}
99
replicas: {{ coalesce (.Values.langfuse.worker).replicas .Values.replicaCount 1 }}
1010
{{- end }}
1111
selector:
@@ -118,7 +118,7 @@ spec:
118118
successThreshold: {{ coalesce ((.Values.langfuse.worker).livenessProbe).successThreshold 1 }}
119119
failureThreshold: {{ coalesce ((.Values.langfuse.worker).livenessProbe).failureThreshold 5 }}
120120
resources:
121-
{{- toYaml .Values.resources | nindent 12 }}
121+
{{- toYaml (coalesce ((.Values.langfuse).worker).resources .Values.resources) | nindent 12 }}
122122
{{- if .Values.langfuse.extraVolumeMounts }}
123123
volumeMounts:
124124
{{- toYaml .Values.langfuse.extraVolumeMounts | nindent 12 }}

charts/langfuse/templates/hpa-web.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.langfuse.web.hpa.enabled }}
1+
{{- if ((.Values.langfuse.web).hpa).enabled }}
22
apiVersion: autoscaling/v2
33
kind: HorizontalPodAutoscaler
44
metadata:

charts/langfuse/templates/hpa-worker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.langfuse.worker.hpa.enabled }}
1+
{{- if ((.Values.langfuse.worker).hpa).enabled }}
22
apiVersion: autoscaling/v2
33
kind: HorizontalPodAutoscaler
44
metadata:

charts/langfuse/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ langfuse:
2828
extraVolumeMounts: []
2929

3030
web:
31+
resources: {}
3132
hpa:
3233
enabled: false
3334
minReplicas: 1
@@ -41,6 +42,7 @@ langfuse:
4142
updatePolicy:
4243
updateMode: Auto
4344
worker:
45+
resources: {}
4446
hpa:
4547
enabled: false
4648
minReplicas: 1

0 commit comments

Comments
 (0)