Skip to content
Merged
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
2 changes: 1 addition & 1 deletion charts/logfire/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
version: 0.13.8
version: 0.13.9
name: logfire
description: Helm chart for self-hosted Pydantic Logfire

Expand Down
2 changes: 1 addition & 1 deletion charts/logfire/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# logfire

![Version: 0.13.8](https://img.shields.io/badge/Version-0.13.8-informational?style=flat-square) ![AppVersion: db7bde1d](https://img.shields.io/badge/AppVersion-db7bde1d-informational?style=flat-square)
![Version: 0.13.9](https://img.shields.io/badge/Version-0.13.9-informational?style=flat-square) ![AppVersion: db7bde1d](https://img.shields.io/badge/AppVersion-db7bde1d-informational?style=flat-square)

Helm chart for self-hosted Pydantic Logfire

Expand Down
5 changes: 5 additions & 0 deletions charts/logfire/ci/ci-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ objectStore:
AWS_ENDPOINT: http://logfire-minio:9000
AWS_ALLOW_HTTP: "true"

ai:
model: openai:gpt-4o
openAi:
apiKey: dummy

dev:
deployPostgres: true
deployMinio: true
Expand Down
55 changes: 55 additions & 0 deletions charts/logfire/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,61 @@ Usage: {{ include "logfire.renderOtelResourceAttributes" (dict "service.name" "m
{{- join "," $pairs -}}
{{- end -}}

{{/*
Render shared AI provider environment variables for workloads that construct AI clients.
*/}}
{{- define "logfire.aiProviderEnv" -}}
{{- with .Values.ai.openAi }}
{{- with .apiKey }}
- name: OPENAI_API_KEY
{{- if kindIs "map" . }}
{{- if hasKey . "valueFrom" }}
valueFrom:
{{- toYaml .valueFrom | nindent 4 }}
{{- end }}
{{- else }}
value: {{ . }}
{{- end }}
{{- end }}
{{- with .baseUrl }}
- name: OPENAI_BASE_URL
{{- if kindIs "map" . }}
{{- if hasKey . "valueFrom" }}
valueFrom:
{{- toYaml .valueFrom | nindent 4 }}
{{- end }}
{{- else }}
value: {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.ai.vertexAi.region }}
- name: GOOGLE_CLOUD_LOCATION
value: {{ . }}
{{- end }}
{{- with .Values.ai.azureOpenAi }}
{{- with .endpoint }}
- name: AZURE_OPENAI_ENDPOINT
value: {{ . }}
{{- end }}
{{- with .apiKey }}
- name: AZURE_OPENAI_API_KEY
{{- if kindIs "map" . }}
{{- if hasKey . "valueFrom" }}
valueFrom:
{{- toYaml .valueFrom | nindent 4 }}
{{- end }}
{{- else }}
value: {{ . }}
{{- end }}
{{- end }}
{{- with .apiVersion }}
- name: OPENAI_API_VERSION
value: {{ . }}
{{- end }}
{{- end }}
{{- end -}}

{{/*
Create dex config secret name
*/}}
Expand Down
50 changes: 1 addition & 49 deletions charts/logfire/templates/logfire-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,55 +144,7 @@ spec:
- name: AI_MODEL_CHAT
value: {{ . }}
{{- end }}
{{- with .openAi }}
{{- with .apiKey }}
- name: OPENAI_API_KEY
{{- if kindIs "map" . }}
{{- if hasKey . "valueFrom" }}
valueFrom:
{{- toYaml .valueFrom | nindent 16 }}
{{- end }}
{{- else }}
value: {{ . }}
{{- end }}
{{- end }}
{{- with .baseUrl }}
- name: OPENAI_BASE_URL
{{- if kindIs "map" . }}
{{- if hasKey . "valueFrom" }}
valueFrom:
{{- toYaml .valueFrom | nindent 16 }}
{{- end }}
{{- else }}
value: {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- with .vertexAi.region }}
- name: GOOGLE_CLOUD_LOCATION
value: {{ . }}
{{- end }}
{{- with .azureOpenAi }}
{{- with .endpoint}}
- name: AZURE_OPENAI_ENDPOINT
value: {{ . }}
{{- end }}
{{- with .apiKey}}
- name: AZURE_OPENAI_API_KEY
{{- if kindIs "map" . }}
{{- if hasKey . "valueFrom" }}
valueFrom:
{{- toYaml .valueFrom | nindent 16 }}
{{- end }}
{{- else }}
value: {{ . }}
{{- end }}
{{- end }}
{{- with .apiVersion}}
- name: OPENAI_API_VERSION
value: {{ . }}
{{- end }}
{{- end }}
{{ include "logfire.aiProviderEnv" $ | nindent 12 }}
{{- with .enterpriseModel }}
- name: AI_ENTERPRISE_MODEL_DEFAULT
value: {{ . }}
Expand Down
5 changes: 4 additions & 1 deletion charts/logfire/templates/logfire-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@ spec:
value: http://logfire-otel-collector:4317
- name: FRONTEND_HOST
value: {{ include "logfire.url" . | quote }}
{{- with .Values.ai.model }}
{{- with .Values.ai }}
{{- with .model }}
- name: AI_MODEL_DEFAULT
value: {{ . }}
{{- end }}
{{ include "logfire.aiProviderEnv" $ | nindent 12 }}
{{- end }}
- name: USAGE_TO_BUCKET_BUCKET_NAME
value: {{ .Values.objectStore.uri }}/usage
- name: UNSUBSCRIBE_SECRET
Expand Down
Loading