OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.
Python
Merge main and resolve conflicts by migrating env vars to .env secret templates
Lucas Oliveira59dfd489a31e
diff --cc kubernetes/helm/openrag/templates/backend/backend-dotenv.yamlindex 000000000,afa7aeacb..c6d96f741mode 000000,100644..100644--- a/kubernetes/helm/openrag/templates/backend/backend-dotenv.yaml+++ b/kubernetes/helm/openrag/templates/backend/backend-dotenv.yaml@@@ -1,0 -1,208 +1,206 @@@+ {{- /*+ Creates a Secret with a single key ".env" that can be mounted into a pod as a file.++ Notes:+ - Uses stringData so you don't need to base64 encode manually.+ - Omits env vars whose source values are empty / unset.+ - Includes booleans / numbers from values.yaml because those are explicitly set.+ */ -}}+ {{- if .Values.backend.enabled }}+ {{- $sessionSecret := "" }}+ {{- $secretName := printf "%s-backend" (include "openrag.fullname" .) }}+ {{- $secretNamespace := include "openrag.namespace" . }}+ {{- $existingSecret := lookup "v1" "Secret" $secretNamespace $secretName }}+ {{- if $existingSecret }}+ {{- $sessionSecret = index $existingSecret.data "session-secret" | b64dec }}+ {{- else }}+ {{- $sessionSecret = include "openrag.backend.sessionSecret" . }}+ {{- end }}+ apiVersion: v1+ kind: Secret+ metadata:+ name: {{ include "openrag.fullname" . }}-dotenv+ namespace: {{ include "openrag.namespace" . }}+ labels:+ {{- include "openrag.labels" . | nindent 4 }}+ type: Opaque+ stringData:+ .env: |+ # Generated from Helm values.yaml (OpenRAG)+ # Mounted as a file into the pod++ IBM_AUTH_ENABLED={{ .Values.backend.auth.ibmCloud.enabled}}++ # Ingestion Configuration+ DISABLE_INGEST_WITH_LANGFLOW={{ ternary "true" "false" .Values.backend.features.disableIngestWithLangflow }}+ INGEST_SAMPLE_DATA={{ ternary "true" "false" .Values.backend.features.ingestSampleData }}++ # Langflow HTTP timeout configuration+ {{- if .Values.backend.langflowTimeout }}+ LANGFLOW_TIMEOUT={{ .Values.backend.langflowTimeout }}+ {{- end }}+ {{- if .Values.backend.langflowConnectTimeout }}+ LANGFLOW_CONNECT_TIMEOUT={{ .Values.backend.langflowConnectTimeout }}+ {{- end }}+ {{- if .Values.backend.ingestionTimeout }}+ INGESTION_TIMEOUT={{ .Values.backend.ingestionTimeout }}+ {{- end }}+ {{- if .Values.backend.uploadBatchSize }}+ UPLOAD_BATCH_SIZE={{ .Values.backend.uploadBatchSize }}+ {{- end }}++ # Langflow url+ LANGFLOW_URL={{ include "openrag.langflow.url" . | quote }}++ # Flow IDs+ {{- if .Values.langflow.flows.chatFlowId }}+ LANGFLOW_CHAT_FLOW_ID={{ .Values.langflow.flows.chatFlowId | quote }}+ {{- end }}+ {{- if .Values.langflow.flows.ingestFlowId }}+ LANGFLOW_INGEST_FLOW_ID={{ .Values.langflow.flows.ingestFlowId | quote }}+ {{- end }}+ {{- if .Values.langflow.flows.urlIngestFlowId }}+ LANGFLOW_URL_INGEST_FLOW_ID={{ .Values.langflow.flows.urlIngestFlowId | quote }}+ {{- end }}+ {{- if .Values.langflow.flows.nudgesFlowId }}+ NUDGES_FLOW_ID={{ .Values.langflow.flows.nudgesFlowId | quote }}+ {{- end }}++ # OpenSearch+ {{- if .Values.global.opensearch.password }}+ OPENSEARCH_PASSWORD={{ .Values.global.opensearch.password | quote }}+ {{- end }}+ OPENSEARCH_DATA_PATH=./opensearch-data- {{- if .Values.global.opensearch.host }}- OPENSEARCH_HOST={{ .Values.global.opensearch.host | quote }}- {{- end }}- {{- if .Values.global.opensearch.port }}++ OPENSEARCH_HOST={{ include "openrag.opensearch.host" . | quote }}+ OPENSEARCH_PORT={{ .Values.global.opensearch.port | quote }}- {{- end }}+ {{- if .Values.global.opensearch.username }}+ OPENSEARCH_USERNAME={{ .Values.global.opensearch.username | quote }}+ {{- end }}+ {{- if .Values.global.opensearch.indexName }}+ OPENSEARCH_INDEX_NAME={{ .Values.global.opensearch.indexName | quote }}+ {{- end }}++ LANGFLOW_OPENSEARCH_HOST={{ include "openrag.langflow.opensearch.host" . | quote }}++ LANGFLOW_OPENSEARCH_PORT={{ include "openrag.langflow.opensearch.port" . | quote }}++ # Google OAuth+ {{- if .Values.global.oauth.google.clientId }}+ GOOGLE_OAUTH_CLIENT_ID={{ .Values.global.oauth.google.clientId | quote }}+ {{- end }}+ {{- if .Values.global.oauth.google.clientSecret }}+ GOOGLE_OAUTH_CLIENT_SECRET={{ .Values.global.oauth.google.clientSecret | quote }}+ {{- end }}++ # Microsoft Graph OAuth+ {{- if .Values.global.oauth.microsoft.clientId }}+ MICROSOFT_GRAPH_OAUTH_CLIENT_ID={{ .Values.global.oauth.microsoft.clientId | quote }}+ {{- end }}+ {{- if .Values.global.oauth.microsoft.clientSecret }}+ MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET={{ .Values.global.oauth.microsoft.clientSecret | quote }}+ {{- end }}++ # Webhook (continuous ingest)+ {{- if .Values.backend.webhook.baseUrl }}+ WEBHOOK_BASE_URL={{ .Values.backend.webhook.baseUrl | quote }}+ {{- end }}++ # Model Provider API Keys / Endpoints+ {{- if .Values.llmProviders.openai.apiKey }}+ OPENAI_API_KEY={{ .Values.llmProviders.openai.apiKey | quote }}+ {{- end }}+ {{- if .Values.llmProviders.anthropic.apiKey }}+ ANTHROPIC_API_KEY={{ .Values.llmProviders.anthropic.apiKey | quote }}+ {{- end }}+ {{- if .Values.llmProviders.ollama.endpoint }}+ OLLAMA_ENDPOINT={{ .Values.llmProviders.ollama.endpoint | quote }}+ {{- end }}+ {{- if .Values.llmProviders.watsonx.apiKey }}+ WATSONX_API_KEY={{ .Values.llmProviders.watsonx.apiKey | quote }}+ {{- end }}+ {{- if .Values.llmProviders.watsonx.endpoint }}+ WATSONX_ENDPOINT={{ .Values.llmProviders.watsonx.endpoint | quote }}+ {{- end }}+ {{- if .Values.llmProviders.watsonx.projectId }}+ WATSONX_PROJECT_ID={{ .Values.llmProviders.watsonx.projectId | quote }}+ {{- end }}++ # LLM / Embedding provider configuration+ {{- if .Values.appConfig.agent.llmProvider }}+ LLM_PROVIDER={{ .Values.appConfig.agent.llmProvider | quote }}+ {{- end }}+ {{- if .Values.appConfig.agent.llmModel }}+ LLM_MODEL={{ .Values.appConfig.agent.llmModel | quote }}+ {{- end }}+ {{- if .Values.appConfig.knowledge.embeddingProvider }}+ EMBEDDING_PROVIDER={{ .Values.appConfig.knowledge.embeddingProvider | quote }}+ {{- end }}+ {{- if .Values.appConfig.knowledge.embeddingModel }}+ EMBEDDING_MODEL={{ .Values.appConfig.knowledge.embeddingModel | quote }}+ {{- end }}++ # Port Configuration+ {{- if .Values.backend.langflowPublicUrl }}+ LANGFLOW_PUBLIC_URL={{ .Values.backend.langflowPublicUrl | quote }}+ {{- end }}++ # Docling (optional override)+ {{- if and .Values.global.docling.scheme .Values.global.docling.host .Values.global.docling.port }}+ DOCLING_SERVE_URL={{ printf "%s://%s:%v" .Values.global.docling.scheme .Values.global.docling.host .Values.global.docling.port | quote }}+ {{- end }}++ # Langflow auth+ {{- if .Values.langflow.auth.superuser }}+ LANGFLOW_SUPERUSER={{ .Values.langflow.auth.superuser | quote }}+ {{- end }}+ {{- if .Values.langflow.auth.superuserPassword }}+ LANGFLOW_SUPERUSER_PASSWORD={{ .Values.langflow.auth.superuserPassword | quote }}+ {{- end }}++ # Optional workers+ {{- if .Values.backend.maxWorkers }}+ MAX_WORKERS={{ .Values.backend.maxWorkers | quote }}+ {{- end }}++ # OpenRAG Configuration+ {{- if .Values.global.imageTag }}+ OPENRAG_VERSION={{ .Values.global.imageTag | quote }}+ {{- end }}+ {{- if .Values.backend.persistence.documents.mountPath }}+ OPENRAG_DOCUMENTS_PATH={{ .Values.backend.persistence.documents.mountPath | quote }}+ {{- end }}+ {{- if .Values.backend.encryption.key }}+ OPENRAG_ENCRYPTION_KEY={{ .Values.backend.encryption.key | quote }}+ {{- end }}++ # Langflow auth (OpenRag uses this to determine how to authenticate with Langflow)+ LANGFLOW_AUTO_LOGIN={{ ternary "true" "false" .Values.langflow.auth.autoLogin }}++ # OpenRag / OAuth return URL (Included in OAuth State)+ OAUTH_BROKER_URL={{ .Values.backend.oauthBrokerUrl | quote }}++ # Langflow API Key / Secret Key+ {{- if .Values.langflow.auth.apiKey }}+ LANGFLOW_KEY={{ .Values.langflow.auth.apiKey | quote }}+ {{- end }}+ {{- if .Values.langflow.auth.secretKey }}+ LANGFLOW_SECRET_KEY={{ .Values.langflow.auth.secretKey | quote }}+ {{- end }}++ {{- if .Values.langflow.auth.keyRetries }}+ LANGFLOW_KEY_RETRIES={{ .Values.langflow.auth.keyRetries | quote }}+ {{- end }}+ {{- if .Values.langflow.auth.keyRetryDelay }}+ LANGFLOW_KEY_RETRY_DELAY={{ .Values.langflow.auth.keyRetryDelay | quote }}+ {{- end }}++ # Logging and Service+ {{- if .Values.backend.logFormat }}+ LOG_FORMAT={{ .Values.backend.logFormat | quote }}+ {{- end }}+ {{- if .Values.backend.logLevel }}+ LOG_LEVEL={{ .Values.backend.logLevel | quote }}+ {{- end }}+ {{- if .Values.backend.serviceName }}+ SERVICE_NAME={{ .Values.backend.serviceName | quote }}+ {{- end }}+ SESSION_SECRET={{ $sessionSecret | quote }}+ {{- end }}diff --cc kubernetes/helm/openrag/templates/backend/deployment.yamlindex 71b2926aa,d82ef9b00..8efb31c1f--- a/kubernetes/helm/openrag/templates/backend/deployment.yaml+++ b/kubernetes/helm/openrag/templates/backend/deployment.yaml@@@ -18,11 -18,11 +18,9 @@@ speclabels:{{- include "openrag.backend.selectorLabels" . | nindent 8 }}annotations:-- checksum/secret-opensearch: {{ include (print $.Template.BasePath "/secrets/opensearch-secret.yaml") . | sha256sum }}-- checksum/secret-langflow: {{ include (print $.Template.BasePath "/secrets/langflow-secret.yaml") . | sha256sum }}-- checksum/config-flows: {{ include (print $.Template.BasePath "/configmaps/flow-ids-configmap.yaml") . | sha256sum }}-- checksum/config-app: {{ include (print $.Template.BasePath "/configmaps/app-config-configmap.yaml") . | sha256sum }}-- checksum/secret-backend: {{ include (print $.Template.BasePath "/secrets/backend-secret.yaml") . | sha256sum }}++ checksum/secret-backend: {{ include (print $.Template.BasePath "/templates/backend/backend-dotenv.yaml") . | sha256sum }}++ checksum/secret-opensearch: {{ include (print $.Template.BasePath "/templates/secrets/opensearch-secret.yaml") . | sha256sum }}++ checksum/config-app: {{ include (print $.Template.BasePath "/templates/configmaps/app-config-configmap.yaml") . | sha256sum }}spec:serviceAccountName: {{ include "openrag.serviceAccountName" . }}{{- with .Values.podSecurityContext }}diff --cc kubernetes/helm/openrag/templates/langflow/deployment.yamlindex 98a0d9efc,c355cc265..a996d5d5d--- a/kubernetes/helm/openrag/templates/langflow/deployment.yaml+++ b/kubernetes/helm/openrag/templates/langflow/deployment.yaml@@@ -18,8 -18,8 +18,7 @@@ speclabels:{{- include "openrag.langflow.selectorLabels" . | nindent 8 }}annotations:-- checksum/secret: {{ include (print $.Template.BasePath "/secrets/langflow-secret.yaml") . | sha256sum }}-- checksum/config: {{ include (print $.Template.BasePath "/configmaps/flow-ids-configmap.yaml") . | sha256sum }}++ checksum/secret: {{ include (print $.Template.BasePath "/templates/langflow/langflow-dotenv.yaml") . | sha256sum }}spec:serviceAccountName: {{ include "openrag.serviceAccountName" . }}diff --cc kubernetes/helm/openrag/templates/langflow/langflow-dotenv.yamlindex 000000000,cc428daf7..7a2972b42mode 000000,100644..100644--- a/kubernetes/helm/openrag/templates/langflow/langflow-dotenv.yaml+++ b/kubernetes/helm/openrag/templates/langflow/langflow-dotenv.yaml@@@ -1,0 -1,168 +1,168 @@@+ {{- /*+ Creates a Secret with a single key ".env" that can be mounted into a pod as a file.++ Notes:+ - Uses stringData so you don't need to base64 encode manually.+ - Omits env vars whose source values are empty / unset.+ - Includes booleans / numbers from values.yaml because those are explicitly set.+ */ -}}+ {{- if .Values.backend.enabled }}+ {{- $postgresPassword := "" }}+ {{- if .Values.postgres.enabled }}+ {{- $secretName := printf "%s-postgres" (include "openrag.fullname" .) }}+ {{- $secretNamespace := include "openrag.namespace" . }}+ {{- $existingSecret := lookup "v1" "Secret" $secretNamespace $secretName }}+ {{- if $existingSecret }}+ {{- $postgresPassword = index $existingSecret.data "postgres-password" | b64dec }}+ {{- else }}+ {{- /* If postgres secret doesn't exist yet, it will be created by postgres-secret.yaml with a generated password.+ During helm install, both secrets are created in the same transaction, so we generate the same password here.+ This ensures consistency between postgres-secret and langflow-dotenv on first install. */ -}}+ {{- $postgresPassword = include "openrag.postgres.password" . }}+ {{- end }}+ {{- end }}+ apiVersion: v1+ kind: Secret+ metadata:+ name: {{ include "openrag.fullname" . }}-langflow-dotenv+ namespace: {{ include "openrag.namespace" . }}+ labels:+ {{- include "openrag.labels" . | nindent 4 }}+ annotations:+ helm.sh/resource-policy: keep+ type: Opaque+ stringData:+ .env: |+ # Generated from Helm values.yaml (OpenRAG)+ # Mounted as a file into the pod++ # Langflow core settings+ LANGFLOW_LOAD_FLOWS_PATH={{ .Values.langflow.persistence.mountPath }}/{{ .Values.langflow.persistence.flowsSubPath }}+ {{- if .Values.postgres.enabled }}+ LANGFLOW_DATABASE_URL="postgresql://{{ .Values.postgres.username }}:{{ $postgresPassword }}@{{ include "openrag.fullname" . }}-postgres:{{ .Values.postgres.service.port }}/{{ .Values.postgres.database }}"+ {{- else }}+ LANGFLOW_DATABASE_URL="sqlite:///{{ .Values.langflow.persistence.mountPath }}/{{ .Values.langflow.persistence.dbSubPath }}"+ {{- end }}+ LANGFLOW_DEACTIVATE_TRACING={{ .Values.langflow.deactivateTracing | quote }}+ LANGFLOW_LOG_LEVEL={{ .Values.langflow.logLevel | quote }}+ HIDE_GETTING_STARTED_PROGRESS="true"++ # Langflow API secret key (https://docs.langflow.org/api-keys-and-authentication#langflow-secret-key)+ {{- if .Values.langflow.auth.secretKey }}+ LANGFLOW_SECRET_KEY={{ .Values.langflow.auth.secretKey | quote }}+ {{- end }}++ # Model Provider API Keys / Endpoints+ {{- if .Values.llmProviders.openai.apiKey }}+ OPENAI_API_KEY={{ .Values.llmProviders.openai.apiKey | quote }}+ {{- else }}+ OPENAI_API_KEY="None"+ {{- end }}+ {{- if .Values.llmProviders.anthropic.apiKey }}+ ANTHROPIC_API_KEY={{ .Values.llmProviders.anthropic.apiKey | quote }}+ {{- else }}+ ANTHROPIC_API_KEY="None"+ {{- end }}+ {{- if .Values.llmProviders.ollama.endpoint }}+ OLLAMA_BASE_URL={{ .Values.llmProviders.ollama.endpoint | quote }}+ {{- else }}+ OLLAMA_BASE_URL="None"+ {{- end }}+ {{- if .Values.llmProviders.watsonx.apiKey }}+ WATSONX_API_KEY={{ .Values.llmProviders.watsonx.apiKey | quote }}+ {{- else }}+ WATSONX_API_KEY="None"+ {{- end }}+ {{- if .Values.llmProviders.watsonx.endpoint }}+ WATSONX_ENDPOINT={{ .Values.llmProviders.watsonx.endpoint | quote }}+ {{- else }}+ WATSONX_ENDPOINT="None"+ {{- end }}+ {{- if .Values.llmProviders.watsonx.projectId }}+ WATSONX_PROJECT_ID={{ .Values.llmProviders.watsonx.projectId | quote }}+ {{- else }}+ WATSONX_PROJECT_ID="None"+ {{- end }}++ # LLM / Embedding provider configuration+ {{- if .Values.appConfig.agent.llmProvider }}+ LLM_PROVIDER={{ .Values.appConfig.agent.llmProvider | quote }}+ {{- end }}+ {{- if .Values.appConfig.agent.llmModel }}+ LLM_MODEL={{ .Values.appConfig.agent.llmModel | quote }}+ {{- end }}+ {{- if .Values.appConfig.knowledge.embeddingProvider }}+ EMBEDDING_PROVIDER={{ .Values.appConfig.knowledge.embeddingProvider | quote }}+ {{- end }}+ {{- if .Values.appConfig.knowledge.embeddingModel }}+ EMBEDDING_MODEL={{ .Values.appConfig.knowledge.embeddingModel | quote }}+ {{- end }}++ # Docling service URL+ {{- if and .Values.global.docling.scheme .Values.global.docling.host .Values.global.docling.port }}+ DOCLING_SERVE_URL={{ printf "%s://%s:%v" .Values.global.docling.scheme .Values.global.docling.host .Values.global.docling.port | quote }}+ {{- end }}++ # OpenSearch connection (for flows)- OPENSEARCH_HOST={{ .Values.global.opensearch.host | quote }}- OPENSEARCH_PORT={{ .Values.global.opensearch.port | quote }}- OPENSEARCH_URL={{ include "openrag.opensearch.url" . | quote }}++ OPENSEARCH_HOST={{ include "openrag.langflow.opensearch.host" . | quote }}++ OPENSEARCH_PORT={{ include "openrag.langflow.opensearch.port" . | quote }}++ OPENSEARCH_URL={{ include "openrag.langflow.opensearch.url" . | quote }}+ OPENSEARCH_INDEX_NAME={{ .Values.global.opensearch.indexName | quote }}+ {{- if .Values.global.opensearch.password }}+ OPENSEARCH_PASSWORD={{ .Values.global.opensearch.password | quote }}+ {{- end }}++ # Langflow auth+ LANGFLOW_AUTO_LOGIN={{ ternary "true" "false" .Values.langflow.auth.autoLogin }}+ LANGFLOW_SKIP_AUTH_AUTO_LOGIN={{ ternary "true" "false" .Values.langflow.auth.skipAuthAutoLogin }}++ {{- if .Values.langflow.auth.superuser }}+ LANGFLOW_SUPERUSER={{ .Values.langflow.auth.superuser | quote }}+ {{- end }}+ {{- if .Values.langflow.auth.superuserPassword }}+ LANGFLOW_SUPERUSER_PASSWORD={{ .Values.langflow.auth.superuserPassword | quote }}+ {{- end }}+ LANGFLOW_NEW_USER_IS_ACTIVE={{ ternary "true" "false" .Values.langflow.auth.newUserIsActive }}+ LANGFLOW_ENABLE_SUPERUSER_CLI={{ ternary "true" "false" .Values.langflow.auth.enableSuperuserCli }}++ # Langfuse tracing (optional)+ {{- if .Values.langflow.langfuse.secretKey }}+ LANGFUSE_SECRET_KEY={{ .Values.langflow.langfuse.secretKey | quote }}+ {{- end }}+ {{- if .Values.langflow.langfuse.publicKey }}+ LANGFUSE_PUBLIC_KEY={{ .Values.langflow.langfuse.publicKey | quote }}+ {{- end }}+ {{- if .Values.langflow.langfuse.host }}+ LANGFUSE_HOST={{ .Values.langflow.langfuse.host | quote }}+ {{- end }}++ # Variables to expose to flows (NOTE: must use valid env var names; no hyphens)+ LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT={{ .Values.langflow.variablesToGetFromEnvironment | quote }}++ # Flow context variables (defaults for flow execution)+ JWT={{ .Values.langflow.flowDefaults.jwt | quote }}+ OWNER={{ .Values.langflow.flowDefaults.owner | quote }}+ OWNER_NAME={{ .Values.langflow.flowDefaults.ownerName | quote }}+ OWNER_EMAIL={{ .Values.langflow.flowDefaults.ownerEmail | quote }}+ CONNECTOR_TYPE={{ .Values.langflow.flowDefaults.connectorType | quote }}+ CONNECTOR_TYPE_URL={{ .Values.langflow.flowDefaults.connectorTypeUrl | quote }}+ DOCUMENT_ID={{ .Values.langflow.flowDefaults.documentId | quote }}+ SOURCE_URL={{ .Values.langflow.flowDefaults.sourceUrl | quote }}+ ALLOWED_USERS={{ .Values.langflow.flowDefaults.allowedUsers | quote }}+ ALLOWED_GROUPS={{ .Values.langflow.flowDefaults.allowedGroups | quote }}+ OPENRAG-QUERY-FILTER={{ .Values.langflow.openragQueryFilter | quote }}+ FILENAME={{ .Values.langflow.flowDefaults.filename | quote }}+ MIMETYPE={{ .Values.langflow.flowDefaults.mimetype | quote }}+ FILESIZE={{ .Values.langflow.flowDefaults.filesize | quote }}+ SELECTED_EMBEDDING_MODEL={{ .Values.langflow.flowDefaults.selectedEmbeddingModel | quote }}++ # Langflow API Key generation / retries+ LANGFLOW_KEY={{ .Values.langflow.auth.apiKey | quote }}+ {{- if .Values.langflow.auth.keyRetries }}+ LANGFLOW_KEY_RETRIES={{ .Values.langflow.auth.keyRetries | quote }}+ {{- end }}+ {{- if .Values.langflow.auth.keyRetryDelay }}+ LANGFLOW_KEY_RETRY_DELAY={{ .Values.langflow.auth.keyRetryDelay | quote }}+ {{- end }}++ {{- end }}