You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ai.model | string | `nil` | AI provider+model string. Prefix the model with the provider (e.g., `azure:gpt-4o`). See https://ai.pydantic.dev/models/ for more information. |
These helpers validate chart configuration and fail with clear error messages
754
+
when required values are missing or incorrectly configured.
755
+
*/}}
756
+
757
+
{{/*
758
+
Validate that objectStore.uri is configured (required for production)
759
+
*/}}
760
+
{{- define"logfire.validate.objectStore" -}}
761
+
{{- ifnot.Values.dev.deployMinio -}}
762
+
{{- ifnot.Values.objectStore.uri -}}
763
+
{{- fail "objectStore.uri is required. Set objectStore.uri to your S3/Azure/GCS bucket URI (e.g., 's3://bucket-name' or 'az://container-name'). For local development, you can set dev.deployMinio=true instead." -}}
{{- fail "ingress.hostnames (or ingress.hostname) is required. Specify at least one hostname for Logfire (e.g., hostnames: ['logfire.example.com']). This is needed for CORS and URL generation even if ingress.enabled is false." -}}
776
+
{{- end -}}
777
+
{{- end -}}
778
+
779
+
{{/*
780
+
Validate postgres configuration - either external secret or DSN must be provided
781
+
*/}}
782
+
{{- define"logfire.validate.postgres" -}}
783
+
{{- ifnot.Values.dev.deployPostgres -}}
784
+
{{- if.Values.postgresSecret.enabled -}}
785
+
{{- ifnot.Values.postgresSecret.name -}}
786
+
{{- fail "postgresSecret.name is required when postgresSecret.enabled is true. Provide the name of your Kubernetes Secret containing 'postgresDsn' and 'postgresFFDsn' keys." -}}
787
+
{{- end -}}
788
+
{{- else -}}
789
+
{{- ifnot.Values.postgresDsn -}}
790
+
{{- fail "postgresDsn is required when not using dev.deployPostgres or postgresSecret. Provide a PostgreSQL DSN for the crud database." -}}
791
+
{{- end -}}
792
+
{{- ifnot.Values.postgresFFDsn -}}
793
+
{{- fail "postgresFFDsn is required when not using dev.deployPostgres or postgresSecret. Provide a PostgreSQL DSN for the ff database." -}}
794
+
{{- end -}}
795
+
{{- end -}}
796
+
{{- end -}}
797
+
{{- end -}}
798
+
799
+
{{/*
800
+
Validate dex storage configuration when using external postgres
{{- fail "logfire-dex.config.storage.config.host is required when using postgres storage type. Configure the Dex storage to point to your PostgreSQL instance." -}}
810
+
{{- end -}}
811
+
{{- end -}}
812
+
{{- end -}}
813
+
814
+
{{/*
815
+
Validate AI configuration consistency - if model is set, required provider config must exist
816
+
*/}}
817
+
{{- define"logfire.validate.ai" -}}
818
+
{{- if.Values.ai.model -}}
819
+
{{- $model:=.Values.ai.model -}}
820
+
{{- if hasPrefix "openai:"$model -}}
821
+
{{- ifnot.Values.ai.openAi.apiKey -}}
822
+
{{- fail (printf"ai.openAi.apiKey is required when using OpenAI model '%s'. Provide your OpenAI API key."$model) -}}
823
+
{{- end -}}
824
+
{{- elseif hasPrefix "azure:"$model -}}
825
+
{{- ifnot.Values.ai.azureOpenAi.endpoint -}}
826
+
{{- fail (printf"ai.azureOpenAi.endpoint is required when using Azure OpenAI model '%s'."$model) -}}
827
+
{{- end -}}
828
+
{{- ifnot.Values.ai.azureOpenAi.apiKey -}}
829
+
{{- fail (printf"ai.azureOpenAi.apiKey is required when using Azure OpenAI model '%s'."$model) -}}
830
+
{{- end -}}
831
+
{{- elseif hasPrefix "google-vertex:"$model -}}
832
+
{{- ifnot.Values.ai.vertexAi.region -}}
833
+
{{- fail (printf"ai.vertexAi.region is required when using Google Vertex AI model '%s'."$model) -}}
834
+
{{- end -}}
835
+
{{- end -}}
836
+
{{- end -}}
837
+
{{- end -}}
838
+
839
+
{{/*
840
+
Validate existing secret configuration
841
+
*/}}
842
+
{{- define"logfire.validate.existingSecret" -}}
843
+
{{- if.Values.existingSecret.enabled -}}
844
+
{{- ifnot.Values.existingSecret.name -}}
845
+
{{- fail "existingSecret.name is required when existingSecret.enabled is true. Provide the name of your Kubernetes Secret containing logfire-dex-client-secret, logfire-meta-write-token, logfire-meta-frontend-token, and logfire-jwt-secret keys." -}}
846
+
{{- end -}}
847
+
{{- end -}}
848
+
{{- end -}}
849
+
850
+
{{/*
851
+
Validate admin secret configuration
852
+
*/}}
853
+
{{- define"logfire.validate.adminSecret" -}}
854
+
{{- if.Values.adminSecret.enabled -}}
855
+
{{- ifnot.Values.adminSecret.name -}}
856
+
{{- fail "adminSecret.name is required when adminSecret.enabled is true. Provide the name of your Kubernetes Secret containing logfire-admin-password, logfire-admin-totp-secret, and logfire-admin-totp-recovery-codes keys." -}}
857
+
{{- end -}}
858
+
{{- end -}}
859
+
{{- end -}}
860
+
861
+
{{/*
862
+
Validate autoscaling configuration - warn if both HPA and KEDA are enabled
0 commit comments