mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-02 12:22:22 +00:00
* fix: Add admin panel URL Helm configuration * fix: Clarify admin panel URL configuration * fix: Avoid duplicate admin panel URL env
35 lines
1.8 KiB
YAML
Executable file
35 lines
1.8 KiB
YAML
Executable file
kind: ConfigMap
|
|
apiVersion: v1
|
|
metadata:
|
|
name: {{ include "librechat.fullname" $ }}-configenv
|
|
data:
|
|
{{- $configEnv := default dict .Values.librechat.configEnv }}
|
|
{{- $adminPanelUrl := .Values.librechat.adminPanelUrl }}
|
|
{{- $configAdminPanelUrl := dig "configEnv" "ADMIN_PANEL_URL" "" .Values.librechat }}
|
|
{{- if (index .Values "librechat-rag-api" "enabled") }}
|
|
RAG_API_URL: http://{{ include "rag.fullname" (index .Subcharts "librechat-rag-api") | lower }}.{{ .Release.Namespace | lower }}.svc.cluster.local:8000
|
|
{{- end }}
|
|
{{- if and (not (dig "configEnv" "MEILI_HOST" "" .Values.librechat)) .Values.meilisearch.enabled }}
|
|
MEILI_HOST: http://{{ include "meilisearch.fullname" .Subcharts.meilisearch }}.{{ .Release.Namespace | lower }}.svc.cluster.local:7700
|
|
{{- end }}
|
|
{{- if and (not (dig "configEnv" "MONGO_URI" "" .Values.librechat)) .Values.mongodb.enabled }}
|
|
MONGO_URI: mongodb://{{ include "mongodb.service.nameOverride" .Subcharts.mongodb }}.{{ .Release.Namespace | lower }}.svc.cluster.local:27017/LibreChat
|
|
{{- end }}
|
|
{{- if and (not (dig "configEnv" "USE_REDIS" "" .Values.librechat)) .Values.redis.enabled }}
|
|
USE_REDIS: "true"
|
|
{{- end }}
|
|
{{- if and (not (dig "configEnv" "REDIS_URI" "" .Values.librechat)) .Values.redis.enabled }}
|
|
REDIS_URI: redis://{{ include "common.names.fullname" .Subcharts.redis }}-master.{{ .Release.Namespace | lower }}.svc.cluster.local:6379
|
|
{{- end }}
|
|
{{- if and $adminPanelUrl (not $configAdminPanelUrl) }}
|
|
ADMIN_PANEL_URL: {{ $adminPanelUrl | quote }}
|
|
{{- end }}
|
|
{{- if $configEnv }}
|
|
{{- $renderedConfigEnv := $configEnv }}
|
|
{{- if and $adminPanelUrl (hasKey $configEnv "ADMIN_PANEL_URL") (not $configAdminPanelUrl) }}
|
|
{{- $renderedConfigEnv = omit $configEnv "ADMIN_PANEL_URL" }}
|
|
{{- end }}
|
|
{{- if $renderedConfigEnv }}
|
|
{{- toYaml $renderedConfigEnv | nindent 2 }}
|
|
{{- end }}
|
|
{{- end }}
|