Update ragflow
This commit is contained in:
@@ -10,4 +10,8 @@ data:
|
||||
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 -}}
|
||||
|
||||
@@ -19,7 +19,7 @@ spec:
|
||||
storage: {{ .Values.elasticsearch.storage.capacity }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-es
|
||||
labels:
|
||||
|
||||
@@ -43,14 +43,11 @@ stringData:
|
||||
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' or 'infinity'" }}
|
||||
{{- end }}
|
||||
{{- if .Values.oidc.enable }}
|
||||
DISPLAY_NAME: {{ .Values.oidc.display_name }}
|
||||
CLIENT_ID: {{ .Values.oidc.client_id }}
|
||||
CLIENT_SECRETS: {{ .Values.oidc.client_secret }}
|
||||
ISSUER: {{ .Values.oidc.issuer }}
|
||||
SCOPE: {{ .Values.oidc.scope }}
|
||||
REDIRECT_URI: {{ .Values.oidc.redirect_uri }}
|
||||
{{ fail "env.DOC_ENGINE must be either 'elasticsearch', 'opensearch' or 'infinity'" }}
|
||||
{{- end }}
|
||||
|
||||
@@ -19,7 +19,7 @@ spec:
|
||||
storage: {{ .Values.infinity.storage.capacity }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-infinity
|
||||
labels:
|
||||
|
||||
@@ -19,9 +19,9 @@ spec:
|
||||
storage: {{ .Values.minio.storage.capacity }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: ragflow-minio-deployment
|
||||
name: {{ include "ragflow.fullname" . }}-minio
|
||||
labels:
|
||||
{{- include "ragflow.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: minio
|
||||
|
||||
@@ -19,7 +19,7 @@ spec:
|
||||
storage: {{ .Values.mysql.storage.capacity }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "ragflow.fullname" . }}-mysql
|
||||
labels:
|
||||
|
||||
@@ -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 -}}
|
||||
@@ -43,10 +43,15 @@ spec:
|
||||
- mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
name: nginx-config-volume
|
||||
{{- if .Values.oidc.enable }}
|
||||
- mountPath: /ragflow/conf/service_conf.yaml.template
|
||||
subPath: service_conf.yaml.template
|
||||
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 }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
@@ -59,6 +64,9 @@ spec:
|
||||
- name: nginx-config-volume
|
||||
configMap:
|
||||
name: nginx-config
|
||||
- name: service-conf-volume
|
||||
configMap:
|
||||
name: ragflow-service-config
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
---
|
||||
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:
|
||||
@@ -73,116 +87,3 @@ data:
|
||||
|
||||
include /etc/nginx/conf.d/ragflow.conf;
|
||||
}
|
||||
{{- if .Values.oidc.enable }}
|
||||
service_conf.yaml.template: |
|
||||
ragflow:
|
||||
host: ${RAGFLOW_HOST:-0.0.0.0}
|
||||
http_port: 9380
|
||||
mysql:
|
||||
name: '${MYSQL_DBNAME:-rag_flow}'
|
||||
user: '${MYSQL_USER:-root}'
|
||||
password: '${MYSQL_PASSWORD:-infini_rag_flow}'
|
||||
host: '${MYSQL_HOST:-mysql}'
|
||||
port: 3306
|
||||
max_connections: 900
|
||||
stale_timeout: 300
|
||||
minio:
|
||||
user: '${MINIO_USER:-rag_flow}'
|
||||
password: '${MINIO_PASSWORD:-infini_rag_flow}'
|
||||
host: '${MINIO_HOST:-minio}:9000'
|
||||
es:
|
||||
hosts: 'http://${ES_HOST:-es01}:9200'
|
||||
username: '${ES_USER:-elastic}'
|
||||
password: '${ELASTIC_PASSWORD:-infini_rag_flow}'
|
||||
os:
|
||||
hosts: 'http://${OS_HOST:-opensearch01}:9201'
|
||||
username: '${OS_USER:-admin}'
|
||||
password: '${OPENSEARCH_PASSWORD:-infini_rag_flow_OS_01}'
|
||||
infinity:
|
||||
uri: '${INFINITY_HOST:-infinity}:23817'
|
||||
db_name: 'default_db'
|
||||
redis:
|
||||
db: 1
|
||||
password: '${REDIS_PASSWORD:-infini_rag_flow}'
|
||||
host: '${REDIS_HOST:-redis}:6379'
|
||||
|
||||
# postgres:
|
||||
# name: '${POSTGRES_DBNAME:-rag_flow}'
|
||||
# user: '${POSTGRES_USER:-rag_flow}'
|
||||
# password: '${POSTGRES_PASSWORD:-infini_rag_flow}'
|
||||
# host: '${POSTGRES_HOST:-postgres}'
|
||||
# port: 5432
|
||||
# max_connections: 100
|
||||
# stale_timeout: 30
|
||||
# s3:
|
||||
# access_key: 'access_key'
|
||||
# secret_key: 'secret_key'
|
||||
# region: 'region'
|
||||
# endpoint_url: 'endpoint_url'
|
||||
# bucket: 'bucket'
|
||||
# prefix_path: 'prefix_path'
|
||||
# signature_version: 'v4'
|
||||
# addressing_style: 'path'
|
||||
# oss:
|
||||
# access_key: '${ACCESS_KEY}'
|
||||
# secret_key: '${SECRET_KEY}'
|
||||
# endpoint_url: '${ENDPOINT}'
|
||||
# region: '${REGION}'
|
||||
# bucket: '${BUCKET}'
|
||||
# prefix_path: '${OSS_PREFIX_PATH}'
|
||||
# azure:
|
||||
# auth_type: 'sas'
|
||||
# container_url: 'container_url'
|
||||
# sas_token: 'sas_token'
|
||||
# azure:
|
||||
# auth_type: 'spn'
|
||||
# account_url: 'account_url'
|
||||
# client_id: 'client_id'
|
||||
# secret: 'secret'
|
||||
# tenant_id: 'tenant_id'
|
||||
# container_name: 'container_name'
|
||||
# user_default_llm:
|
||||
# factory: 'Tongyi-Qianwen'
|
||||
# api_key: 'sk-xxxxxxxxxxxxx'
|
||||
# base_url: ''
|
||||
# default_models:
|
||||
# chat_model: 'qwen-plus'
|
||||
# embedding_model: 'BAAI/bge-large-zh-v1.5@BAAI'
|
||||
# rerank_model: ''
|
||||
# asr_model: ''
|
||||
# image2text_model: ''
|
||||
oauth:
|
||||
# oauth2:
|
||||
# display_name: "OAuth2"
|
||||
# client_id: "your_client_id"
|
||||
# client_secret: "your_client_secret"
|
||||
# authorization_url: "https://your-oauth-provider.com/oauth/authorize"
|
||||
# token_url: "https://your-oauth-provider.com/oauth/token"
|
||||
# userinfo_url: "https://your-oauth-provider.com/oauth/userinfo"
|
||||
# redirect_uri: "https://your-app.com/v1/user/oauth/callback/oauth2"
|
||||
oidc:
|
||||
display_name: '${DISPLAY_NAME}'
|
||||
client_id: '${CLIENT_ID}'
|
||||
client_secret: '${CLIENT_SECRETS}'
|
||||
issuer: '${ISSUER}'
|
||||
scope: '${SCOPE:openid}'
|
||||
redirect_uri: '${REDIRECT_URI}'
|
||||
# github:
|
||||
# type: "github"
|
||||
# icon: "github"
|
||||
# display_name: "Github"
|
||||
# client_id: "your_client_id"
|
||||
# client_secret: "your_client_secret"
|
||||
# redirect_uri: "https://your-app.com/v1/user/oauth/callback/github"
|
||||
# authentication:
|
||||
# client:
|
||||
# switch: false
|
||||
# http_app_key:
|
||||
# http_secret_key:
|
||||
# site:
|
||||
# switch: false
|
||||
# permission:
|
||||
# switch: false
|
||||
# component: false
|
||||
# dataset: false
|
||||
{{- end }}
|
||||
|
||||
@@ -64,11 +64,20 @@ spec:
|
||||
{{- . | 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.labels" . | nindent 10 }}
|
||||
{{- include "ragflow.selectorLabels" . | nindent 10 }}
|
||||
app.kubernetes.io/component: redis
|
||||
spec:
|
||||
accessModes:
|
||||
@@ -109,4 +118,4 @@ spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ragflow.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/component: redis
|
||||
|
||||
Reference in New Issue
Block a user