diff --git a/Chart.yaml b/Chart.yaml index 4843eef..3f02bb9 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -3,9 +3,9 @@ name: dify description: 用于在 Kubernetes 环境部署 Dify 应用的 Helm chart 文件。官网:https://github.com/langgenius/dify type: application # 当前图表的版本,仅用于标识图表文件变更 -version: 0.1.2 +version: 0.2.1 # 部署的主应用的版本;建议使用双引号包起来 -appVersion: "1.1.2" +appVersion: "1.7.1" # 指定依赖的模板库,存在即生效 dependencies: diff --git a/templates/api-deployment.yaml b/templates/api-deployment.yaml index ca3ec61..d72b420 100644 --- a/templates/api-deployment.yaml +++ b/templates/api-deployment.yaml @@ -21,8 +21,11 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.api.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} + {{- if .Values.api.updateStrategy }} + strategy: {{- toYaml .Values.api.updateStrategy | nindent 4 }} + {{- end }} template: metadata: annotations: @@ -35,11 +38,14 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.api.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} {{ include "dify.ud.labels" . | indent 8 }} spec: serviceAccountName: {{ include "dify.api.serviceAccountName" . }} + {{- if .Values.api.priorityClassName }} + priorityClassName: {{ .Values.api.priorityClassName | quote }} + {{- end }} {{- if eq .Release.Name "dify"}} {{/* Disable service environment variables, diff --git a/templates/config.tpl b/templates/config.tpl index b00a7bd..45d51d0 100644 --- a/templates/config.tpl +++ b/templates/config.tpl @@ -2,7 +2,7 @@ # Startup mode, 'api' starts the API server. MODE: api # The log level for the application. Supported values are `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL` -LOG_LEVEL: {{ .Values.api.logLevel }} +LOG_LEVEL: {{ .Values.api.logLevel | quote }} # A secret key that is used for securely signing the session cookie and encrypting sensitive information on the database. You can generate a strong key using `openssl rand -base64 42`. # SECRET_KEY: {{ .Values.api.secretKey }} # The base URL of console application web frontend, refers to the Console base URL of WEB service if console domain is @@ -104,7 +104,8 @@ LOG_LEVEL: {{ .Values.worker.logLevel | quote }} {{ include "dify.redis.config" . }} # The configurations of celery broker. {{ include "dify.celery.config" . }} - +# The configurations of celery backend +CELERY_BACKEND: redis {{ include "dify.storage.config" . }} # The Vector store configurations. {{ include "dify.vectordb.config" . }} @@ -125,19 +126,19 @@ CONSOLE_API_URL: {{ .Values.api.url.consoleApi | quote }} # example: http://udify.app 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_ENABLED: "true" MARKETPLACE_API_URL: "/marketplace" {{- else }} -MARKETPLACE_API_URL: {{ .Values.api.url.marketplaceApi | quote }} +{{- include "dify.marketplace.config" . }} {{- end }} MARKETPLACE_URL: {{ .Values.api.url.marketplace | quote }} {{- end }} {{- define "dify.db.config" -}} {{- if .Values.externalPostgres.enabled }} -# DB_USERNAME: {{ .Values.externalPostgres.username }} -# DB_PASSWORD: {{ .Values.externalPostgres.password }} +# DB_USERNAME: {{ .Values.externalPostgres.username | quote }} +# DB_PASSWORD: {{ .Values.externalPostgres.password | quote }} DB_HOST: {{ .Values.externalPostgres.address }} DB_PORT: {{ .Values.externalPostgres.port | toString | quote }} DB_DATABASE: {{ .Values.externalPostgres.database.api | quote }} @@ -145,10 +146,10 @@ DB_DATABASE: {{ .Values.externalPostgres.database.api | quote }} {{ with .Values.postgresql.global.postgresql.auth }} {{- if empty .username }} # DB_USERNAME: postgres -# DB_PASSWORD: {{ .postgresPassword }} +# DB_PASSWORD: {{ .postgresPassword | quote }} {{- else }} -# DB_USERNAME: {{ .username }} -# DB_PASSWORD: {{ .password }} +# DB_USERNAME: {{ .username | quote }} +# DB_PASSWORD: {{ .password | quote }} {{- end }} {{- end }} {{- if eq .Values.postgresql.architecture "replication" }} @@ -166,11 +167,11 @@ DB_DATABASE: {{ .Values.postgresql.global.postgresql.auth.database }} # The type of storage to use for storing user files. Supported values are `local`, `s3`, `azure-blob`, `aliyun-oss` and `google-storage`, Default: `local` STORAGE_TYPE: s3 # The S3 storage configurations, only available when STORAGE_TYPE is `s3`. -S3_ENDPOINT: {{ .Values.externalS3.endpoint }} -S3_BUCKET_NAME: {{ .Values.externalS3.bucketName }} -# S3_ACCESS_KEY: {{ .Values.externalS3.accessKey }} -# S3_SECRET_KEY: {{ .Values.externalS3.secretKey }} -S3_REGION: {{ .Values.externalS3.region }} +S3_ENDPOINT: {{ .Values.externalS3.endpoint | quote }} +S3_BUCKET_NAME: {{ .Values.externalS3.bucketName.api | quote }} +# S3_ACCESS_KEY: {{ .Values.externalS3.accessKey | quote }} +# S3_SECRET_KEY: {{ .Values.externalS3.secretKey | quote }} +S3_REGION: {{ .Values.externalS3.region | quote }} {{- else if .Values.externalAzureBlobStorage.enabled }} # The type of storage to use for storing user files. Supported values are `local`, `s3`, `azure-blob`, `aliyun-oss` and `google-storage`, Default: `local` STORAGE_TYPE: azure-blob @@ -184,36 +185,49 @@ AZURE_BLOB_ACCOUNT_URL: {{ .Values.externalAzureBlobStorage.url | quote }} STORAGE_TYPE: aliyun-oss # The OSS storage configurations, only available when STORAGE_TYPE is `aliyun-oss`. ALIYUN_OSS_ENDPOINT: {{ .Values.externalOSS.endpoint | quote }} -ALIYUN_OSS_BUCKET_NAME: {{ .Values.externalOSS.bucketName | quote }} -# ALIYUN_OSS_ACCESS_KEY: {{ .Values.externalOSS.accessKey }} -# ALIYUN_OSS_SECRET_KEY: {{ .Values.externalOSS.secretKey }} +ALIYUN_OSS_BUCKET_NAME: {{ .Values.externalOSS.bucketName.api | quote }} +# ALIYUN_OSS_ACCESS_KEY: {{ .Values.externalOSS.accessKey | quote }} +# ALIYUN_OSS_SECRET_KEY: {{ .Values.externalOSS.secretKey | quote }} ALIYUN_OSS_REGION: {{ .Values.externalOSS.region | quote }} ALIYUN_OSS_AUTH_VERSION: {{ .Values.externalOSS.authVersion | quote }} ALIYUN_OSS_PATH: {{ .Values.externalOSS.path | quote }} {{- else if .Values.externalGCS.enabled }} # The type of storage to use for storing user files. Supported values are `local`, `s3`, `azure-blob`, `aliyun-oss` and `google-storage`, Default: `local` STORAGE_TYPE: google-storage -GOOGLE_STORAGE_BUCKET_NAME: {{ .Values.externalGCS.bucketName }} -GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: {{ .Values.externalGCS.serviceAccountJsonBase64 }} +GOOGLE_STORAGE_BUCKET_NAME: {{ .Values.externalGCS.bucketName.api | quote }} +# GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: {{ .Values.externalGCS.serviceAccountJsonBase64 | quote }} {{- else if .Values.externalCOS.enabled }} # The type of storage to use for storing user files. Supported values are `local`, `s3`, `azure-blob`, `aliyun-oss`, `google-storage` and `tencent-cos`, Default: `local` STORAGE_TYPE: tencent-cos # The name of the Tencent COS bucket to use for storing files. -TENCENT_COS_BUCKET_NAME: {{ .Values.externalCOS.bucketName }} +TENCENT_COS_BUCKET_NAME: {{ .Values.externalCOS.bucketName.api | quote }} # The secret key to use for authenticating with the Tencent COS service. -TENCENT_COS_SECRET_KEY: {{ .Values.externalCOS.secretKey }} +# TENCENT_COS_SECRET_KEY: {{ .Values.externalCOS.secretKey | quote }} # The secret id to use for authenticating with the Tencent COS service. -TENCENT_COS_SECRET_ID: {{ .Values.externalCOS.secretId }} +TENCENT_COS_SECRET_ID: {{ .Values.externalCOS.secretId | quote }} # The region of the Tencent COS service. -TENCENT_COS_REGION: {{ .Values.externalCOS.region }} +TENCENT_COS_REGION: {{ .Values.externalCOS.region | quote }} # The scheme of the Tencent COS service. -TENCENT_COS_SCHEME: {{ .Values.externalCOS.scheme }} +TENCENT_COS_SCHEME: {{ .Values.externalCOS.scheme | quote }} +{{- else if .Values.externalOBS.enabled }} +STORAGE_TYPE: huawei-obs +HUAWEI_OBS_SERVER: {{ .Values.externalOBS.endpoint | quote }} +HUAWEI_OBS_BUCKET_NAME: {{ .Values.externalOBS.bucketName.api | quote }} +# HUAWEI_OBS_ACCESS_KEY: {{ .Values.externalOBS.accessKey | quote }} +# HUAWEI_OBS_SECRET_KEY: {{ .Values.externalOBS.secretKey | quote }} +{{- else if .Values.externalTOS.enabled }} +STORAGE_TYPE: "volcengine-tos" +VOLCENGINE_TOS_ENDPOINT: {{ .Values.externalTOS.endpoint | quote }} +VOLCENGINE_TOS_REGION: {{ .Values.externalTOS.region | quote }} +VOLCENGINE_TOS_BUCKET_NAME: {{ .Values.externalTOS.bucketName.api | quote }} +VOLCENGINE_TOS_ACCESS_KEY: {{ .Values.externalTOS.accessKey | quote }} +# VOLCENGINE_TOS_SECRET_KEY: {{ .Values.externalTOS.secretKey | quote }} {{- else }} # The type of storage to use for storing user files. Supported values are `local` and `s3` and `azure-blob`, Default: `local` STORAGE_TYPE: local # The path to the local storage directory, the directory relative the root path of API service codes or absolute path. Default: `storage` or `/home/john/storage`. # only available when STORAGE_TYPE is `local`. -STORAGE_LOCAL_PATH: {{ .Values.api.persistence.mountPath }} +STORAGE_LOCAL_PATH: {{ .Values.api.persistence.mountPath | quote }} {{- end }} {{- end }} @@ -246,7 +260,11 @@ REDIS_DB: "0" # Use redis as the broker, and redis db 1 for celery broker. {{- if .Values.externalRedis.enabled }} {{- with .Values.externalRedis }} -# CELERY_BROKER_URL: {{ printf "redis://%s:%s@%s:%v/1" .username .password .host .port }} + {{- $scheme := "redis" }} + {{- if .useSSL }} + {{- $scheme = "rediss" }} + {{- end }} +# CELERY_BROKER_URL: {{ printf "%s://%s:%s@%s:%v/1" $scheme .username .password .host .port }} {{- end }} {{- else if .Values.redis.enabled }} {{- $redisHost := printf "%s-redis-master" .Release.Name -}} @@ -267,9 +285,9 @@ WEAVIATE_ENDPOINT: {{ .Values.externalWeaviate.endpoint | quote }} {{- else if .Values.externalQdrant.enabled }} VECTOR_STORE: qdrant # The Qdrant endpoint URL. Only available when VECTOR_STORE is `qdrant`. -QDRANT_URL: {{ .Values.externalQdrant.endpoint }} +QDRANT_URL: {{ .Values.externalQdrant.endpoint | quote }} # The Qdrant API key. -# QDRANT_API_KEY: {{ .Values.externalQdrant.apiKey }} +# QDRANT_API_KEY: {{ .Values.externalQdrant.apiKey | quote }} # The Qdrant clinet timeout setting. QDRANT_CLIENT_TIMEOUT: {{ .Values.externalQdrant.timeout | quote }} # The Qdrant client enable gRPC mode. @@ -277,7 +295,7 @@ QDRANT_GRPC_ENABLED: {{ .Values.externalQdrant.grpc.enabled | toString | quote } # The Qdrant server gRPC mode PORT. QDRANT_GRPC_PORT: {{ .Values.externalQdrant.grpc.port | quote }} # The DSN for Sentry error reporting. If not set, Sentry error reporting will be disabled. -{{- else if .Values.externalMilvus.enabled}} +{{- else if .Values.externalMilvus.enabled }} # Milvus configuration Only available when VECTOR_STORE is `milvus`. VECTOR_STORE: milvus # Milvus endpoint @@ -290,9 +308,9 @@ VECTOR_STORE: pgvector PGVECTOR_HOST: {{ .Values.externalPgvector.address }} PGVECTOR_PORT: {{ .Values.externalPgvector.port | toString | quote }} PGVECTOR_DATABASE: {{ .Values.externalPgvector.dbName }} -# DB_USERNAME: {{ .Values.externalPgvector.username }} -# DB_PASSWORD: {{ .Values.externalPgvector.password }} -{{- else if .Values.externalTencentVectorDB.enabled}} +# DB_USERNAME: {{ .Values.externalPgvector.username | quote }} +# DB_PASSWORD: {{ .Values.externalPgvector.password | quote }} +{{- else if .Values.externalTencentVectorDB.enabled }} # tencent vector configurations, only available when VECTOR_STORE is `tencent` VECTOR_STORE: tencent TENCENT_VECTOR_DB_URL: {{ .Values.externalTencentVectorDB.url | quote }} @@ -311,6 +329,13 @@ MYSCALE_PORT: {{ .Values.externalMyScaleDB.port | toString | quote }} # MYSCALE_PASSWORD: {{ .Values.externalMyScaleDB.password | quote }} MYSCALE_DATABASE: {{ .Values.externalMyScaleDB.database | quote }} MYSCALE_FTS_PARAMS: {{ .Values.externalMyScaleDB.ftsParams | quote }} +{{- else if .Values.externalTableStore.enabled }} +# TableStore configurations, only available when VECTOR_STORE is `tablestore` +VECTOR_STORE: tablestore +TABLESTORE_ENDPOINT: {{ .Values.externalTableStore.endpoint | quote }} +TABLESTORE_INSTANCE_NAME: {{ .Values.externalTableStore.instanceName | quote }} +# TABLESTORE_ACCESS_KEY_ID: {{ .Values.externalTableStore.accessKeyId | quote }} +# TABLESTORE_ACCESS_KEY_SECRET: {{ .Values.externalTableStore.accessKeySecret | quote }} {{- else if .Values.weaviate.enabled }} # The type of vector store to use. Supported values are `weaviate`, `qdrant`, `milvus`. VECTOR_STORE: weaviate @@ -456,6 +481,11 @@ server { } {{- end }} + location /mcp { + proxy_pass http://{{ template "dify.api.fullname" .}}:{{ .Values.api.service.port }}; + include proxy.conf; + } + location / { proxy_pass http://{{ template "dify.web.fullname" .}}:{{ .Values.web.service.port }}; include proxy.conf; @@ -524,7 +554,7 @@ cache_store_log none {{- define "dify.pluginDaemon.db.config" -}} {{- if .Values.externalPostgres.enabled }} -DB_HOST: {{ .Values.externalPostgres.address }} +DB_HOST: {{ .Values.externalPostgres.address | quote }} DB_PORT: {{ .Values.externalPostgres.port | toString | quote }} DB_DATABASE: {{ .Values.externalPostgres.database.pluginDaemon | quote }} {{- else if .Values.postgresql.enabled }} @@ -537,10 +567,12 @@ DB_DATABASE: {{ .Values.externalPostgres.database.pluginDaemon | quote }} {{- define "dify.pluginDaemon.config" }} {{- include "dify.redis.config" . }} {{- include "dify.pluginDaemon.db.config" .}} +{{- include "dify.pluginDaemon.storage.config" .}} SERVER_PORT: "5002" PLUGIN_REMOTE_INSTALLING_HOST: "0.0.0.0" PLUGIN_REMOTE_INSTALLING_PORT: "5003" MAX_PLUGIN_PACKAGE_SIZE: "52428800" +PLUGIN_STORAGE_LOCAL_ROOT: {{ .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" . }} @@ -554,3 +586,47 @@ MARKETPLACE_API_URL: {{ .Values.api.url.marketplaceApi | quote }} MARKETPLACE_ENABLED: "false" {{- end }} {{- end }} + +{{- define "dify.pluginDaemon.storage.config" -}} +{{- if and .Values.externalS3.enabled .Values.externalS3.bucketName.pluginDaemon }} +PLUGIN_STORAGE_TYPE: aws_s3 +S3_USE_PATH_STYLE: {{ .Values.externalS3.pathStyle | toString | quote }} +S3_ENDPOINT: {{ .Values.externalS3.endpoint | quote }} +PLUGIN_STORAGE_OSS_BUCKET: {{ .Values.externalS3.bucketName.pluginDaemon | quote }} +AWS_REGION: {{ .Values.externalS3.region | quote }} +{{- else if and .Values.externalOSS.enabled .Values.externalOSS.bucketName.pluginDaemon }} +PLUGIN_STORAGE_TYPE: "aliyun_oss" +ALIYUN_OSS_REGION: {{ .Values.externalOSS.region | quote }} +ALIYUN_OSS_ENDPOINT: {{ .Values.externalOSS.endpoint | quote }} +PLUGIN_STORAGE_OSS_BUCKET: {{ .Values.externalOSS.bucketName.pluginDaemon | quote }} +ALIYUN_OSS_ACCESS_KEY_ID: {{ .Values.externalOSS.accessKey | quote }} +# ALIYUN_OSS_ACCESS_KEY_SECRET: {{ .Values.externalOSS.secretKey | quote }} +ALIYUN_OSS_AUTH_VERSION: {{ .Values.externalOSS.authVersion | quote }} +ALIYUN_OSS_PATH: {{ .Values.externalOSS.path | quote }} +{{- else if and .Values.externalGCS.enabled .Values.externalGCS.bucketName.pluginDaemon }} +PLUGIN_STORAGE_TYPE: "google-storage" +PLUGIN_STORAGE_OSS_BUCKET: {{ .Values.externalGCS.bucketName.pluginDaemon | quote }} +# GCS_CREDENTIALS: {{ .Values.externalGCS.serviceAccountJsonBase64 | quote }} +{{- else if and .Values.externalCOS.enabled .Values.externalCOS.bucketName.pluginDaemon }} +PLUGIN_STORAGE_TYPE: "tencent_cos" +TENCENT_COS_SECRET_ID: {{ .Values.externalCOS.secretId | quote }} +TENCENT_COS_REGION: {{ .Values.externalCOS.region | quote }} +PLUGIN_STORAGE_OSS_BUCKET: {{ .Values.externalCOS.bucketName.pluginDaemon | quote }} +{{- else if and .Values.externalOBS.enabled .Values.externalOBS.bucketName.pluginDaemon }} +PLUGIN_STORAGE_TYPE: "huawei-obs" +HUAWEI_OBS_SERVER: {{ .Values.externalOBS.endpoint | quote }} +PLUGIN_STORAGE_OSS_BUCKET: {{ .Values.externalOBS.bucketName.pluginDaemon | quote }} +HUAWEI_OBS_ACCESS_KEY: {{ .Values.externalOBS.accessKey | quote }} +# HUAWEI_OBS_SECRET_KEY: {{ .Values.externalOBS.secretKey | quote }} +{{- else if and .Values.externalTOS.enabled .Values.externalTOS.bucketName.pluginDaemon }} +PLUGIN_STORAGE_TYPE: "volcengine-tos" +PLUGIN_VOLCENGINE_TOS_ENDPOINT: {{ .Values.externalTOS.endpoint | quote }} +PLUGIN_VOLCENGINE_TOS_REGION: {{ .Values.externalTOS.region | quote }} +PLUGIN_STORAGE_OSS_BUCKET: {{ .Values.externalTOS.bucketName.pluginDaemon | quote }} +PLUGIN_VOLCENGINE_TOS_ACCESS_KEY: {{ .Values.externalTOS.accessKey | quote }} +# PLUGIN_VOLCENGINE_TOS_SECRET_KEY: {{ .Values.externalTOS.secretKey | quote }} +{{- else }} +PLUGIN_STORAGE_TYPE: local +STORAGE_LOCAL_PATH: {{ .Values.pluginDaemon.persistence.mountPath | quote }} +{{- end }} +{{- end }} diff --git a/templates/credentials.tpl b/templates/credentials.tpl index 08f9cf4..10fd214 100644 --- a/templates/credentials.tpl +++ b/templates/credentials.tpl @@ -48,7 +48,7 @@ INNER_API_KEY_FOR_PLUGIN: {{ .Values.pluginDaemon.auth.difyApiKey | b64enc | quo DB_USERNAME: {{ .Values.externalPostgres.username | b64enc | quote }} DB_PASSWORD: {{ .Values.externalPostgres.password | b64enc | quote }} {{- else if .Values.postgresql.enabled }} - {{ with .Values.postgresql.global.postgresql.auth}} + {{ with .Values.postgresql.global.postgresql.auth }} {{- if empty .username }} DB_USERNAME: {{ print "postgres" | b64enc | quote }} DB_PASSWORD: {{ .postgresPassword | b64enc | quote }} @@ -61,7 +61,7 @@ DB_PASSWORD: {{ .password | b64enc | quote }} {{- end }} {{- define "dify.storage.credentials" -}} -{{- if .Values.externalS3.enabled}} +{{- if .Values.externalS3.enabled }} S3_ACCESS_KEY: {{ .Values.externalS3.accessKey | b64enc | quote }} S3_SECRET_KEY: {{ .Values.externalS3.secretKey | b64enc | quote }} {{- else if .Values.externalAzureBlobStorage.enabled }} @@ -70,6 +70,15 @@ AZURE_BLOB_ACCOUNT_KEY: {{ .Values.externalAzureBlobStorage.key | b64enc | quote {{- else if .Values.externalOSS.enabled }} ALIYUN_OSS_ACCESS_KEY: {{ .Values.externalOSS.accessKey | b64enc | quote }} ALIYUN_OSS_SECRET_KEY: {{ .Values.externalOSS.secretKey | b64enc | quote }} +{{- else if .Values.externalGCS.enabled }} +GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: {{ .Values.externalGCS.serviceAccountJsonBase64 | b64enc | quote }} +{{- else if .Values.externalCOS.enabled }} +TENCENT_COS_SECRET_KEY: {{ .Values.externalCOS.secretKey| b64enc | quote }} +{{- else if .Values.externalOBS.enabled }} +HUAWEI_OBS_ACCESS_KEY: {{ .Values.externalOBS.accessKey | b64enc | quote }} +HUAWEI_OBS_SECRET_KEY: {{ .Values.externalOBS.secretKey | b64enc | quote }} +{{- else if .Values.externalTOS.enabled }} +VOLCENGINE_TOS_SECRET_KEY: {{ .Values.externalTOS.secretKey | b64enc | quote }} {{- else }} {{- end }} {{- end }} @@ -93,7 +102,11 @@ REDIS_PASSWORD: {{ .auth.password | b64enc | quote }} # Use redis as the broker, and redis db 1 for celery broker. {{- if .Values.externalRedis.enabled }} {{- with .Values.externalRedis }} -CELERY_BROKER_URL: {{ printf "redis://%s:%s@%s:%v/1" .username .password .host .port | b64enc | quote }} + {{- $scheme := "redis" }} + {{- if .useSSL }} + {{- $scheme = "rediss" }} + {{- end }} +CELERY_BROKER_URL: {{ printf "%s://%s:%s@%s:%v/1" $scheme .username .password .host .port | b64enc | quote }} {{- end }} {{- else if .Values.redis.enabled }} {{- $redisHost := printf "%s-redis-master" .Release.Name -}} @@ -125,6 +138,9 @@ TENCENT_VECTOR_DB_API_KEY: {{ .Values.externalTencentVectorDB.apiKey | b64enc | {{- else if .Values.externalMyScaleDB.enabled}} MYSCALE_USER: {{ .Values.externalMyScaleDB.username | b64enc | quote }} MYSCALE_PASSWORD: {{ .Values.externalMyScaleDB.password | b64enc | quote }} +{{- else if .Values.externalTableStore.enabled}} +TABLESTORE_ACCESS_KEY_ID: {{ .Values.externalTableStore.accessKeyId | b64enc | quote }} +TABLESTORE_ACCESS_KEY_SECRET: {{ .Values.externalTableStore.accessKeySecret | b64enc | quote }} {{- else if .Values.weaviate.enabled }} # The Weaviate API key. {{- if .Values.weaviate.authentication.apikey }} @@ -150,6 +166,24 @@ API_KEY: {{ .Values.sandbox.auth.apiKey | b64enc | quote }} {{- define "dify.pluginDaemon.credentials" -}} {{ include "dify.db.credentials" . }} {{ include "dify.redis.credentials" . }} +{{ include "dify.pluginDaemon.storage.credentials" . }} SERVER_KEY: {{ .Values.pluginDaemon.auth.serverKey | b64enc | quote }} DIFY_INNER_API_KEY: {{ .Values.pluginDaemon.auth.difyApiKey | b64enc | quote }} {{- end }} + +{{- define "dify.pluginDaemon.storage.credentials" -}} +{{- if and .Values.externalS3.enabled .Values.externalS3.bucketName.pluginDaemon }} +AWS_ACCESS_KEY: {{ .Values.externalS3.accessKey | b64enc | quote }} +AWS_SECRET_KEY: {{ .Values.externalS3.secretKey | b64enc | quote }} +{{- else if and .Values.externalOSS.enabled .Values.externalOSS.bucketName.pluginDaemon }} +ALIYUN_OSS_ACCESS_KEY_SECRET: {{ .Values.externalOSS.secretKey | b64enc | quote }} +{{- else if and .Values.externalGCS.enabled .Values.externalGCS.bucketName.pluginDaemon }} +GCS_CREDENTIALS: {{ .Values.externalGCS.serviceAccountJsonBase64 | b64enc | quote }} +{{- else if and .Values.externalCOS.enabled .Values.externalCOS.bucketName.pluginDaemon }} +TENCENT_COS_SECRET_KEY: {{ .Values.externalCOS.secretKey | b64enc | quote }} +{{- else if and .Values.externalOBS.enabled .Values.externalOBS.bucketName.pluginDaemon }} +HUAWEI_OBS_SECRET_KEY: {{ .Values.externalOBS.secretKey | b64enc | quote }} +{{- else if and .Values.externalTOS.enabled .Values.externalTOS.bucketName.pluginDaemon }} +PLUGIN_VOLCENGINE_TOS_SECRET_KEY: {{ .Values.externalTOS.secretKey | b64enc | quote }} +{{- end }} +{{- end }} diff --git a/templates/plugin-daemon-deployment.yaml b/templates/plugin-daemon-deployment.yaml index 325e8f0..34c4a45 100644 --- a/templates/plugin-daemon-deployment.yaml +++ b/templates/plugin-daemon-deployment.yaml @@ -1,4 +1,13 @@ {{- if and .Values.pluginDaemon.enabled}} +{{- $usePvc := not (or + (and .Values.externalS3.enabled .Values.externalS3.bucketName.pluginDaemon) + (and .Values.externalOSS.enabled .Values.externalOSS.bucketName.pluginDaemon) + (and .Values.externalGCS.enabled .Values.externalGCS.bucketName.pluginDaemon) + (and .Values.externalCOS.enabled .Values.externalCOS.bucketName.pluginDaemon) + (and .Values.externalOBS.enabled .Values.externalOBS.bucketName.pluginDaemon) + (and .Values.externalTOS.enabled .Values.externalTOS.bucketName.pluginDaemon) +) +}} apiVersion: apps/v1 kind: Deployment metadata: @@ -20,8 +29,11 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.pluginDaemon.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} + {{- if .Values.pluginDaemon.updateStrategy }} + strategy: {{- toYaml .Values.pluginDaemon.updateStrategy | nindent 4 }} + {{- end }} template: metadata: annotations: @@ -34,11 +46,14 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.pluginDaemon.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} {{ include "dify.ud.labels" . | indent 8 }} spec: serviceAccountName: {{ include "dify.pluginDaemon.serviceAccountName" . }} + {{- if .Values.pluginDaemon.priorityClassName }} + priorityClassName: {{ .Values.pluginDaemon.priorityClassName | quote }} + {{- end }} {{- if .Values.image.pluginDaemon.pullSecrets }} imagePullSecrets: {{- range .Values.image.pluginDaemon.pullSecrets }} @@ -94,11 +109,11 @@ spec: resources: {{- toYaml .Values.pluginDaemon.resources | nindent 12 }} volumeMounts: - - name: python-config - mountPath: /root/.config/pip + {{- if $usePvc }} - name: app-data mountPath: {{ .Values.pluginDaemon.persistence.mountPath | quote }} subPath: {{ .Values.pluginDaemon.persistence.persistentVolumeClaim.subPath | default "" }} + {{- end }} {{- if and (.Values.nodeSelector) (not .Values.pluginDaemon.nodeSelector) }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} @@ -124,9 +139,9 @@ spec: {{ toYaml .Values.pluginDaemon.tolerations | indent 8 }} {{- end }} volumes: - - name: python-config - emptyDir: {} + {{- if $usePvc }} - name: app-data persistentVolumeClaim: claimName: {{ .Values.pluginDaemon.persistence.persistentVolumeClaim.existingClaim | default (printf "%s" (include "dify.pluginDaemon.fullname" . | trunc 58)) }} + {{- end }} {{- end }} diff --git a/templates/proxy-deployment.yaml b/templates/proxy-deployment.yaml index 3f6c5fb..a1f1b60 100644 --- a/templates/proxy-deployment.yaml +++ b/templates/proxy-deployment.yaml @@ -20,8 +20,11 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.nginx.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} + {{- if .Values.proxy.updateStrategy }} + strategy: {{- toYaml .Values.proxy.updateStrategy | nindent 4 }} + {{- end }} template: metadata: annotations: @@ -33,11 +36,14 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.nginx.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} {{ include "dify.ud.labels" . | indent 8 }} spec: serviceAccountName: {{ include "dify.proxy.serviceAccountName" . }} + {{- if .Values.proxy.priorityClassName }} + priorityClassName: {{ .Values.proxy.priorityClassName | quote }} + {{- end }} {{- if .Values.image.proxy.pullSecrets }} imagePullSecrets: {{- range .Values.image.proxy.pullSecrets }} diff --git a/templates/pvc.yaml b/templates/pvc.yaml index 8b673d7..63bf6d0 100644 --- a/templates/pvc.yaml +++ b/templates/pvc.yaml @@ -1,4 +1,12 @@ -{{- if not (or .Values.externalS3.enabled .Values.externalAzureBlobStorage.enabled .Values.externalOSS.enabled .Values.externalGCS.enabled .Values.externalCOS.enabled .Values.externalOBS.enabled) }} +{{- if not (or + .Values.externalS3.enabled + .Values.externalAzureBlobStorage.enabled + .Values.externalOSS.enabled + .Values.externalGCS.enabled + .Values.externalCOS.enabled + .Values.externalOBS.enabled + .Values.externalTOS.enabled + ) }} {{- $pvc := .Values.api.persistence.persistentVolumeClaim -}} {{- if (not $pvc.existingClaim) }} apiVersion: v1 @@ -92,7 +100,15 @@ spec: {{- $pvc := .Values.pluginDaemon.persistence.persistentVolumeClaim -}} {{- if and .Values.pluginDaemon.enabled (not $pvc.existingClaim) }} - +{{- if not (or + (and .Values.externalS3.enabled .Values.externalS3.bucketName.pluginDaemon) + (and .Values.externalOSS.enabled .Values.externalOSS.bucketName.pluginDaemon) + (and .Values.externalGCS.enabled .Values.externalGCS.bucketName.pluginDaemon) + (and .Values.externalCOS.enabled .Values.externalCOS.bucketName.pluginDaemon) + (and .Values.externalOBS.enabled .Values.externalOBS.bucketName.pluginDaemon) + (and .Values.externalTOS.enabled .Values.externalTOS.bucketName.pluginDaemon) +) +}} --- apiVersion: v1 @@ -119,3 +135,4 @@ spec: requests: storage: {{ $pvc.size }} {{- end }} +{{- end }} diff --git a/templates/sandbox-deployment.yaml b/templates/sandbox-deployment.yaml index 71920f0..563e486 100644 --- a/templates/sandbox-deployment.yaml +++ b/templates/sandbox-deployment.yaml @@ -20,8 +20,11 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.sandbox.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} + {{- if .Values.sandbox.updateStrategy }} + strategy: {{- toYaml .Values.sandbox.updateStrategy | nindent 4 }} + {{- end }} template: metadata: annotations: @@ -34,11 +37,14 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.sandbox.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} {{ include "dify.ud.labels" . | indent 8 }} spec: serviceAccountName: {{ include "dify.sandbox.serviceAccountName" . }} + {{- if .Values.sandbox.priorityClassName }} + priorityClassName: {{ .Values.sandbox.priorityClassName | quote }} + {{- end }} {{- if .Values.image.sandbox.pullSecrets }} imagePullSecrets: {{- range .Values.image.sandbox.pullSecrets }} @@ -95,8 +101,6 @@ spec: protocol: TCP resources: {{- toYaml .Values.sandbox.resources | nindent 12 }} - securityContext: - allowPrivilegeEscalation: {{ .Values.sandbox.privileged }} {{- if and (.Values.nodeSelector) (not .Values.sandbox.nodeSelector) }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} diff --git a/templates/ssrf-proxy-deployment.yaml b/templates/ssrf-proxy-deployment.yaml index 5c20bf3..c645a88 100644 --- a/templates/ssrf-proxy-deployment.yaml +++ b/templates/ssrf-proxy-deployment.yaml @@ -20,8 +20,11 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.ssrfProxy.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} + {{- if .Values.ssrfProxy.updateStrategy }} + strategy: {{- toYaml .Values.ssrfProxy.updateStrategy | nindent 4 }} + {{- end }} template: metadata: annotations: @@ -33,11 +36,14 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.ssrfProxy.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} {{ include "dify.ud.labels" . | indent 8 }} spec: serviceAccountName: {{ include "dify.ssrfProxy.serviceAccountName" . }} + {{- if .Values.ssrfProxy.priorityClassName }} + priorityClassName: {{ .Values.ssrfProxy.priorityClassName | quote }} + {{- end }} {{- if .Values.image.ssrfProxy.pullSecrets }} imagePullSecrets: {{- range .Values.image.ssrfProxy.pullSecrets }} @@ -85,8 +91,6 @@ spec: {{- end }} resources: {{- toYaml .Values.ssrfProxy.resources | nindent 12 }} - securityContext: - allowPrivilegeEscalation: {{ .Values.ssrfProxy.privileged }} {{- if and (.Values.nodeSelector) (not .Values.ssrfProxy.nodeSelector) }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} diff --git a/templates/web-deployment.yaml b/templates/web-deployment.yaml index d6daf32..ccd3bcb 100644 --- a/templates/web-deployment.yaml +++ b/templates/web-deployment.yaml @@ -20,8 +20,11 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.web.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} + {{- if .Values.web.updateStrategy }} + strategy: {{- toYaml .Values.web.updateStrategy | nindent 4 }} + {{- end }} template: metadata: annotations: @@ -33,11 +36,15 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.web.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} {{ include "dify.ud.labels" . | indent 8 }} spec: serviceAccountName: {{ include "dify.web.serviceAccountName" . }} + {{- if .Values.web.priorityClassName }} + priorityClassName: {{ .Values.web.priorityClassName | quote }} + {{- end }} + enableServiceLinks: {{ .Values.web.enableServiceLinks }} {{- if .Values.image.web.pullSecrets }} imagePullSecrets: {{- range .Values.image.web.pullSecrets }} @@ -98,7 +105,6 @@ spec: protocol: TCP resources: {{- toYaml .Values.web.resources | nindent 12 }} - enableServiceLinks: {{ .Values.web.enableServiceLinks }} {{- if and (.Values.nodeSelector) (not .Values.web.nodeSelector) }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} diff --git a/templates/worker-deployment.yaml b/templates/worker-deployment.yaml index 9d7ad64..659031e 100644 --- a/templates/worker-deployment.yaml +++ b/templates/worker-deployment.yaml @@ -21,8 +21,11 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.worker.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} + {{- if .Values.worker.updateStrategy }} + strategy: {{- toYaml .Values.worker.updateStrategy | nindent 4 }} + {{- end }} template: metadata: annotations: @@ -35,11 +38,14 @@ spec: {{/* # Required labels for istio # app: {{ template "dify.worker.fullname" . }} - # version: {{ (print "v" .Values.serviceMesh.version) | quote }} + # version: {{ .Values.istioServiceMesh.version | quote }} */}} {{ include "dify.ud.labels" . | indent 8 }} spec: serviceAccountName: {{ include "dify.worker.serviceAccountName" . }} + {{- if .Values.worker.priorityClassName }} + priorityClassName: {{ .Values.worker.priorityClassName | quote }} + {{- end }} {{- if .Values.image.api.pullSecrets }} imagePullSecrets: {{- range .Values.image.api.pullSecrets }} @@ -59,6 +65,23 @@ spec: volumeMounts: - name: python-config mountPath: /root/.config/pip + {{- if .Values.api.migration }} + - name: check-api + image: "{{ .Values.image.api.repository }}:{{ default .Chart.AppVersion .Values.image.api.tag }}" + command: + - sh + - -c + - | + until curl http://{{ template "dify.api.fullname" . }}:{{ .Values.api.service.port }}/health; do + echo "Waiting for API service to be available..." + sleep 1 + done + envFrom: + - configMapRef: + name: {{ template "dify.worker.fullname" . }} + - secretRef: + name: {{ template "dify.worker.fullname" . }} + {{- end }} containers: - image: "{{ .Values.image.api.repository }}:{{ default .Chart.AppVersion .Values.image.api.tag }}" imagePullPolicy: "{{ .Values.image.api.pullPolicy }}" diff --git a/values.yaml b/values.yaml index 2af7be3..32636a9 100644 --- a/values.yaml +++ b/values.yaml @@ -5,7 +5,7 @@ image: api: repository: langgenius/dify-api - tag: "1.1.2" + tag: "1.7.1" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -13,9 +13,10 @@ image: ## # pullSecrets: # - myRegistryKeySecretName + web: repository: langgenius/dify-web - tag: "1.1.2" + tag: "1.7.1" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -23,9 +24,10 @@ image: ## # pullSecrets: # - myRegistryKeySecretName + sandbox: repository: langgenius/dify-sandbox - tag: "0.2.10" + tag: "0.2.12" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -33,6 +35,7 @@ image: ## # pullSecrets: # - myRegistryKeySecretName + proxy: repository: nginx tag: latest @@ -57,7 +60,7 @@ image: pluginDaemon: repository: langgenius/dify-plugin-daemon - tag: 0.0.6-local + tag: 0.2.0-local pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -65,6 +68,7 @@ image: ## # pullSecrets: # - myRegistryKeySecretName + python: repository: python tag: 3.12-slim @@ -83,6 +87,7 @@ api: nodeSelector: {} affinity: {} tolerations: [] + priorityClassName: "" autoscaling: enabled: false minReplicas: 1 @@ -115,6 +120,9 @@ api: timeoutSeconds: 5 failureThreshold: 5 successThreshold: 1 + ## @param api.updateStrategy Update strategy type and configuration parameters + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + updateStrategy: {} ## @param api.customLivenessProbe Custom livenessProbe that overrides the default one customLivenessProbe: {} ## @param api.customReadinessProbe Custom readinessProbe that overrides the default one @@ -251,6 +259,7 @@ worker: nodeSelector: {} affinity: {} tolerations: [] + priorityClassName: "" autoscaling: enabled: false minReplicas: 1 @@ -265,6 +274,9 @@ worker: customReadinessProbe: {} ## @param worker.customStartupProbe Custom startupProbe that overrides the default one customStartupProbe: {} + ## @param worker.updateStrategy Update strategy type and configuration parameters + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + updateStrategy: {} # Configure Pods Security Context podSecurityContext: {} # Configure Container Security Context @@ -307,6 +319,7 @@ proxy: nodeSelector: {} affinity: {} tolerations: [] + priorityClassName: "" ## Configure extra options for proxy containers' liveness, readiness, and startup probes ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes ## @param proxy.customLivenessProbe Custom livenessProbe that overrides the default one @@ -317,6 +330,9 @@ proxy: customStartupProbe: {} ## @param proxy.clientMaxBodySize Custom client_max_body_size param nginx default: 15m clientMaxBodySize: "" + ## @param proxy.updateStrategy Update strategy type and configuration parameters + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + updateStrategy: {} # Configure Pods Security Context podSecurityContext: {} # Configure Container Security Context @@ -376,6 +392,7 @@ web: nodeSelector: {} affinity: {} tolerations: [] + priorityClassName: "" autoscaling: enabled: false minReplicas: 1 @@ -408,6 +425,9 @@ web: timeoutSeconds: 5 failureThreshold: 5 successThreshold: 1 + ## @param web.updateStrategy Update strategy type and configuration parameters + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + updateStrategy: {} ## @param web.customLivenessProbe Custom livenessProbe that overrides the default one customLivenessProbe: {} ## @param web.customReadinessProbe Custom readinessProbe that overrides the default one @@ -454,6 +474,7 @@ sandbox: nodeSelector: {} affinity: {} tolerations: [] + priorityClassName: "" autoscaling: enabled: false minReplicas: 1 @@ -486,6 +507,9 @@ sandbox: timeoutSeconds: 5 failureThreshold: 2 successThreshold: 1 + ## @param sandbox.updateStrategy Update strategy type and configuration parameters + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + updateStrategy: {} ## @param sandbox.customLivenessProbe Custom livenessProbe that overrides the default one customLivenessProbe: {} ## @param sandbox.customReadinessProbe Custom readinessProbe that overrides the default one @@ -509,7 +533,6 @@ sandbox: clusterIP: "" auth: apiKey: "dify-sandbox" - privileged: false ## Sandbox ServiceAccount configuration ## serviceAccount: @@ -534,6 +557,7 @@ ssrfProxy: nodeSelector: {} affinity: {} tolerations: [] + priorityClassName: "" ## Configure extra options for ssrf proxy containers' liveness, readiness, and startup probes ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes ## @param ssrfProxy.customLivenessProbe Custom livenessProbe that overrides the default one @@ -542,6 +566,9 @@ ssrfProxy: customReadinessProbe: {} ## @param ssrfProxy.customStartupProbe Custom startupProbe that overrides the default one customStartupProbe: {} + ## @param ssrfProxy.updateStrategy Update strategy type and configuration parameters + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + updateStrategy: {} # Configure Pods Security Context podSecurityContext: {} # Configure Container Security Context @@ -601,6 +628,7 @@ pluginDaemon: nodeSelector: {} affinity: {} tolerations: [] + priorityClassName: "" ## Configure extra options for plugin daemon containers' liveness, readiness, and startup probes ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes ## @param pluginDaemon.customLivenessProbe Custom livenessProbe that overrides the default one @@ -609,6 +637,9 @@ pluginDaemon: customReadinessProbe: {} ## @param pluginDaemon.customStartupProbe Custom startupProbe that overrides the default one customStartupProbe: {} + ## @param pluginDaemon.updateStrategy Update strategy type and configuration parameters + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + updateStrategy: {} # Configure Pods Security Context podSecurityContext: {} # Configure Container Security Context @@ -630,6 +661,9 @@ pluginDaemon: serverKey: "lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi" # A separate key for interactions between `api`(`worker`) and `pluginDaemon` difyApiKey: "QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1" + ## Storage for `pluginDaemon` + ## Ignored if external object storage were configured via `.Values.externalS3` sections. + ## persistence: mountPath: "/app/storage" annotations: @@ -2996,13 +3030,16 @@ externalPostgres: externalS3: enabled: false endpoint: "https://xxx.r2.cloudflarestorage.com" + pathStyle: false accessKey: "ak-difyai" secretKey: "sk-difyai" useSSL: false - bucketName: "difyai" - rootPath: "" + bucketName: + # Shared storage for `api` and `worker` + api: "difyai" + # If specifed, `pluginDaemon` will use this bucket instead of binding `PersistentVolume` for data persistence (only used when `externalS3.enabled` is set to `true`). + pluginDaemon: useIAM: false - iamEndpoint: "" region: "us-east-1" ################################### @@ -3026,7 +3063,10 @@ externalOSS: accessKey: "ak-difyai" secretKey: "sk-difyai" region: "ap-southeast-1" - bucketName: "difyai" + bucketName: + api: "difyai" + # If specifed, `pluginDaemon` will use this bucket instead of binding `PersistentVolume` for data persistence (only used when `externalOSS.enabled` is set to `true`). + pluginDaemon: authVersion: v4 path: "your-path" @@ -3036,7 +3076,10 @@ externalOSS: ################################### externalGCS: enabled: false - bucketName: "difyai" + bucketName: + api: "difyai" + # If specifed, `pluginDaemon` will use this bucket instead of binding `PersistentVolume` for data persistence (only used when `externalGCS.enabled` is set to `true`). + pluginDaemon: serviceAccountJsonBase64: "" ################################### @@ -3048,7 +3091,10 @@ externalCOS: secretKey: "your-secret-key" secretId: "your-secret-id" region: "your-region" - bucketName: "your-bucket-name" + bucketName: + api: "your-bucket-name" + # If specifed, `pluginDaemon` will use this bucket instead of binding `PersistentVolume` for data persistence (only used when `externalCOS.enabled` is set to `true`). + pluginDaemon: scheme: "your-scheme" ################################### @@ -3057,10 +3103,29 @@ externalCOS: ################################### externalOBS: enabled: false + endpoint: "https://your-endpoint" + accessKey: "your-secret-id" secretKey: "your-secret-key" - secretId: "your-secret-id" - bucketName: "your-bucket-name" - server: "your-server" + bucketName: + api: "your-bucket-name" + # If specifed, `pluginDaemon` will use this bucket instead of binding `PersistentVolume` for data persistence (only used when `externalOBS.enabled` is set to `true`). + pluginDaemon: + +################################### +# External Tinder Object Storage (TOS) from volcengine +# - these configs are only used when `externalS3.enabled` and `externalAzureBlobStorage.enabled` and `externalOSS.enabled` and `externalGCS.enabled` and `externalCOS.enabled` and `externalOBS.enabled` are false and `externalTOS.enabled` is true +################################### +externalTOS: + enabled: false + endpoint: "https://tos-cn-beijing.volces.com" + accessKey: "your-access-key" + secretKey: "your-secret-key" + bucketName: + # Shared storage for `api` and `worker` + api: "your-bucket-name" + # If specifed, `pluginDaemon` will use this bucket instead of binding `PersistentVolume` for data persistence (only used when `externalTOS.enabled` is set to `true`). + pluginDaemon: + region: "cn-beijing" ################################### # External Redis @@ -3133,3 +3198,27 @@ externalTencentVectorDB: database: "dify" shard: 1 replicas: 2 + +################################### +# External MyScaleDB Vector DB +# - these configs take effect only if both `externalWeaviate.enabled`, `externalQdrant.enabled` and `externalMilvus.enabled` and `externalPgvector.enabled` and `externalTencentVectorDB.enabled` are set as `false` and `externalMyScaleDB.enabled` is `true` +################################### +externalMyScaleDB: + enabled: false + host: "myscale" + port: 8123 + user: "default" + password: "" + database: "dify" + ftsParams: "" + +################################### +# External TableStore Vector DB +# - these configs take effect only if both `externalWeaviate.enabled`, `externalQdrant.enabled` and `externalMilvus.enabled` and `externalPgvector.enabled` and `externalTencentVectorDB.enabled` and `externalMyScaleDB.enabled` are set as `false` and `externalTableStore.enabled` is `true` +################################### +externalTableStore: + enabled: false + endpoint: "endpoint" + instanceName: "instance-name" + accessKeyId: "your-secret-id" + accessKeySecret: "your-secret-key"