Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Feat: expose admin service in helm configuration (#13345)

wyou0a4c0c38c736
diff --git a/helm/Chart.yaml b/helm/Chart.yaml
index 4dd5af1ac4..e8e672005b 100644
--- a/helm/Chart.yaml
+++ b/helm/Chart.yaml
@@ -15,7 +15,7 @@ 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
+version: 0.1.1
# 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
diff --git a/helm/templates/ragflow.yaml b/helm/templates/ragflow.yaml
index 73821ddfb5..456c2da8d1 100644
--- a/helm/templates/ragflow.yaml
+++ b/helm/templates/ragflow.yaml
@@ -40,11 +40,19 @@ spec:
{{- with .Values.ragflow.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
+ {{- if .Values.ragflow.admin.enabled }}
+ args:
+ - "--enable-adminserver"
+ {{- end }}
ports:
- containerPort: 80
name: http
- containerPort: 9380
name: http-api
+ {{- if .Values.ragflow.admin.enabled }}
+ - containerPort: 9381
+ name: admin
+ {{- end }}
volumeMounts:
- mountPath: /etc/nginx/conf.d/ragflow.conf
subPath: ragflow.conf
@@ -117,3 +125,24 @@ spec:
name: http-api
type: {{ .Values.ragflow.api.service.type }}
{{- end }}
+
+{{- if .Values.ragflow.admin.enabled }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ .Release.Name }}-admin
+ 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: {{ .Values.ragflow.admin.port }}
+ targetPort: admin
+ name: admin
+ type: {{ .Values.ragflow.admin.serviceType }}
+{{- end }}
diff --git a/helm/templates/ragflow_config.yaml b/helm/templates/ragflow_config.yaml
index 533bd3df9a..01f9493761 100644
--- a/helm/templates/ragflow_config.yaml
+++ b/helm/templates/ragflow_config.yaml
@@ -31,6 +31,11 @@ data:
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
+ location ~ ^/api/v1/admin {
+ proxy_pass http://localhost:9381;
+ include proxy.conf;
+ }
+
location ~ ^/(v1|api) {
proxy_pass http://localhost:9380;
include proxy.conf;
diff --git a/helm/values.yaml b/helm/values.yaml
index 803d982696..0860f136f5 100644
--- a/helm/values.yaml
+++ b/helm/values.yaml
@@ -109,6 +109,13 @@ ragflow:
service:
# Use LoadBalancer to expose the web interface externally
type: ClusterIP
+ admin:
+ # Enable Admin Service
+ enabled: true
+ # Admin Service port configuration
+ port: 9381
+ # Admin Service type
+ serviceType: ClusterIP
api:
service:
enabled: true