infinity.yaml

Overview

The infinity.yaml file is a Helm chart template defining Kubernetes resources for deploying the Infinity component of the Ragflow application stack. This component appears to be a stateful service requiring persistent storage and networked access through multiple ports using different protocols.

This file dynamically generates the following Kubernetes manifests when the Helm value env.DOC_ENGINE is set to "infinity":

This file leverages Helm templating features extensively to insert values from the chart’s values.yaml or other templates, such as labels, storage class names, image details, and deployment strategies.


Detailed Resource Descriptions

PersistentVolumeClaim (PVC)

Example usage snippet:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: ragflow-infinity
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi

StatefulSet

Usage notes:


Service

Example:

spec:
  type: ClusterIP
  ports:
    - port: 23817
      name: thrift
    - port: 23820
      name: http
    - port: 5432
      name: psql

Important Implementation Details and Algorithms


Interaction with Other Parts of the System


Visual Diagram

flowchart TD
    PVC[PersistentVolumeClaim]
    StatefulSet[StatefulSet: infinity]
    Service[Service: infinity]
    ConfigSecret[Secret: <fullname>-env-config]

    PVC --> StatefulSet
    ConfigSecret --> StatefulSet
    StatefulSet --> Service

    subgraph StatefulSet Pod
        Container[Container: infinity]
        Container -->|Port 23817 (thrift)| Service
        Container -->|Port 23820 (http)| Service
        Container -->|Port 5432 (psql)| Service
        Container -->|Mount /var/infinity| PVC
    end

Summary

The infinity.yaml Helm template file defines the Kubernetes resources necessary to deploy the Infinity data storage and service component within Ragflow. It ensures persistent storage, secure and controlled deployment of the service container, and proper network exposure via a Kubernetes Service. The file is highly configurable through Helm values and integrates with Ragflow’s templating framework to maintain consistent naming and labeling conventions. It includes best practices for lifecycle management, security, and configuration updates.