Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions helm/templates/ragflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,19 @@ spec:
{{- with .Values.ragflow.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
{{- if .Values.ragflow.enableAdminServer }}
args:
- --enable-adminserver
{{- end }}
ports:
- containerPort: 80
name: http
- containerPort: 9380
name: http-api
{{- if .Values.ragflow.enableAdminServer }}
- containerPort: 9381
name: http-admin
{{- end }}
volumeMounts:
- mountPath: /etc/nginx/conf.d/ragflow.conf
subPath: ragflow.conf
Expand Down Expand Up @@ -117,3 +125,23 @@ spec:
name: http-api
type: {{ .Values.ragflow.api.service.type }}
{{- end }}
---
{{- if .Values.ragflow.enableAdminServer }}
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: 80
targetPort: http-admin
name: http-admin
type: ClusterIP
{{- end }}
8 changes: 7 additions & 1 deletion helm/templates/ragflow_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ data:
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]\.";

{{- if .Values.ragflow.enableAdminServer }}
# Admin API route to access /api/v1/admin backend API
location ~ ^/api/v1/admin {
proxy_pass http://localhost:9381;
include proxy.conf;
}
{{- end }}
location ~ ^/(v1|api) {
proxy_pass http://localhost:9380;
include proxy.conf;
Expand Down
3 changes: 3 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ ragflow:
service:
enabled: true
type: ClusterIP
# Be careful in enabling the admin server, as it gives access to sensitive
# administrative privileges and has default credentials to access the admin API.
enableDangerousAdminServer: false

infinity:
image:
Expand Down