values.yaml
Overview
The values.yaml file is a Helm chart values configuration file used to define customizable parameters for deploying a containerized application stack, likely related to a RAG (Retrieval-Augmented Generation) flow platform. This file specifies environment variables, container image details, resource configurations, storage options, service types, and ingress settings for multiple components such as RAGFlow, document engines (Elasticsearch, OpenSearch, Infinity), MinIO, MySQL, and Redis.
This configuration file acts as the primary source of deployment customization, enabling users or operators to control how the application and its dependent services are deployed in a Kubernetes environment. It supports setting passwords, image versions, resource requests, and service exposure types, among others, facilitating both local development and production-grade deployments.
Detailed Explanation
File Structure and Key Sections
The file is structured in YAML format with the following major sections:
Global Configuration
Environment Variables (
env)Component-Specific Configuration
Ingress Configuration
1. Global Configuration
imagePullSecrets: []
Purpose:
Defines global image pull secrets for pulling container images from private registries. This is a list of references to Kubernetes secrets.
Usage:
Empty by default; can be populated with secrets to authenticate image pulls.
2. Environment Variables (env)
This section defines environment variables that configure various services and their behavior.
Key Variables:
Variable | Description | Default / Example |
|---|---|---|
| Selects the document engine type. Options: |
|
| Version of Elasticsearch to deploy. |
|
| Password for Elasticsearch authentication. |
|
| Password for OpenSearch with complexity requirements. |
|
| Password for MySQL database. |
|
| Database name for MySQL service. |
|
| Username for MinIO object storage. |
|
| Password for MinIO. |
|
| Password for Redis. |
|
| Local time zone setting. |
|
| (Commented) Alternative HuggingFace mirror endpoint for restricted access environments. | N/A |
| (Commented) Max file size for uploads in bytes. Requires corresponding nginx config update. |
|
| Number of document chunks processed per batch during parsing. |
|
| Number of text chunks processed per batch during embedding vectorization. |
|
3. Component-Specific Configuration
Each service/component has its own nested configuration specifying container images, storage, deployment, and service details.
3.1 ragflow
ragflow:
image:
repository: infiniflow/ragflow
tag: v0.20.5-slim
pullPolicy: IfNotPresent
pullSecrets: []
service_conf:
llm_factories:
deployment:
strategy:
resources:
service:
type: ClusterIP
api:
service:
enabled: true
type: ClusterIP
Purpose: Configuration for the RAGFlow application container.
Image: Container image and tag.
service_conf: Optional overrides written into
local.service_conf.yamlinside the container.llm_factories: Optional JSON/YAML overrides for
llm_factories.jsoninside the container, describing LLM factories and capabilities.deployment: Kubernetes deployment strategy and resource requests/limits.
service: Kubernetes service type; by default
ClusterIP.api.service: API service enablement and service type.
Usage example:
To expose the RAGFlow API externally, set ragflow.api.service.enabled: true and change type to LoadBalancer.
3.2 infinity
infinity:
image:
repository: infiniflow/infinity
tag: v0.6.0-dev5
pullPolicy: IfNotPresent
pullSecrets: []
storage:
className:
capacity: 5Gi
deployment:
strategy:
resources:
service:
type: ClusterIP
Purpose: Configuration for the Infinity document engine.
Storage: Persistent volume claim class and capacity (default 5Gi).
Deployment and service: Kubernetes deployment strategy, resources, and service type.
3.3 elasticsearch
elasticsearch:
image:
repository: elasticsearch
tag: "8.11.3"
pullPolicy: IfNotPresent
pullSecrets: []
initContainers:
alpine:
repository: alpine
tag: latest
pullPolicy: IfNotPresent
busybox:
repository: busybox
tag: latest
pullPolicy: IfNotPresent
storage:
className:
capacity: 20Gi
deployment:
strategy:
resources:
requests:
cpu: "4"
memory: "16Gi"
service:
type: ClusterIP
Purpose: Configurations for Elasticsearch, including image versions and resource requests.
Init containers: Alpine and Busybox images for initialization tasks.
Storage: 20Gi persistent volume capacity by default.
Resources: Requests for CPU and memory optimized for Elasticsearch workload.
3.4 opensearch
Similar to Elasticsearch, but for OpenSearch service with version 2.19.1.
3.5 minio
Configuration for MinIO object storage with a default 5Gi storage.
3.6 mysql
MySQL database configuration with 5Gi storage and MySQL image version 8.0.39.
3.7 redis
Redis cache configuration with 5Gi storage, persistence enabled, and retention policy commented out.
4. Ingress Configuration
ingress:
enabled: false
className: ""
annotations: {}
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
Purpose: Setup for Kubernetes ingress resources to expose web services externally.
Defaults: Disabled by default.
Annotations: Allows specifying ingress controller annotations (e.g., nginx).
Hosts: List of hostnames and paths for ingress routing.
TLS: Configuration for TLS certificates.
Important Implementation Details
Password Complexity: The file enforces complex passwords for OpenSearch, requiring uppercase, lowercase, digits, and special characters.
Batch Processing Parameters:
DOC_BULK_SIZEandEMBEDDING_BATCH_SIZEcontrol batch sizes for document chunk parsing and embedding vectorization respectively, influencing performance and resource use.Image Pull Policies: Most images use
IfNotPresentto avoid unnecessary pulls.Service Exposure: Defaults to
ClusterIPto restrict access within the cluster; can be changed toLoadBalancerfor external exposure.Storage Classes: Storage class names are left empty by default, allowing customization depending on the Kubernetes environment.
Init Containers: Used in Elasticsearch and OpenSearch to run lightweight containers before main containers start, potentially for setup or validation.
Interaction With Other System Components
This file is used by Helm during the deployment process to render Kubernetes manifests with appropriate values.
It configures multiple interdependent services:
RAGFlow as the main application.
Document Engines (Elasticsearch, Infinity, OpenSearch) for indexing and searching documents.
MinIO for object storage.
MySQL for relational data persistence.
Redis for caching and fast data retrieval.
The environment variables defined here configure runtime behavior of containers.
The ingress configuration allows external access to the deployed services.
Storage configurations ensure data persistence across pod restarts.
Passwords and secrets here secure the services and are typically overridden in production environments or managed via Kubernetes Secrets.
Usage Example
To deploy with Elasticsearch as the document engine and expose the RAGFlow service externally with LoadBalancer:
env:
DOC_ENGINE: elasticsearch
ragflow:
service:
type: LoadBalancer
elasticsearch:
service:
type: LoadBalancer
Visual Diagram: Flowchart of Main Configuration Sections and Relationships
flowchart TD
A[values.yaml] --> B[Global Config]
A --> C[Environment Variables (env)]
A --> D[RAGFlow Config]
A --> E[Document Engines Config]
A --> F[Storage Services Config]
A --> G[Ingress Config]
E --> E1[Elasticsearch]
E --> E2[OpenSearch]
E --> E3[Infinity]
F --> F1[MinIO]
F --> F2[MySQL]
F --> F3[Redis]
D --> D1[Image & Tag]
D --> D2[Service Type]
D --> D3[Deployment Resources]
G --> G1[Enabled]
G --> G2[Hosts & Paths]
G --> G3[TLS Settings]
Summary
The values.yaml file is a comprehensive Helm chart configuration for deploying a RAGFlow-based application stack on Kubernetes. It centralizes configuration for multiple services including document engines, storage, database, caching, and ingress, enabling flexible customization of deployment parameters like image versions, passwords, resource requests, and service exposure. It plays a critical role in defining the behavior and security of the deployed application components.