ragflow.yaml


Overview

ragflow.yaml is a Kubernetes Helm template manifest that defines the deployment and service resources for the ragflow component of an application. This file is responsible for configuring how the ragflow service is deployed, scaled, exposed, and integrated within the Kubernetes cluster. It uses Helm templating features extensively to allow dynamic customization of deployment parameters, labels, selectors, container images, resource limits, and service exposure based on values provided at deployment time.

The manifest includes:

This file is crucial for orchestrating ragflow's runtime environment and ensuring it is discoverable and scalable within the Kubernetes ecosystem.


Detailed Explanation

Deployment Resource

The Deployment object manages a set of pods running the ragflow application. It ensures the desired number of replicas are running and manages rolling updates.

Key Sections:

Usage example snippet (values.yaml):

ragflow:
  image:
    repository: myrepo/ragflow
    tag: v1.0.0
    pullPolicy: IfNotPresent
  deployment:
    replicas: 2
    strategy:
      type: RollingUpdate
      rollingUpdate:
        maxSurge: 1
        maxUnavailable: 0
  service_conf: true
  llm_factories: true
  deployment:
    resources:
      limits:
        cpu: "500m"
        memory: "256Mi"
      requests:
        cpu: "250m"
        memory: "128Mi"

Service Resources

Two Kubernetes Service objects are declared to expose ragflow:

1. Primary ragflow Service

2. Optional ragflow API Service


Important Implementation Details


System Interaction


Visual Diagram

flowchart TD
    subgraph Deployment "Deployment: ragflow"
        direction TB
        Pod["Pod: ragflow container"]
        Pod -->|mounts| ConfigMap_NGINX["ConfigMap: nginx-config"]
        Pod -->|mounts| ConfigMap_ServiceConf["ConfigMap: ragflow-service-config"]
        Pod -->|envFrom| Secret_Env["Secret: ragflow-env-config"]
        Pod -->|exposes ports| PortHTTP[Port 80 (http)]
        Pod -->|exposes ports| PortAPI[Port 9380 (http-api)]
    end

    subgraph Services "Services"
        ServiceMain["Service: ragflow"]
        ServiceAPI["Service: ragflow-api (optional)"]
    end

    ServiceMain -->|targets port 80| Pod
    ServiceAPI -->|targets port 9380| Pod

    Deployment -->|manages| Pod

Summary

The ragflow.yaml file is a critical Helm template that defines how the ragflow service is deployed and exposed within a Kubernetes cluster. It supports configurable container images, environment injection, resource limits, multiple ports for HTTP and API traffic, and flexible service exposure. It integrates tightly with ConfigMaps and Secrets for configuration management and leverages Helm templating to allow dynamic and reusable deployment configurations.

This file interacts with other parts of the system mainly through the ConfigMaps and Secrets it mounts and by exposing services that other components or external clients can consume.


End of Documentation for ragflow.yaml