Change chart directory structure
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -0,0 +1,347 @@
|
||||
# RAGFlow 배포
|
||||
|
||||
## 1. 배포 방법
|
||||
- 명령어
|
||||
``` sh
|
||||
$ helm upgrade ragflow ../ragflow --install \
|
||||
--namespace ragflow \
|
||||
-f ./custom-values.yaml \
|
||||
--create-namespace
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 2. custom-values.yaml 설명
|
||||
|
||||
- custom-values.yaml에 정의된 값에 대한 설명이다.
|
||||
|
||||
### 1) 환경 변수 설정
|
||||
- RAGFlow 및 관련 서비스들의 환경 변수를 설정한다.
|
||||
|
||||
| Name | 설명 | 기본값 |
|
||||
| ---------------------- | ------------------------------------------------------------ | ------ |
|
||||
| `env.DOC_ENGINE` | 문서 엔진 타입 설정. `elasticsearch`, `infinity`, `opensearch` 선택 가능 | `infinity` |
|
||||
| `env.STACK_VERSION` | Elasticsearch 버전 설정 | `"8.11.3"` |
|
||||
| `env.ELASTIC_PASSWORD` | Elasticsearch 비밀번호 | `infini_rag_flow_helm` |
|
||||
| `env.OPENSEARCH_PASSWORD` | OpenSearch 비밀번호 (대소문자, 숫자, 특수문자 포함 필요) | `infini_rag_flow_OS_01` |
|
||||
| `env.MYSQL_PASSWORD` | MySQL 비밀번호 | `infini_rag_flow_helm` |
|
||||
| `env.MYSQL_DBNAME` | MySQL 데이터베이스 이름 | `rag_flow` |
|
||||
| `env.MINIO_ROOT_USER` | MinIO 사용자명 | `rag_flow` |
|
||||
| `env.MINIO_PASSWORD` | MinIO 비밀번호 | `infini_rag_flow_helm` |
|
||||
| `env.REDIS_PASSWORD` | Redis 비밀번호 | `infini_rag_flow_helm` |
|
||||
| `env.RAGFLOW_IMAGE` | RAGFlow Docker 이미지 | `infiniflow/ragflow:v0.20.1-slim` |
|
||||
| `env.REQUESTS_CA_BUNDLE` | 사설 인증서 사용 시 CA 번들 파일 경로 | 설정하지 않음 |
|
||||
| `env.SSL_CERT_FILE` | SSL 인증서 파일 경로 (사설 인증서 사용 시) | 설정하지 않음 |
|
||||
| `env.TIMEZONE` | 로컬 시간대 설정 | `"Asia/Seoul"` |
|
||||
| `env.DOC_BULK_SIZE` | 문서 파싱 시 단일 배치에서 처리되는 문서 청크 수 | `4` |
|
||||
| `env.EMBEDDING_BATCH_SIZE` | 임베딩 벡터화 시 단일 배치에서 처리되는 텍스트 청크 수 | `16` |
|
||||
|
||||
|
||||
|
||||
### 2) RAGFlow 서비스 설정
|
||||
- RAGFlow 메인 서비스의 설정을 관리한다.
|
||||
|
||||
| Name | 설명 | 기본값 |
|
||||
| ------------------------ | ---------------------------------- | --------- |
|
||||
| `ragflow.service.type` | RAGFlow 서비스 타입 설정 | `ClusterIP` |
|
||||
| `ragflow.api.service.enabled` | API 서비스 활성화 여부 | `true` |
|
||||
| `ragflow.api.service.type` | API 서비스 타입 설정 | `ClusterIP` |
|
||||
| `ragflow.deployment.strategy` | 배포 전략 설정 | `` |
|
||||
| `ragflow.deployment.resources` | 리소스 제한 설정 | `` |
|
||||
| `ragflow.service_conf.oauth.oidc` | OIDC 인증 설정 | 설정 예시 참조 |
|
||||
| `ragflow.llm_factories` | LLM 팩토리 설정 | 설정 예시 참조 |
|
||||
| `ragflow.volumes` | 추가 볼륨 설정 | `[]` |
|
||||
| `ragflow.volumeMounts` | 추가 볼륨 마운트 설정 | `[]` |
|
||||
|
||||
#### 2.1) OIDC 인증 설정 예시
|
||||
```yaml
|
||||
ragflow:
|
||||
service_conf:
|
||||
oauth:
|
||||
oidc:
|
||||
display_name: "OIDC"
|
||||
client_id: "ragflow"
|
||||
client_secret: "your-client-secret"
|
||||
issuer: "https://your-keycloak-domain/realms/your-realm"
|
||||
scope: "openid email profile"
|
||||
redirect_uri: "https://your-ragflow-domain/v1/user/oauth/callback/oidc"
|
||||
```
|
||||
|
||||
#### 2.2) LLM 팩토리 설정 예시
|
||||
```yaml
|
||||
ragflow:
|
||||
llm_factories:
|
||||
factory_llm_infos:
|
||||
- name: OpenAI-API-Compatible
|
||||
logo: ""
|
||||
tags: "LLM,TEXT EMBEDDING,SPEECH2TEXT,MODERATION"
|
||||
status: "1"
|
||||
llm:
|
||||
- llm_name: my-custom-llm
|
||||
tags: "LLM,CHAT,"
|
||||
max_tokens: 100000
|
||||
model_type: chat
|
||||
is_tools: false
|
||||
```
|
||||
|
||||
#### 2.3) 사설 인증서 설정 예시
|
||||
```yaml
|
||||
env:
|
||||
# 사설 인증서 사용 시 CA 번들 파일 경로 설정
|
||||
REQUESTS_CA_BUNDLE: /tmp/ca.crt
|
||||
SSL_CERT_FILE: /tmp/ca.crt
|
||||
|
||||
ragflow:
|
||||
# 사설 인증서를 포함한 Secret을 볼륨으로 마운트
|
||||
volumes:
|
||||
- name: keycloak-tls
|
||||
secret:
|
||||
secretName: keycloak-tls
|
||||
|
||||
# Secret의 ca.crt를 컨테이너 내부 경로에 마운트
|
||||
volumeMounts:
|
||||
- name: keycloak-tls
|
||||
mountPath: /tmp/ca.crt
|
||||
subPath: ca.crt
|
||||
readOnly: true
|
||||
```
|
||||
|
||||
#### 2.4) 추가 볼륨 및 볼륨 마운트 설정 예시
|
||||
```yaml
|
||||
ragflow:
|
||||
# 다양한 타입의 볼륨 설정 예시
|
||||
volumes:
|
||||
# ConfigMap 볼륨
|
||||
- name: my-config
|
||||
configMap:
|
||||
name: my-configmap
|
||||
# Secret 볼륨
|
||||
- name: my-secret
|
||||
secret:
|
||||
secretName: my-secret
|
||||
# PVC 볼륨
|
||||
- name: my-data
|
||||
persistentVolumeClaim:
|
||||
claimName: my-pvc
|
||||
|
||||
# 볼륨 마운트 설정 예시
|
||||
volumeMounts:
|
||||
# ConfigMap 마운트
|
||||
- name: my-config
|
||||
mountPath: /app/config
|
||||
readOnly: true
|
||||
# Secret의 특정 키만 마운트
|
||||
- name: my-secret
|
||||
mountPath: /app/secrets/token
|
||||
subPath: token
|
||||
readOnly: true
|
||||
# PVC 마운트
|
||||
- name: my-data
|
||||
mountPath: /app/data
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 3) Infinity 서비스 설정
|
||||
- Infinity 문서 엔진 서비스 설정 (DOC_ENGINE이 infinity일 때 사용)
|
||||
|
||||
| Name | 설명 | 기본값 |
|
||||
| --------------------------- | ------------------------------------------------------------ | ----------------------- |
|
||||
| `infinity.image.repository` | Infinity 이미지 저장소 | `infiniflow/infinity` |
|
||||
| `infinity.image.tag` | Infinity 이미지 태그 | `v0.6.0-dev5` |
|
||||
| `infinity.storage.className` | 스토리지 클래스 이름 | `` |
|
||||
| `infinity.storage.capacity` | 스토리지 용량 | `5Gi` |
|
||||
| `infinity.deployment.strategy` | 배포 전략 설정 | `` |
|
||||
| `infinity.deployment.resources` | 리소스 제한 설정 | `` |
|
||||
| `infinity.service.type` | 서비스 타입 | `ClusterIP` |
|
||||
|
||||
|
||||
|
||||
### 4) Elasticsearch 서비스 설정
|
||||
- Elasticsearch 문서 엔진 서비스 설정 (DOC_ENGINE이 elasticsearch일 때 사용)
|
||||
|
||||
| Name | 설명 | 기본값 |
|
||||
| --------------------------- | ------------------------------------------------------------ | ----------------------- |
|
||||
| `elasticsearch.storage.className` | 스토리지 클래스 이름 | `` |
|
||||
| `elasticsearch.storage.capacity` | 스토리지 용량 | `20Gi` |
|
||||
| `elasticsearch.deployment.resources.requests.cpu` | CPU 요청량 | `"4"` |
|
||||
| `elasticsearch.deployment.resources.requests.memory` | 메모리 요청량 | `"16Gi"` |
|
||||
| `elasticsearch.service.type` | 서비스 타입 | `ClusterIP` |
|
||||
|
||||
|
||||
|
||||
### 5) MinIO 서비스 설정
|
||||
- 객체 스토리지 서비스 설정
|
||||
|
||||
| Name | 설명 | 기본값 |
|
||||
| --------------------------- | ------------------------------------------------------------ | ----------------------- |
|
||||
| `minio.image.repository` | MinIO 이미지 저장소 | `quay.io/minio/minio` |
|
||||
| `minio.image.tag` | MinIO 이미지 태그 | `RELEASE.2023-12-20T01-00-02Z` |
|
||||
| `minio.storage.className` | 스토리지 클래스 이름 | `` |
|
||||
| `minio.storage.capacity` | 스토리지 용량 | `5Gi` |
|
||||
| `minio.service.type` | 서비스 타입 | `ClusterIP` |
|
||||
|
||||
|
||||
|
||||
### 6) MySQL 서비스 설정
|
||||
- 관계형 데이터베이스 서비스 설정
|
||||
|
||||
| Name | 설명 | 기본값 |
|
||||
| --------------------------- | ------------------------------------------------------------ | ----------------------- |
|
||||
| `mysql.image.repository` | MySQL 이미지 저장소 | `mysql` |
|
||||
| `mysql.image.tag` | MySQL 이미지 태그 | `8.0.39` |
|
||||
| `mysql.storage.className` | 스토리지 클래스 이름 | `` |
|
||||
| `mysql.storage.capacity` | 스토리지 용량 | `5Gi` |
|
||||
| `mysql.service.type` | 서비스 타입 | `ClusterIP` |
|
||||
|
||||
|
||||
|
||||
### 7) Redis 서비스 설정
|
||||
- 캐시 및 세션 스토리지 서비스 설정
|
||||
|
||||
| Name | 설명 | 기본값 |
|
||||
| --------------------------- | ------------------------------------------------------------ | ----------------------- |
|
||||
| `redis.image.repository` | Redis 이미지 저장소 | `valkey/valkey` |
|
||||
| `redis.image.tag` | Redis 이미지 태그 | `8` |
|
||||
| `redis.storage.className` | 스토리지 클래스 이름 | `` |
|
||||
| `redis.storage.capacity` | 스토리지 용량 | `5Gi` |
|
||||
| `redis.persistence.enabled` | 데이터 영속성 활성화 | `true` |
|
||||
| `redis.service.type` | 서비스 타입 | `ClusterIP` |
|
||||
|
||||
|
||||
|
||||
### 8) Ingress 설정
|
||||
|
||||
#### 8.1) 기본 Ingress 설정
|
||||
|
||||
- RAGFlow 웹 인터페이스 외부 노출을 위한 Ingress 설정
|
||||
``` yaml
|
||||
ingress:
|
||||
enabled: true
|
||||
className: "kong"
|
||||
hosts:
|
||||
- host: ragflow.example.org
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls:
|
||||
- secretName: ragflow-tls
|
||||
hosts:
|
||||
- ragflow.example.org
|
||||
```
|
||||
|
||||
#### 8.2) TLS 시크릿 직접 생성
|
||||
|
||||
- Ingress 사용을 위해서는 인증서를 secret으로 제공해야한다. 로컬 파일을 이용해 secret을 생성하는 방법은 다음과 같다.
|
||||
``` sh
|
||||
kubectl create secret tls ragflow-tls --cert=<path-to-cert-file> --key=<path-to-key-file> -n <namespace>
|
||||
```
|
||||
|
||||
#### 8.3) cert-manager를 이용한 자동 생성
|
||||
|
||||
- cert manager를 통해 인증서 자동 생성 시 `custom-values.yaml` 수정한다.
|
||||
- `ingress.annotations.cert-manager.io/cluster-issuer`에 미리 배포된 Cluster Issuer의 이름으로 변경한다.
|
||||
``` yaml
|
||||
ingress:
|
||||
enabled: true
|
||||
className: "kong"
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "selfsigned-issuer"
|
||||
cert-manager.io/duration: 8760h
|
||||
cert-manager.io/renew-before: 720h
|
||||
konghq.com/https-redirect-status-code: '301'
|
||||
konghq.com/protocols: https
|
||||
hosts:
|
||||
- host: ragflow.example.org
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls:
|
||||
- hosts:
|
||||
- ragflow.example.org
|
||||
secretName: ragflow-tls
|
||||
```
|
||||
|
||||
#### 8.4) Kong 관련 어노테이션
|
||||
|
||||
- Kong Ingress Controller 사용 시 추가 설정 옵션들:
|
||||
|
||||
| Name | 설명 | 기본값 |
|
||||
| --------------------------------------- | ---------------------------------- | --------- |
|
||||
| `konghq.com/https-redirect-status-code` | HTTPS 리다이렉트 상태 코드 | `'301'` |
|
||||
| `konghq.com/protocols` | 허용할 프로토콜 | `https` |
|
||||
|
||||
|
||||
## 3. 주요 설정 가이드
|
||||
|
||||
### 3.1) 문서 엔진 선택
|
||||
- `env.DOC_ENGINE`을 통해 문서 엔진을 선택할 수 있습니다.
|
||||
- `elasticsearch`: 안정적이고 검증된 검색 엔진
|
||||
- `infinity`: 고성능 벡터 검색 엔진 (권장)
|
||||
- `opensearch`: Elasticsearch의 오픈소스 대안
|
||||
|
||||
### 3.2) 리소스 설정
|
||||
- 각 서비스별로 `deployment.resources`에서 CPU/메모리 리소스를 설정할 수 있습니다.
|
||||
- Elasticsearch는 기본적으로 4 CPU, 16Gi 메모리를 요청합니다.
|
||||
|
||||
### 3.3) 스토리지 설정
|
||||
- 모든 서비스에서 `storage.className`을 통해 스토리지 클래스를 지정할 수 있습니다.
|
||||
- 각 서비스별로 적절한 스토리지 용량을 설정하세요.
|
||||
|
||||
### 3.4) 보안 설정
|
||||
- 모든 비밀번호는 기본값에서 변경하여 사용하세요.
|
||||
- OIDC를 통한 외부 인증 시스템 연동이 가능합니다.
|
||||
|
||||
### 3.5) 성능 튜닝 설정
|
||||
- 문서 처리 및 임베딩 성능을 조정할 수 있는 설정들입니다.
|
||||
|
||||
| Name | 설명 | 기본값 |
|
||||
| --------------------------- | ------------------------------------------------------------ | ----------------------- |
|
||||
| `env.DOC_BULK_SIZE` | 문서 파싱 시 단일 배치에서 처리되는 문서 청크 수 | `4` |
|
||||
| `env.EMBEDDING_BATCH_SIZE` | 임베딩 벡터화 시 단일 배치에서 처리되는 텍스트 청크 수 | `16` |
|
||||
|
||||
### 3.6) 사설 인증서 설정
|
||||
- HTTPS 통신 시 사설 인증서를 사용하는 경우의 설정 방법입니다.
|
||||
|
||||
#### 3.6.1) 사설 인증서 Secret 생성
|
||||
```sh
|
||||
# CA 인증서 파일로부터 Secret 생성
|
||||
kubectl create secret generic keycloak-tls \
|
||||
--from-file=ca.crt=/path/to/ca.crt \
|
||||
-n <namespace>
|
||||
```
|
||||
|
||||
#### 3.6.2) values.yaml 설정
|
||||
```yaml
|
||||
env:
|
||||
# Python requests 라이브러리가 사용할 CA 번들 파일 경로
|
||||
REQUESTS_CA_BUNDLE: /tmp/ca.crt
|
||||
SSL_CERT_FILE: /tmp/ca.crt
|
||||
|
||||
ragflow:
|
||||
volumes:
|
||||
- name: keycloak-tls
|
||||
secret:
|
||||
secretName: keycloak-tls
|
||||
|
||||
volumeMounts:
|
||||
- name: keycloak-tls
|
||||
mountPath: /tmp/ca.crt
|
||||
subPath: ca.crt
|
||||
readOnly: true
|
||||
```
|
||||
|
||||
#### 3.6.3) 주의사항
|
||||
- `REQUESTS_CA_BUNDLE`와 `SSL_CERT_FILE`의 경로는 `volumeMounts.mountPath`와 일치해야 합니다.
|
||||
- `subPath`를 사용하여 Secret의 특정 키만 마운트하는 것을 권장합니다.
|
||||
- 인증서 파일은 읽기 전용(`readOnly: true`)으로 마운트하세요.
|
||||
|
||||
### 3.7) 추가 환경 설정
|
||||
- 기타 선택적 환경 설정들입니다.
|
||||
|
||||
| Name | 설명 | 기본값 |
|
||||
| --------------------------- | ------------------------------------------------------------ | ----------------------- |
|
||||
| `env.HF_ENDPOINT` | Hugging Face 엔드포인트 (접근 제한 시 미러 사용) | 설정하지 않음 |
|
||||
| `env.MAX_CONTENT_LENGTH` | 업로드 파일 최대 크기 (바이트) | `134217728` (128MB) |
|
||||
|
||||
**참고**: `MAX_CONTENT_LENGTH` 변경 시 nginx 설정의 `client_max_body_size`도 함께 수정해야 합니다.
|
||||
@@ -0,0 +1,24 @@
|
||||
apiVersion: v2
|
||||
name: ragflow
|
||||
description: A Helm chart for deploying RAGFlow on Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "dev"
|
||||
@@ -0,0 +1,200 @@
|
||||
# Based on docker compose .env file
|
||||
env:
|
||||
# The type of doc engine to use.
|
||||
# Available options:
|
||||
# - `elasticsearch` (default)
|
||||
# - `infinity` (https://github.com/infiniflow/infinity)
|
||||
# - `opensearch` (https://github.com/opensearch-project/OpenSearch)
|
||||
# DOC_ENGINE: elasticsearch
|
||||
DOC_ENGINE: infinity
|
||||
# DOC_ENGINE: opensearch
|
||||
|
||||
# The version of Elasticsearch.
|
||||
STACK_VERSION: "8.11.3"
|
||||
|
||||
# The password for Elasticsearch
|
||||
ELASTIC_PASSWORD: infini_rag_flow_helm
|
||||
|
||||
# The password for OpenSearch.
|
||||
# At least one uppercase letter, one lowercase letter, one digit, and one special character
|
||||
OPENSEARCH_PASSWORD: infini_rag_flow_OS_01
|
||||
|
||||
# The password for MySQL
|
||||
MYSQL_PASSWORD: infini_rag_flow_helm
|
||||
# The database of the MySQL service to use
|
||||
MYSQL_DBNAME: rag_flow
|
||||
|
||||
# The username for MinIO.
|
||||
MINIO_ROOT_USER: rag_flow
|
||||
# The password for MinIO
|
||||
MINIO_PASSWORD: infini_rag_flow_helm
|
||||
|
||||
# The password for Redis
|
||||
REDIS_PASSWORD: infini_rag_flow_helm
|
||||
|
||||
# The RAGFlow Docker image to download.
|
||||
# Defaults to the v0.20.1-slim edition, which is the RAGFlow Docker image without embedding models.
|
||||
RAGFLOW_IMAGE: infiniflow/ragflow:v0.20.1-slim
|
||||
|
||||
|
||||
# The local time zone.
|
||||
TIMEZONE: "Asia/Seoul"
|
||||
|
||||
# Uncomment the following line if you have limited access to huggingface.co:
|
||||
# HF_ENDPOINT: https://hf-mirror.com
|
||||
|
||||
# The maximum file size for each uploaded file, in bytes.
|
||||
# You can uncomment this line and update the value if you wish to change 128M file size limit
|
||||
# MAX_CONTENT_LENGTH: "134217728"
|
||||
# After making the change, ensure you update `client_max_body_size` in nginx/nginx.conf correspondingly.
|
||||
|
||||
# The number of document chunks processed in a single batch during document parsing.
|
||||
DOC_BULK_SIZE: 4
|
||||
|
||||
# The number of text chunks processed in a single batch during embedding vectorization.
|
||||
EMBEDDING_BATCH_SIZE: 16
|
||||
|
||||
REQUESTS_CA_BUNDLE: /tmp/ca.crt
|
||||
SSL_CERT_FILE: /tmp/ca.crt
|
||||
|
||||
ragflow:
|
||||
|
||||
# Optional service configuration overrides
|
||||
# to be written to local.service_conf.yaml
|
||||
# inside the RAGFlow container
|
||||
# https://ragflow.io/docs/dev/configurations#service-configuration
|
||||
service_conf:
|
||||
oauth:
|
||||
oidc:
|
||||
display_name: "OIDC"
|
||||
client_id: "Client ID"
|
||||
client_secret: "Client Secret"
|
||||
issuer: "https://keycloak_domain/realms/paasup"
|
||||
scope: "openid email profile"
|
||||
redirect_uri: "https://ragflow_domain/v1/user/oauth/callback/oidc"
|
||||
|
||||
# Optional yaml formatted override for the
|
||||
# llm_factories.json file inside the RAGFlow
|
||||
# container.
|
||||
llm_factories:
|
||||
# factory_llm_infos:
|
||||
# - name: OpenAI-API-Compatible
|
||||
# logo: ""
|
||||
# tags: "LLM,TEXT EMBEDDING,SPEECH2TEXT,MODERATION"
|
||||
# status: "1"
|
||||
# llm:
|
||||
# - llm_name: my-custom-llm
|
||||
# tags: "LLM,CHAT,"
|
||||
# max_tokens: 100000
|
||||
# model_type: chat
|
||||
# is_tools: false
|
||||
|
||||
# Additional volumes to be mounted in the ragflow container
|
||||
# Example for custom CA certificates:
|
||||
# volumes:
|
||||
# - name: keycloak-tls
|
||||
# secret:
|
||||
# secretName: keycloak-tls
|
||||
volumes: []
|
||||
|
||||
# Additional volume mounts for the ragflow container
|
||||
# Example for custom CA certificates:
|
||||
# volumeMounts:
|
||||
# - name: keycloak-tls
|
||||
# mountPath: /tmp/ca.crt
|
||||
# subPath: ca.crt
|
||||
# readOnly: true
|
||||
volumeMounts: []
|
||||
|
||||
# Kubernetes configuration
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
service:
|
||||
# Use LoadBalancer to expose the web interface externally
|
||||
type: ClusterIP
|
||||
api:
|
||||
service:
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
|
||||
infinity:
|
||||
image:
|
||||
repository: infiniflow/infinity
|
||||
tag: v0.6.0-dev5
|
||||
storage:
|
||||
className:
|
||||
capacity: 5Gi
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
minio:
|
||||
image:
|
||||
repository: quay.io/minio/minio
|
||||
tag: RELEASE.2023-12-20T01-00-02Z
|
||||
storage:
|
||||
className:
|
||||
capacity: 5Gi
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
mysql:
|
||||
image:
|
||||
repository: mysql
|
||||
tag: 8.0.39
|
||||
storage:
|
||||
className:
|
||||
capacity: 5Gi
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
redis:
|
||||
image:
|
||||
repository: valkey/valkey
|
||||
tag: 8
|
||||
storage:
|
||||
className:
|
||||
capacity: 5Gi
|
||||
persistence:
|
||||
enabled: true
|
||||
# Set's the retention policy for the persistent storage (only available in k8s 1.32 or later)
|
||||
# https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
|
||||
# retentionPolicy:
|
||||
# whenDeleted: Delete
|
||||
# whenScaled: Delete
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
|
||||
# This block is for setting up web service ingress. For more information, see:
|
||||
# https://kubernetes.io/docs/concepts/services-networking/ingress/
|
||||
ingress:
|
||||
enabled: true
|
||||
className: "kong"
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: root-ca-issuer
|
||||
cert-manager.io/duration: 8760h
|
||||
cert-manager.io/renew-before: 720h
|
||||
konghq.com/https-redirect-status-code: '301'
|
||||
konghq.com/protocols: https
|
||||
hosts:
|
||||
- host: ragflow.example.org
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls:
|
||||
- secretName: ragflow-tls
|
||||
hosts:
|
||||
- ragflow.example.org
|
||||
@@ -0,0 +1,62 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "ragflow.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "ragflow.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "ragflow.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "ragflow.labels" -}}
|
||||
helm.sh/chart: {{ include "ragflow.chart" . }}
|
||||
{{ include "ragflow.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "ragflow.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "ragflow.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "ragflow.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "ragflow.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{- if eq .Values.env.DOC_ENGINE "elasticsearch" -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-es-config
|
||||
data:
|
||||
node.name: "es01"
|
||||
bootstrap.memory_lock: "false"
|
||||
discovery.type: "single-node"
|
||||
xpack.security.enabled: "true"
|
||||
xpack.security.http.ssl.enabled: "false"
|
||||
xpack.security.transport.ssl.enabled: "false"
|
||||
cluster.routing.allocation.disk.watermark.low: 5gb
|
||||
cluster.routing.allocation.disk.watermark.high: 3gb
|
||||
cluster.routing.allocation.disk.watermark.flood_stage: 2gb
|
||||
TZ: {{ .Values.env.TIMEZONE }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,113 @@
|
||||
{{- if eq .Values.env.DOC_ENGINE "elasticsearch" -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-es-data
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: elasticsearch
|
||||
spec:
|
||||
{{- with .Values.elasticsearch.storage.className }}
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.elasticsearch.storage.capacity }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-es
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: elasticsearch
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: elasticsearch
|
||||
{{- with .Values.elasticsearch.deployment.strategy }}
|
||||
strategy:
|
||||
{{- . | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: elasticsearch
|
||||
annotations:
|
||||
checksum/config-es: {{ include (print $.Template.BasePath "/elasticsearch-config.yaml") . | sha256sum }}
|
||||
checksum/config-env: {{ include (print $.Template.BasePath "/env.yaml") . | sha256sum }}
|
||||
spec:
|
||||
initContainers:
|
||||
- name: fix-data-volume-permissions
|
||||
image: alpine
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- "chown -R 1000:0 /usr/share/elasticsearch/data"
|
||||
volumeMounts:
|
||||
- mountPath: /usr/share/elasticsearch/data
|
||||
name: es-data
|
||||
- name: sysctl
|
||||
image: busybox
|
||||
securityContext:
|
||||
privileged: true
|
||||
runAsUser: 0
|
||||
command: ["sysctl", "-w", "vm.max_map_count=262144"]
|
||||
containers:
|
||||
- name: elasticsearch
|
||||
image: elasticsearch:{{ .Values.env.STACK_VERSION }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "ragflow.fullname" . }}-env-config
|
||||
- configMapRef:
|
||||
name: {{ include "ragflow.fullname" . }}-es-config
|
||||
ports:
|
||||
- containerPort: 9200
|
||||
name: http
|
||||
- containerPort: 9300
|
||||
name: transport
|
||||
volumeMounts:
|
||||
- mountPath: /usr/share/elasticsearch/data
|
||||
name: es-data
|
||||
{{- with .Values.elasticsearch.deployment.resources }}
|
||||
resources:
|
||||
{{- . | toYaml | nindent 10 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- "IPC_LOCK"
|
||||
runAsUser: 1000
|
||||
# NOTE: fsGroup doesn't seem to
|
||||
# work so use init container instead
|
||||
# fsGroup: 1000
|
||||
allowPrivilegeEscalation: false
|
||||
volumes:
|
||||
- name: es-data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "ragflow.fullname" . }}-es-data
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-es
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: elasticsearch
|
||||
spec:
|
||||
selector:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: elasticsearch
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 9200
|
||||
targetPort: http
|
||||
type: {{ .Values.elasticsearch.service.type }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,53 @@
|
||||
{{- /*
|
||||
TODO: Split env vars into separate secrets so that each pod
|
||||
only gets passed the secrets it really needs.
|
||||
*/}}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-env-config
|
||||
type: Opaque
|
||||
stringData:
|
||||
{{- range $key, $val := .Values.env }}
|
||||
{{- if $val }}
|
||||
{{ $key }}: {{ quote $val }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- /*
|
||||
Use host names derived from internal cluster DNS
|
||||
*/}}
|
||||
REDIS_HOST: {{ printf "%s-redis.%s.svc" (include "ragflow.fullname" .) .Release.Namespace }}
|
||||
MYSQL_HOST: {{ printf "%s-mysql.%s.svc" (include "ragflow.fullname" .) .Release.Namespace }}
|
||||
MINIO_HOST: {{ printf "%s-minio.%s.svc" (include "ragflow.fullname" .) .Release.Namespace }}
|
||||
{{- /*
|
||||
Fail if passwords are not provided in release values
|
||||
*/}}
|
||||
REDIS_PASSWORD: {{ .Values.env.REDIS_PASSWORD | required "REDIS_PASSWORD is required" }}
|
||||
{{- /*
|
||||
NOTE: MySQL uses MYSQL_ROOT_PASSWORD env var but Ragflow container expects
|
||||
MYSQL_PASSWORD so we need to define both as the same value here.
|
||||
*/}}
|
||||
{{- with .Values.env.MYSQL_PASSWORD | required "MYSQL_PASSWORD is required" }}
|
||||
MYSQL_PASSWORD: {{ . }}
|
||||
MYSQL_ROOT_PASSWORD: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.env.MINIO_PASSWORD | required "MINIO_PASSWORD is required" }}
|
||||
MINIO_PASSWORD: {{ . }}
|
||||
MINIO_ROOT_PASSWORD: {{ . }}
|
||||
{{- end }}
|
||||
{{- /*
|
||||
Only provide env vars for enabled doc engine
|
||||
*/}}
|
||||
{{- if eq .Values.env.DOC_ENGINE "elasticsearch" }}
|
||||
ES_HOST: {{ printf "%s-es.%s.svc" (include "ragflow.fullname" .) .Release.Namespace }}
|
||||
ELASTIC_PASSWORD: {{ .Values.env.ELASTIC_PASSWORD | required "ELASTIC_PASSWORD is required" }}
|
||||
{{- else if eq .Values.env.DOC_ENGINE "infinity" }}
|
||||
INFINITY_HOST: {{ printf "%s-infinity.%s.svc" (include "ragflow.fullname" .) .Release.Namespace }}
|
||||
{{- else if eq .Values.env.DOC_ENGINE "opensearch" }}
|
||||
OS_HOST: {{ printf "%s-opensearch.%s.svc" (include "ragflow.fullname" .) .Release.Namespace }}
|
||||
OS_PORT: "9201"
|
||||
OPENSEARCH_PASSWORD: {{ .Values.env.OPENSEARCH_PASSWORD | required "OPENSEARCH_PASSWORD is required" }}
|
||||
OPENSEARCH_INITIAL_ADMIN_PASSWORD: {{ .Values.env.OPENSEARCH_PASSWORD | required "OPENSEARCH_PASSWORD is required" }}
|
||||
{{- else }}
|
||||
{{ fail "env.DOC_ENGINE must be either 'elasticsearch', 'opensearch' or 'infinity'" }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,110 @@
|
||||
{{- if eq .Values.env.DOC_ENGINE "infinity" -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-infinity
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: infinity
|
||||
spec:
|
||||
{{- with .Values.infinity.storage.className }}
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.infinity.storage.capacity }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-infinity
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: infinity
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: infinity
|
||||
{{- with .Values.infinity.deployment.strategy }}
|
||||
strategy:
|
||||
{{- . | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: infinity
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/env.yaml") . | sha256sum }}
|
||||
spec:
|
||||
containers:
|
||||
- name: infinity
|
||||
image: {{ .Values.infinity.image.repository }}:{{ .Values.infinity.image.tag }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "ragflow.fullname" . }}-env-config
|
||||
ports:
|
||||
- containerPort: 23817
|
||||
name: thrift
|
||||
- containerPort: 23820
|
||||
name: http
|
||||
- containerPort: 5432
|
||||
name: psql
|
||||
volumeMounts:
|
||||
- mountPath: /var/infinity
|
||||
name: infinity-data
|
||||
{{- with .Values.infinity.deployment.resources }}
|
||||
resources:
|
||||
{{- . | toYaml | nindent 10 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- "NET_BIND_SERVICE"
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /admin/node/current
|
||||
port: 23820
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 120
|
||||
volumes:
|
||||
- name: infinity-data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "ragflow.fullname" . }}-infinity
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-infinity
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: infinity
|
||||
spec:
|
||||
selector:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: infinity
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 23817
|
||||
targetPort: thrift
|
||||
name: thrift
|
||||
- protocol: TCP
|
||||
port: 23820
|
||||
targetPort: http
|
||||
name: http
|
||||
- protocol: TCP
|
||||
port: 5432
|
||||
targetPort: psql
|
||||
name: psql
|
||||
type: {{ .Values.infinity.service.type }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,43 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.ingress.className }}
|
||||
ingressClassName: {{ . }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- with .pathType }}
|
||||
pathType: {{ . }}
|
||||
{{- end }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ $.Release.Name }}
|
||||
port:
|
||||
name: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,93 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-minio
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: minio
|
||||
spec:
|
||||
{{- with .Values.minio.storage.className }}
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.minio.storage.capacity }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-minio
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: minio
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/env.yaml") . | sha256sum }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: minio
|
||||
{{- with .Values.minio.deployment.strategy }}
|
||||
strategy:
|
||||
{{- . | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: minio
|
||||
spec:
|
||||
containers:
|
||||
- name: minio
|
||||
image: {{ .Values.minio.image.repository }}:{{ .Values.minio.image.tag }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "ragflow.fullname" . }}-env-config
|
||||
args:
|
||||
- server
|
||||
- "--console-address=:9001"
|
||||
- "/data"
|
||||
ports:
|
||||
- containerPort: 9000
|
||||
name: s3
|
||||
- containerPort: 9001
|
||||
name: console
|
||||
{{- with .Values.minio.deployment.resources }}
|
||||
resources:
|
||||
{{- . | toYaml | nindent 10 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: minio-data
|
||||
volumes:
|
||||
- name: minio-data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "ragflow.fullname" . }}-minio
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-minio
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: minio
|
||||
spec:
|
||||
selector:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: minio
|
||||
ports:
|
||||
- name: s3
|
||||
protocol: TCP
|
||||
port: 9000
|
||||
targetPort: s3
|
||||
- name: console
|
||||
protocol: TCP
|
||||
port: 9001
|
||||
targetPort: console
|
||||
type: {{ .Values.minio.service.type }}
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: mysql-init-script
|
||||
data:
|
||||
init.sql: |-
|
||||
CREATE DATABASE IF NOT EXISTS rag_flow;
|
||||
USE rag_flow;
|
||||
@@ -0,0 +1,98 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-mysql
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: mysql
|
||||
spec:
|
||||
{{- with .Values.mysql.storage.className }}
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.mysql.storage.capacity }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-mysql
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: mysql
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: mysql
|
||||
{{- with .Values.mysql.deployment.strategy }}
|
||||
strategy:
|
||||
{{- . | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: mysql
|
||||
annotations:
|
||||
checksum/config-mysql: {{ include (print $.Template.BasePath "/mysql-config.yaml") . | sha256sum }}
|
||||
checksum/config-env: {{ include (print $.Template.BasePath "/env.yaml") . | sha256sum }}
|
||||
spec:
|
||||
containers:
|
||||
- name: mysql
|
||||
image: {{ .Values.mysql.image.repository }}:{{ .Values.mysql.image.tag }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "ragflow.fullname" . }}-env-config
|
||||
args:
|
||||
- --max_connections=1000
|
||||
- --character-set-server=utf8mb4
|
||||
- --collation-server=utf8mb4_general_ci
|
||||
- --default-authentication-plugin=mysql_native_password
|
||||
- --tls_version=TLSv1.2,TLSv1.3
|
||||
- --init-file=/data/application/init.sql
|
||||
- --disable-log-bin
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
name: mysql
|
||||
{{- with .Values.mysql.deployment.resources }}
|
||||
resources:
|
||||
{{- . | toYaml | nindent 10 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: mysql-data
|
||||
- mountPath: /data/application/init.sql
|
||||
subPath: init.sql
|
||||
readOnly: true
|
||||
name: init-script-volume
|
||||
volumes:
|
||||
- name: mysql-data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "ragflow.fullname" . }}-mysql
|
||||
- name: init-script-volume
|
||||
configMap:
|
||||
name: mysql-init-script
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-mysql
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: mysql
|
||||
spec:
|
||||
selector:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: mysql
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 3306
|
||||
targetPort: mysql
|
||||
type: {{ .Values.mysql.service.type }}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{- if eq .Values.env.DOC_ENGINE "opensearch" -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-opensearch-config
|
||||
data:
|
||||
node.name: opensearch01
|
||||
bootstrap.memory_lock: "false"
|
||||
discovery.type: single-node
|
||||
plugins.security.disabled: "false"
|
||||
plugins.security.ssl.http.enabled: "false"
|
||||
plugins.security.ssl.transport.enabled: "true"
|
||||
cluster.routing.allocation.disk.watermark.low: 5gb
|
||||
cluster.routing.allocation.disk.watermark.high: 3gb
|
||||
cluster.routing.allocation.disk.watermark.flood_stage: 2gb
|
||||
TZ: {{ .Values.env.TIMEZONE }}
|
||||
http.port: "9201"
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,117 @@
|
||||
{{- if eq .Values.env.DOC_ENGINE "opensearch" -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-opensearch-data
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: opensearch
|
||||
spec:
|
||||
{{- with .Values.opensearch.storage.className }}
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.opensearch.storage.capacity }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-opensearch
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: opensearch
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: opensearch
|
||||
{{- with .Values.opensearch.deployment.strategy }}
|
||||
strategy:
|
||||
{{- . | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: opensearch
|
||||
annotations:
|
||||
checksum/config-opensearch: {{ include (print $.Template.BasePath "/opensearch-config.yaml") . | sha256sum }}
|
||||
checksum/config-env: {{ include (print $.Template.BasePath "/env.yaml") . | sha256sum }}
|
||||
spec:
|
||||
initContainers:
|
||||
- name: fix-data-volume-permissions
|
||||
image: alpine
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- "chown -R 1000:0 /usr/share/opensearch/data"
|
||||
volumeMounts:
|
||||
- mountPath: /usr/share/opensearch/data
|
||||
name: opensearch-data
|
||||
- name: sysctl
|
||||
image: busybox
|
||||
securityContext:
|
||||
privileged: true
|
||||
runAsUser: 0
|
||||
command: ["sysctl", "-w", "vm.max_map_count=262144"]
|
||||
containers:
|
||||
- name: opensearch
|
||||
image: {{ .Values.opensearch.image.repository }}:{{ .Values.opensearch.image.tag }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "ragflow.fullname" . }}-env-config
|
||||
- configMapRef:
|
||||
name: {{ include "ragflow.fullname" . }}-opensearch-config
|
||||
ports:
|
||||
- containerPort: 9201
|
||||
name: http
|
||||
volumeMounts:
|
||||
- mountPath: /usr/share/opensearch/data
|
||||
name: opensearch-data
|
||||
{{- with .Values.opensearch.deployment.resources }}
|
||||
resources:
|
||||
{{- . | toYaml | nindent 10 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- "IPC_LOCK"
|
||||
runAsUser: 1000
|
||||
allowPrivilegeEscalation: false
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- curl -u admin:$OPENSEARCH_PASSWORD localhost:9201
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
failureThreshold: 6
|
||||
volumes:
|
||||
- name: opensearch-data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "ragflow.fullname" . }}-opensearch-data
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-opensearch
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: opensearch
|
||||
spec:
|
||||
selector:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: opensearch
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 9201
|
||||
targetPort: http
|
||||
type: {{ .Values.opensearch.service.type }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,113 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: ragflow
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: ragflow
|
||||
{{- with .Values.ragflow.deployment.strategy }}
|
||||
strategy:
|
||||
{{- . | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: ragflow
|
||||
annotations:
|
||||
checksum/config-env: {{ include (print $.Template.BasePath "/env.yaml") . | sha256sum }}
|
||||
checksum/config-ragflow: {{ include (print $.Template.BasePath "/ragflow_config.yaml") . | sha256sum }}
|
||||
spec:
|
||||
containers:
|
||||
- name: ragflow
|
||||
image: {{ .Values.env.RAGFLOW_IMAGE }}
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
- containerPort: 9380
|
||||
name: http-api
|
||||
volumeMounts:
|
||||
- mountPath: /etc/nginx/conf.d/ragflow.conf
|
||||
subPath: ragflow.conf
|
||||
name: nginx-config-volume
|
||||
- mountPath: /etc/nginx/proxy.conf
|
||||
subPath: proxy.conf
|
||||
name: nginx-config-volume
|
||||
- mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
name: nginx-config-volume
|
||||
{{- with .Values.ragflow.service_conf }}
|
||||
- mountPath: /ragflow/conf/local.service_conf.yaml
|
||||
subPath: local.service_conf.yaml
|
||||
name: service-conf-volume
|
||||
{{- end }}
|
||||
{{- with .Values.ragflow.llm_factories }}
|
||||
- mountPath: /ragflow/conf/llm_factories.json
|
||||
subPath: llm_factories.json
|
||||
name: service-conf-volume
|
||||
{{- end }}
|
||||
{{- with .Values.ragflow.volumeMounts }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "ragflow.fullname" . }}-env-config
|
||||
{{- with .Values.ragflow.deployment.resources }}
|
||||
resources:
|
||||
{{- . | toYaml | nindent 10 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: nginx-config-volume
|
||||
configMap:
|
||||
name: nginx-config
|
||||
- name: service-conf-volume
|
||||
configMap:
|
||||
name: ragflow-service-config
|
||||
{{- with .Values.ragflow.volumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: ragflow
|
||||
spec:
|
||||
selector:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: ragflow
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: http
|
||||
name: http
|
||||
type: {{ .Values.ragflow.service.type }}
|
||||
---
|
||||
{{- if .Values.ragflow.api.service.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-api
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: ragflow
|
||||
spec:
|
||||
selector:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: ragflow
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: http-api
|
||||
name: http-api
|
||||
type: {{ .Values.ragflow.api.service.type }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ragflow-service-config
|
||||
data:
|
||||
{{- with .Values.ragflow.service_conf }}
|
||||
local.service_conf.yaml: |
|
||||
{{- . | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.ragflow.llm_factories }}
|
||||
llm_factories.json: |
|
||||
{{- . | toPrettyJson | nindent 4 }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-config
|
||||
data:
|
||||
ragflow.conf: |
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /ragflow/web/dist;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1k;
|
||||
gzip_comp_level 9;
|
||||
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
|
||||
gzip_vary on;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
|
||||
location ~ ^/(v1|api) {
|
||||
proxy_pass http://localhost:9380;
|
||||
include proxy.conf;
|
||||
}
|
||||
|
||||
location / {
|
||||
index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Cache-Control: max-age~@~AExpires
|
||||
location ~ ^/static/(css|js|media)/ {
|
||||
expires 10y;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
proxy.conf: |
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
nginx.conf: |
|
||||
user root;
|
||||
worker_processes auto;
|
||||
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
client_max_body_size 128M;
|
||||
|
||||
include /etc/nginx/conf.d/ragflow.conf;
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-redis
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: redis
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
name: redis
|
||||
protocol: TCP
|
||||
clusterIP: None # Headless service for StatefulSet
|
||||
selector:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: redis
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-redis
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: redis
|
||||
spec:
|
||||
serviceName: {{ include "ragflow.fullname" . }}-redis
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: redis
|
||||
annotations:
|
||||
checksum/config-env: {{ include (print $.Template.BasePath "/env.yaml") . | sha256sum }}
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 60
|
||||
containers:
|
||||
- name: redis
|
||||
image: {{ .Values.redis.image.repository }}:{{ .Values.redis.image.tag }}
|
||||
command:
|
||||
- "sh"
|
||||
- "-c"
|
||||
- "exec redis-server --requirepass ${REDIS_PASSWORD} --maxmemory 128mb --maxmemory-policy allkeys-lru"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "ragflow.fullname" . }}-env-config
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: redis
|
||||
{{- if .Values.redis.persistence.enabled }}
|
||||
volumeMounts:
|
||||
- name: redis-data
|
||||
mountPath: /data
|
||||
{{- end }}
|
||||
{{- with .Values.redis.deployment.resources }}
|
||||
resources:
|
||||
{{- . | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.redis.persistence.enabled }}
|
||||
{{- with .Values.redis.persistence.retentionPolicy }}
|
||||
persistentVolumeClaimRetentionPolicy:
|
||||
{{- with .whenDeleted }}
|
||||
whenDeleted: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .whenScaled }}
|
||||
whenScaled: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: redis-data
|
||||
labels:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 10 }}
|
||||
app.kubernetes.io/component: redis
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
{{- with .Values.redis.storage.className }}
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.redis.storage.capacity }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-redis-svc
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: redis
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: redis
|
||||
protocol: TCP
|
||||
selector:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: redis
|
||||
---
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-redis-pdb
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: redis
|
||||
spec:
|
||||
minAvailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: redis
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ include "ragflow.fullname" . }}-test-connection"
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
spec:
|
||||
containers:
|
||||
- name: wget
|
||||
image: busybox
|
||||
command:
|
||||
- 'wget'
|
||||
args:
|
||||
- {{ printf "%s.%s.svc" (include "ragflow.fullname" .) .Release.Namespace }}
|
||||
restartPolicy: Never
|
||||
@@ -0,0 +1,245 @@
|
||||
# Based on docker compose .env file
|
||||
env:
|
||||
# The type of doc engine to use.
|
||||
# Available options:
|
||||
# - `elasticsearch` (default)
|
||||
# - `infinity` (https://github.com/infiniflow/infinity)
|
||||
# - `opensearch` (https://github.com/opensearch-project/OpenSearch)
|
||||
# DOC_ENGINE: elasticsearch
|
||||
DOC_ENGINE: infinity
|
||||
# DOC_ENGINE: opensearch
|
||||
|
||||
# The version of Elasticsearch.
|
||||
STACK_VERSION: "8.11.3"
|
||||
|
||||
# The password for Elasticsearch
|
||||
ELASTIC_PASSWORD: infini_rag_flow_helm
|
||||
|
||||
# The password for OpenSearch.
|
||||
# At least one uppercase letter, one lowercase letter, one digit, and one special character
|
||||
OPENSEARCH_PASSWORD: infini_rag_flow_OS_01
|
||||
|
||||
# The password for MySQL
|
||||
MYSQL_PASSWORD: infini_rag_flow_helm
|
||||
# The database of the MySQL service to use
|
||||
MYSQL_DBNAME: rag_flow
|
||||
|
||||
# The username for MinIO.
|
||||
MINIO_ROOT_USER: rag_flow
|
||||
# The password for MinIO
|
||||
MINIO_PASSWORD: infini_rag_flow_helm
|
||||
|
||||
# The password for Redis
|
||||
REDIS_PASSWORD: infini_rag_flow_helm
|
||||
|
||||
# The RAGFlow Docker image to download.
|
||||
# Defaults to the v0.20.1-slim edition, which is the RAGFlow Docker image without embedding models.
|
||||
RAGFLOW_IMAGE: infiniflow/ragflow:v0.20.1-slim
|
||||
#
|
||||
# To download the RAGFlow Docker image with embedding models, uncomment the following line instead:
|
||||
# RAGFLOW_IMAGE: infiniflow/ragflow:v0.20.1
|
||||
#
|
||||
# The Docker image of the v0.20.1 edition includes:
|
||||
# - Built-in embedding models:
|
||||
# - BAAI/bge-large-zh-v1.5
|
||||
# - BAAI/bge-reranker-v2-m3
|
||||
# - maidalun1020/bce-embedding-base_v1
|
||||
# - maidalun1020/bce-reranker-base_v1
|
||||
# - Embedding models that will be downloaded once you select them in the RAGFlow UI:
|
||||
# - BAAI/bge-base-en-v1.5
|
||||
# - BAAI/bge-large-en-v1.5
|
||||
# - BAAI/bge-small-en-v1.5
|
||||
# - BAAI/bge-small-zh-v1.5
|
||||
# - jinaai/jina-embeddings-v2-base-en
|
||||
# - jinaai/jina-embeddings-v2-small-en
|
||||
# - nomic-ai/nomic-embed-text-v1.5
|
||||
# - sentence-transformers/all-MiniLM-L6-v2
|
||||
#
|
||||
#
|
||||
|
||||
# The local time zone.
|
||||
TIMEZONE: "Asia/Shanghai"
|
||||
|
||||
# Uncomment the following line if you have limited access to huggingface.co:
|
||||
# HF_ENDPOINT: https://hf-mirror.com
|
||||
|
||||
# The maximum file size for each uploaded file, in bytes.
|
||||
# You can uncomment this line and update the value if you wish to change 128M file size limit
|
||||
# MAX_CONTENT_LENGTH: "134217728"
|
||||
# After making the change, ensure you update `client_max_body_size` in nginx/nginx.conf correspondingly.
|
||||
|
||||
# The number of document chunks processed in a single batch during document parsing.
|
||||
DOC_BULK_SIZE: 4
|
||||
|
||||
# The number of text chunks processed in a single batch during embedding vectorization.
|
||||
EMBEDDING_BATCH_SIZE: 16
|
||||
|
||||
ragflow:
|
||||
|
||||
# Optional service configuration overrides
|
||||
# to be written to local.service_conf.yaml
|
||||
# inside the RAGFlow container
|
||||
# https://ragflow.io/docs/dev/configurations#service-configuration
|
||||
service_conf:
|
||||
|
||||
# Optional yaml formatted override for the
|
||||
# llm_factories.json file inside the RAGFlow
|
||||
# container.
|
||||
llm_factories:
|
||||
# factory_llm_infos:
|
||||
# - name: OpenAI-API-Compatible
|
||||
# logo: ""
|
||||
# tags: "LLM,TEXT EMBEDDING,SPEECH2TEXT,MODERATION"
|
||||
# status: "1"
|
||||
# llm:
|
||||
# - llm_name: my-custom-llm
|
||||
# tags: "LLM,CHAT,"
|
||||
# max_tokens: 100000
|
||||
# model_type: chat
|
||||
# is_tools: false
|
||||
|
||||
# Additional volumes to be mounted in the ragflow container
|
||||
# Example:
|
||||
# volumes:
|
||||
# - name: my-custom-volume
|
||||
# configMap:
|
||||
# name: my-config
|
||||
# - name: my-secret-volume
|
||||
# secret:
|
||||
# secretName: my-secret
|
||||
# - name: my-pvc-volume
|
||||
# persistentVolumeClaim:
|
||||
# claimName: my-pvc
|
||||
volumes: []
|
||||
|
||||
# Additional volume mounts for the ragflow container
|
||||
# Example:
|
||||
# volumeMounts:
|
||||
# - name: my-custom-volume
|
||||
# mountPath: /app/config
|
||||
# readOnly: true
|
||||
# - name: my-secret-volume
|
||||
# mountPath: /app/secrets
|
||||
# readOnly: true
|
||||
# - name: my-pvc-volume
|
||||
# mountPath: /app/data
|
||||
volumeMounts: []
|
||||
|
||||
# Kubernetes configuration
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
service:
|
||||
# Use LoadBalancer to expose the web interface externally
|
||||
type: ClusterIP
|
||||
api:
|
||||
service:
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
|
||||
infinity:
|
||||
image:
|
||||
repository: infiniflow/infinity
|
||||
tag: v0.6.0-dev5
|
||||
storage:
|
||||
className:
|
||||
capacity: 5Gi
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
elasticsearch:
|
||||
storage:
|
||||
className:
|
||||
capacity: 20Gi
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
requests:
|
||||
cpu: "4"
|
||||
memory: "16Gi"
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
opensearch:
|
||||
image:
|
||||
repository: opensearchproject/opensearch
|
||||
tag: 2.19.1
|
||||
storage:
|
||||
className:
|
||||
capacity: 20Gi
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
requests:
|
||||
cpu: "4"
|
||||
memory: "16Gi"
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
minio:
|
||||
image:
|
||||
repository: quay.io/minio/minio
|
||||
tag: RELEASE.2023-12-20T01-00-02Z
|
||||
storage:
|
||||
className:
|
||||
capacity: 5Gi
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
mysql:
|
||||
image:
|
||||
repository: mysql
|
||||
tag: 8.0.39
|
||||
storage:
|
||||
className:
|
||||
capacity: 5Gi
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
redis:
|
||||
image:
|
||||
repository: valkey/valkey
|
||||
tag: 8
|
||||
storage:
|
||||
className:
|
||||
capacity: 5Gi
|
||||
persistence:
|
||||
enabled: true
|
||||
# Set's the retention policy for the persistent storage (only available in k8s 1.32 or later)
|
||||
# https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
|
||||
# retentionPolicy:
|
||||
# whenDeleted: Delete
|
||||
# whenScaled: Delete
|
||||
deployment:
|
||||
strategy:
|
||||
resources:
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
|
||||
# This block is for setting up web service ingress. For more information, see:
|
||||
# https://kubernetes.io/docs/concepts/services-networking/ingress/
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
Reference in New Issue
Block a user