增加AzureBlobStorage支持

This commit is contained in:
2025-03-21 10:18:23 +08:00
parent 67b42e3e1c
commit 4566bdf008
7 changed files with 48 additions and 40 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{{- if and .Values.api.enabled}}
{{- $usePvc := not (or .Values.externalS3.enabled .Values.externalOSS.enabled .Values.externalAzureBlobStorage.enabled .Values.externalGCS.enabled .Values.externalCOS.enabled) -}}
{{- $usePvc := not (or .Values.externalS3.enabled .Values.externalAzureBlobStorage.enabled .Values.externalOSS.enabled .Values.externalGCS.enabled .Values.externalCOS.enabled .Values.externalOBS.enabled) -}}
apiVersion: apps/v1
kind: Deployment
metadata:
+18 -28
View File
@@ -126,6 +126,11 @@ CONSOLE_API_URL: {{ .Values.api.url.consoleApi | quote }}
APP_API_URL: {{ .Values.api.url.appApi | quote }}
# The DSN for Sentry
{{- include "dify.marketplace.config" . }}
{{- if and .Values.pluginDaemon.enabled .Values.pluginDaemon.marketplace.enabled .Values.pluginDaemon.marketplace.apiProxyEnabled }}
MARKETPLACE_API_URL: "/marketplace"
{{- else }}
MARKETPLACE_API_URL: {{ .Values.api.url.marketplaceApi | quote }}
{{- end }}
MARKETPLACE_URL: {{ .Values.api.url.marketplace | quote }}
{{- end }}
@@ -275,24 +280,10 @@ QDRANT_GRPC_PORT: {{ .Values.externalQdrant.grpc.port | quote }}
{{- else if .Values.externalMilvus.enabled}}
# Milvus configuration Only available when VECTOR_STORE is `milvus`.
VECTOR_STORE: milvus
# The milvus host.
MILVUS_HOST: {{ .Values.externalMilvus.host | quote }}
# The milvus host.
MILVUS_PORT: {{ .Values.externalMilvus.port | toString | quote }}
# The milvus URI.
{{- if .Values.externalMilvus.uri }}
# Milvus endpoint
MILVUS_URI: {{ .Values.externalMilvus.uri | quote }}
{{- else }}
MILVUS_URI: {{ .Values.externalMilvus.host }}:{{ .Values.externalMilvus.port }}
{{- end }}
# The milvus database
MILVUS_DATABASE: {{ .Values.externalMilvus.database | quote }}
# The milvus username.
# MILVUS_USER: {{ .Values.externalMilvus.user | quote }}
# The milvus password.
# MILVUS_PASSWORD: {{ .Values.externalMilvus.password | quote }}
# The milvus tls switch.
MILVUS_SECURE: {{ .Values.externalMilvus.useTLS | toString | quote }}
{{- else if .Values.externalPgvector.enabled}}
# pgvector configurations, only available when VECTOR_STORE is `pgvecto-rs or pgvector`
VECTOR_STORE: pgvector
@@ -360,18 +351,6 @@ SMTP_OPPORTUNISTIC_TLS: {{ .Values.api.mail.smtp.tls.optimistic | toString | quo
{{- end }}
{{- end }}
{{/*
Python 3.12.x 国内镜像源,配置文件挂载路径:/root/.config/pip/pip.conf
*/}}
{{- define "dify.python.environment.config" -}}
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
{{- end }}
{{- define "dify.sandbox.config" -}}
GIN_MODE: release
SANDBOX_PORT: '8194'
@@ -466,6 +445,17 @@ server {
include proxy.conf;
}
{{- if and .Values.pluginDaemon.enabled .Values.pluginDaemon.marketplace.enabled .Values.pluginDaemon.marketplace.apiProxyEnabled }}
location /marketplace {
rewrite ^/marketplace/(.*)$ /$1 break;
proxy_ssl_server_name on;
proxy_pass {{ .Values.api.url.marketplace | quote }};
proxy_pass_request_headers off;
proxy_set_header Host {{ regexReplaceAll "^https?://([^/]+).*" .Values.api.url.marketplace "${1}" | quote }};
proxy_set_header Connection "";
}
{{- end }}
location / {
proxy_pass http://{{ template "dify.web.fullname" .}}:{{ .Values.web.service.port }};
include proxy.conf;
@@ -551,7 +541,7 @@ SERVER_PORT: "5002"
PLUGIN_REMOTE_INSTALLING_HOST: "0.0.0.0"
PLUGIN_REMOTE_INSTALLING_PORT: "5003"
MAX_PLUGIN_PACKAGE_SIZE: "52428800"
PLUGIN_WORKING_PATH: {{ .Values.pluginDaemon.persistence.mountPath | quote }}
PLUGIN_WORKING_PATH: {{ printf "%s/cwd" .Values.pluginDaemon.persistence.mountPath | clean | quote }}
DIFY_INNER_API_URL: "http://{{ template "dify.api.fullname" . }}:{{ .Values.api.service.port }}"
{{- include "dify.marketplace.config" . }}
{{- end }}
+4 -1
View File
@@ -109,8 +109,11 @@ WEAVIATE_API_KEY: {{ .Values.externalWeaviate.apiKey | b64enc | quote }}
{{- else if .Values.externalQdrant.enabled }}
QDRANT_API_KEY: {{ .Values.externalQdrant.apiKey | b64enc | quote }}
{{- else if .Values.externalMilvus.enabled}}
# the milvus token
MILVUS_TOKEN: {{ .Values.externalMilvus.token | b64enc | quote }}
# the milvus username
MILVUS_USER: {{ .Values.externalMilvus.user | b64enc | quote }}
# The milvus password.
# the milvus password
MILVUS_PASSWORD: {{ .Values.externalMilvus.password | b64enc | quote }}
{{- else if .Values.externalPgvector.enabled}}
PGVECTOR_USER: {{ .Values.externalPgvector.username | b64enc | quote }}
+1 -1
View File
@@ -1,4 +1,4 @@
{{- if not (or .Values.externalS3.enabled .Values.externalAzureBlobStorage.enabled .Values.externalOSS.enabled) }}
{{- if not (or .Values.externalS3.enabled .Values.externalAzureBlobStorage.enabled .Values.externalOSS.enabled .Values.externalGCS.enabled .Values.externalCOS.enabled .Values.externalOBS.enabled) }}
{{- $pvc := .Values.api.persistence.persistentVolumeClaim -}}
{{- if (not $pvc.existingClaim) }}
apiVersion: v1
+1 -1
View File
@@ -1,5 +1,5 @@
{{- if and .Values.worker.enabled}}
{{- $usePvc := not (or .Values.externalS3.enabled .Values.externalOSS.enabled .Values.externalAzureBlobStorage.enabled .Values.externalGCS.enabled .Values.externalCOS.enabled) -}}
{{- $usePvc := not (or .Values.externalS3.enabled .Values.externalAzureBlobStorage.enabled .Values.externalOSS.enabled .Values.externalGCS.enabled .Values.externalCOS.enabled .Values.externalOBS.enabled) -}}
apiVersion: apps/v1
kind: Deployment
metadata: