增加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
@@ -3,7 +3,7 @@ name: dify
description: 用于在 Kubernetes 环境部署 Dify 应用的 Helm chart 文件。官网:https://github.com/langgenius/dify
type: application
# 当前图表的版本,仅用于标识图表文件变更
version: 0.1.0
version: 0.1.1
# 部署的主应用的版本;建议使用双引号包起来
appVersion: "1.0.1"
+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:
+22 -7
View File
@@ -186,7 +186,7 @@ api:
marketplace: "https://marketplace.dify.ai"
mail:
# default email sender from email address, if not given a specific address
defaultSender: "YOUR EMAIL FROM (e.g., no-reply <no-reply@dify.ai>)"
defaultSender: "YOUR EMAIL FROM (e.g.: no-reply <no-reply@dify.ai>)"
# Mail type, supported values are `smtp`, `resend` https://docs.dify.ai/getting-started/install-self-hosted/environments#mail-related-configuration
type: "resend"
resend:
@@ -628,7 +628,7 @@ pluginDaemon:
# A separate key for interactions between `api`(`worker`) and `pluginDaemon`
difyApiKey: "QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1"
persistence:
mountPath: "/app/storage/cwd"
mountPath: "/app/storage"
annotations:
helm.sh/resource-policy: keep
persistentVolumeClaim:
@@ -646,6 +646,10 @@ pluginDaemon:
subPath: ""
marketplace:
enabled: true
# Takes effect only if built-in `nginx` were enabled
# If enabled, route marketplace api call to built-in `nginx` and strip headers for tracking.
# https://github.com/BorisPolonsky/dify-helm/pull/131
apiProxyEnabled: false
## pluginDaemon ServiceAccount configuration
##
serviceAccount:
@@ -3044,6 +3048,17 @@ externalCOS:
bucketName: "your-bucket-name"
scheme: "your-scheme"
###################################
# External HUAWEI OBS
# - these configs are only used when `externalS3.enabled` and `externalAzureBlobStorage.enabled` and `externalOSS.enabled` and `externalGCS.enabled` and `externalCOS.enabled` are false and `externalOBS.enabled` is true
###################################
externalOBS:
enabled: false
secretKey: "your-secret-key"
secretId: "your-secret-id"
bucketName: "your-bucket-name"
server: "your-server"
###################################
# External Redis
# - these configs are only used when `externalRedis.enabled` is true
@@ -3084,11 +3099,11 @@ externalQdrant:
###################################
externalMilvus:
enabled: false
uri: "your-milvus.domain:19530"
database: "default"
user: "user"
password: "Milvus"
useTLS: false
uri: "http://your-milvus.domain:19530"
database: 'default'
token: ""
user: ""
password: ""
###################################
# External Pgvector