Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 0.6.11 #84

Merged
merged 74 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
dcba847
Add Release chart action & bump chart version (#3)
BorisPolonsky Jun 17, 2023
049ae01
Add installation guide (#4)
BorisPolonsky Jun 17, 2023
f00bbc8
Fix env clash (#9)
BorisPolonsky Jul 11, 2023
65b1cd5
Bump chart version to 0.14.1
BorisPolonsky Jul 12, 2023
6f59753
Merge branch 'master' into dev
BorisPolonsky Jul 12, 2023
a1f5757
Fix label in worker deployment (#12)
BorisPolonsky Jul 21, 2023
06650f7
Bump chart version to 0.15.0
BorisPolonsky Jul 21, 2023
4a978f7
Merge branch 'master' into dev
BorisPolonsky Jul 21, 2023
b37eef6
0.3.8 compatibility for core components (#14)
BorisPolonsky Jul 28, 2023
f56cd26
Bump chart version to 0.16.0
BorisPolonsky Jul 28, 2023
3574e70
Merge branch 'master' into dev
BorisPolonsky Aug 23, 2023
9ad4ff8
Fix postgres port and database config (#18)
BorisPolonsky Nov 13, 2023
98e8c30
Update Chart.yaml
BorisPolonsky Nov 13, 2023
80122f3
Merge branch 'master' into dev
BorisPolonsky Nov 13, 2023
ba8bb4f
Update README.md
BorisPolonsky Nov 30, 2023
0bc36e2
Create LICENSE
BorisPolonsky Jan 6, 2024
9bd0cbd
Update README.md
BorisPolonsky Jan 18, 2024
fabed9e
Merge branch 'master' into dev
BorisPolonsky Jan 23, 2024
24a7f7e
Update README.md
BorisPolonsky Jan 23, 2024
cb84604
Merge branch 'master' into dev
BorisPolonsky Jan 23, 2024
a4817b1
Dify 0.4.9 support (#28)
BorisPolonsky Jan 26, 2024
490419b
Bump appVersion to 0.4.9
BorisPolonsky Jan 27, 2024
4d13074
Update README.md (#31)
BorisPolonsky Jan 27, 2024
cbcf4fe
Revert "Update README.md" (#32)
BorisPolonsky Jan 27, 2024
6788c23
Display contributors (#33)
BorisPolonsky Jan 27, 2024
799266b
Merge branch 'master' into dev
BorisPolonsky Jan 27, 2024
7043a19
Update release condition
BorisPolonsky Jan 27, 2024
69df873
Update values.yaml
BorisPolonsky Jan 29, 2024
15e013e
Update values.yaml
BorisPolonsky Jan 29, 2024
4dc5224
Fix ConfigMap error when `.Values.externalMilvus.enable=true`
BorisPolonsky Mar 4, 2024
8585c95
Fix nginx duplicate location: "/files"
BorisPolonsky Mar 4, 2024
0383f12
Bump Chart version to 0.17.1
BorisPolonsky Mar 4, 2024
27f56c4
Optimize extraEnv configuration
BorisPolonsky Mar 5, 2024
8761f8f
Merge branch 'master' into dev
BorisPolonsky Mar 11, 2024
37c80fc
Bump Chart Version to 0.17.2
BorisPolonsky Mar 11, 2024
497c503
Change chart version to 0.17.2-rc1
BorisPolonsky Mar 11, 2024
f98045a
Bump chart version to 0.17.2
BorisPolonsky Mar 11, 2024
3c71886
Merge branch 'master' into dev
BorisPolonsky Mar 11, 2024
9a93326
add quote to QDRANT_CLIENT_TIMEOUT/consoleApi/appApi #45
kaktos Mar 22, 2024
dccbb8a
Rename port in service as name: `<protocol>[-<suffix>]` format and ma…
BorisPolonsky Mar 12, 2024
edd996d
Merge branch 'master' into dev
BorisPolonsky Mar 22, 2024
18ab9e8
Bump Chart version to 0.18.0
BorisPolonsky Mar 22, 2024
1c5a15e
Update comment
BorisPolonsky Mar 23, 2024
56ac228
Merge branch 'master' into dev
BorisPolonsky Apr 13, 2024
07b6773
0.5.11 compatiblity update
BorisPolonsky Apr 13, 2024
cb694b7
Update PVC definition logic in `api` and `worker`
BorisPolonsky Apr 13, 2024
7620823
Update comment on custom environment variables
BorisPolonsky Apr 13, 2024
dbc1c62
Fix log level definition in `worker`
BorisPolonsky Apr 13, 2024
62a45bf
Merge branch 'master' into dev
BorisPolonsky Apr 13, 2024
360d649
Merge branch 'master' into dev
BorisPolonsky Apr 14, 2024
ab98138
Merge branch 'master' into dev
BorisPolonsky Apr 17, 2024
3e9841a
Dify 0.6.3 compatibility (WIP)
BorisPolonsky Apr 17, 2024
6033031
Update indentation of `envFrom` in `web`, `worker` and `api`
BorisPolonsky Apr 18, 2024
0078689
Corrected port config and remove redundant template in deployment `sa…
BorisPolonsky Apr 18, 2024
a47ab33
Fix incorrect variable type in `config.tpl`
BorisPolonsky Apr 18, 2024
f98c778
Fix value reference in credentials.tpl
BorisPolonsky Apr 18, 2024
4a2fc1f
Add secret for `sandbox`
BorisPolonsky Apr 18, 2024
a3ffd74
Removed existingSecret related config in section `sandbox` in `values…
BorisPolonsky Apr 18, 2024
ee746f6
Rename template
BorisPolonsky Apr 19, 2024
ff4260d
Add and mount secret for `api` and `worker`
BorisPolonsky Apr 19, 2024
9e4c3e9
Removed credentials from configmap
BorisPolonsky Apr 19, 2024
2f95b62
Removed hard-coded config for sandbox in `config.tpl`
BorisPolonsky Apr 19, 2024
579b445
Merge branch 'master' into dev
BorisPolonsky Apr 19, 2024
e53b1aa
Fix typo and correct priviledge escalation config for sandbox
BorisPolonsky Apr 19, 2024
2f1e44f
Corrected `appVersion`
BorisPolonsky Apr 19, 2024
399e01a
Corrected typo
BorisPolonsky Apr 19, 2024
f41dcc2
Merge branch 'master' into dev
BorisPolonsky Jun 5, 2024
44307a5
Support Aliyun OSS (#74)
denverdino Jun 6, 2024
6985f7c
Fix sandbox API_KEY
BorisPolonsky Jun 18, 2024
44cef64
Merge branch 'master' into dev: Update config.tpl
BorisPolonsky Jul 1, 2024
525140e
add external pgvector (#79)
FingerLiu Jul 2, 2024
0826fbc
Dify 0.6.11 compatibility update (#81)
BorisPolonsky Jul 3, 2024
c0971eb
Update order of object storage types in `values.yaml`
BorisPolonsky Aug 1, 2024
0a944f3
Update order of vector db in `values.yaml`
BorisPolonsky Aug 1, 2024
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ helm install my-release dify/dify
- [x] object storage
- [x] weaviate
- [x] qdrant
- [X] milvus
- [x] milvus
- [x] pgvector

## Contributors
<a href="https://github.com/borispolonsky/dify-helm/graphs/contributors">
Expand Down
8 changes: 8 additions & 0 deletions charts/dify/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{ template "dify.fullname" . }}-sandbox
{{- end -}}

{{/*
Create a default fully qualified web name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "dify.ssrfProxy.fullname" -}}
{{ template "dify.fullname" . }}-ssrf-proxy
{{- end -}}

{{/*
Create a default fully qualified nginx name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
Expand Down
9 changes: 8 additions & 1 deletion charts/dify/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and .Values.api.enabled}}
{{- $usePvc := not (or .Values.externalS3.enabled .Values.externalAzureBlobStorage.enabled) -}}
{{- $usePvc := not (or .Values.externalS3.enabled .Values.externalOSS.enabled .Values.externalAzureBlobStorage.enabled) -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -55,6 +55,13 @@ spec:
imagePullPolicy: "{{ .Values.image.api.pullPolicy }}"
name: api
env:
{{- if .Values.sandbox.enabled }}
- name: CODE_EXECUTION_API_KEY
valueFrom:
secretKeyRef:
name: {{ template "dify.sandbox.fullname" . }}
key: "API_KEY"
{{- end }}
{{- if .Values.api.extraEnv }}
{{- toYaml .Values.api.extraEnv | nindent 8 }}
{{- end }}
Expand Down
109 changes: 102 additions & 7 deletions charts/dify/templates/config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ SENTRY_DSN: ''
SENTRY_TRACES_SAMPLE_RATE: "1.0"
# The sample rate for Sentry profiles. Default: `1.0`
SENTRY_PROFILES_SAMPLE_RATE: "1.0"
{{ include "dify.sandbox.config" . }}

{{- if .Values.sandbox.enabled }}
CODE_EXECUTION_ENDPOINT: http://{{ template "dify.sandbox.fullname" .}}:{{ .Values.sandbox.service.port }}
{{- end }}

{{- if .Values.ssrfProxy.enabled }}
SSRF_PROXY_HTTP_URL: http://{{ template "dify.ssrfProxy.fullname" .}}:{{ .Values.ssrfProxy.service.port }}
SSRF_PROXY_HTTPS_URL: http://{{ template "dify.ssrfProxy.fullname" .}}:{{ .Values.ssrfProxy.service.port }}
{{- end }}
{{- end }}

{{- define "dify.worker.config" -}}
Expand Down Expand Up @@ -139,7 +147,7 @@ DB_DATABASE: {{ .Values.postgresql.global.postgresql.auth.database }}

{{- define "dify.storage.config" -}}
{{- if .Values.externalS3.enabled }}
# The type of storage to use for storing user files. Supported values are `local` and `s3` and `azure-blob`, Default: `local`
# The type of storage to use for storing user files. Supported values are `local`, `s3`, `azure-blob` and `aliyun-oss`, Default: `local`
STORAGE_TYPE: s3
# The S3 storage configurations, only available when STORAGE_TYPE is `s3`.
S3_ENDPOINT: {{ .Values.externalS3.endpoint }}
Expand All @@ -148,13 +156,23 @@ S3_BUCKET_NAME: {{ .Values.externalS3.bucketName }}
# S3_SECRET_KEY: {{ .Values.externalS3.secretKey }}
S3_REGION: 'us-east-1'
{{- else if .Values.externalAzureBlobStorage.enabled }}
# The type of storage to use for storing user files. Supported values are `local`, `s3`, `azure-blob` and `aliyun-oss`, Default: `local`
STORAGE_TYPE: azure-blob
# The type of storage to use for storing user files. Supported values are `local` and `s3` and `azure-blob`, Default: `local`
# The Azure Blob storage configurations, only available when STORAGE_TYPE is `azure-blob`.
AZURE_BLOB_ACCOUNT_NAME: {{ .Values.externalAzureBlobStorage.account | quote }}
# AZURE_BLOB_ACCOUNT_KEY: {{ .Values.externalAzureBlobStorage.key | quote }}
AZURE_BLOB_CONTAINER_NAME: {{ .Values.externalAzureBlobStorage.container | quote }}
AZURE_BLOB_ACCOUNT_URL: {{ .Values.externalAzureBlobStorage.url | quote }}
{{- else if .Values.externalOSS.enabled }}
# The type of storage to use for storing user files. Supported values are `local`, `s3`, `azure-blob` and `aliyun-oss`, Default: `local`
STORAGE_TYPE: aliyun-oss
# The OSS storage configurations, only available when STORAGE_TYPE is `aliyun-oss`.
ALIYUN_OSS_ENDPOINT: {{ .Values.externalOSS.endpoint }}
ALIYUN_OSS_BUCKET_NAME: {{ .Values.externalOSS.bucketName }}
# ALIYUN_OSS_ACCESS_KEY: {{ .Values.externalOSS.accessKey }}
# ALIYUN_OSS_SECRET_KEY: {{ .Values.externalOSS.secretKey }}
ALIYUN_OSS_REGION: {{ .Values.externalOSS.region }}
ALIYUN_OSS_AUTH_VERSION: {{ .Values.externalOSS.authVersion }}
{{- 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
Expand Down Expand Up @@ -217,8 +235,12 @@ VECTOR_STORE: qdrant
QDRANT_URL: {{ .Values.externalQdrant.endpoint }}
# The Qdrant API key.
# QDRANT_API_KEY: {{ .Values.externalQdrant.apiKey }}
# The Qdrant client timeout setting.
QDRANT_CLIENT_TIMEOUT: "20"
# The Qdrant clinet timeout setting.
QDRANT_CLIENT_TIMEOUT: {{ .Values.externalQdrant.timeout | quote }}
# The Qdrant client enable gRPC mode.
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}}
# Milvus configuration Only available when VECTOR_STORE is `milvus`.
Expand All @@ -233,6 +255,14 @@ MILVUS_PORT: {{ .Values.externalMilvus.port | toString | quote }}
# 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
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.weaviate.enabled }}
# The type of vector store to use. Supported values are `weaviate`, `qdrant`, `milvus`.
VECTOR_STORE: weaviate
Expand Down Expand Up @@ -268,12 +298,18 @@ SMTP_SERVER: {{ .Values.api.mail.smtp.server | quote }}
SMTP_PORT: {{ .Values.api.mail.smtp.port | quote }}
# SMTP_USERNAME: {{ .Values.api.mail.smtp.username | quote }}
# SMTP_PASSWORD: {{ .Values.api.mail.smtp.password | quote }}
SMTP_USE_TLS: {{ .Values.api.mail.smtp.useTLS | toString | quote }}
SMTP_USE_TLS: {{ .Values.api.mail.smtp.tls.enabled | toString | quote }}
SMTP_OPPORTUNISTIC_TLS: {{ .Values.api.mail.smtp.tls.optimistic | toString | quote }}
{{- end }}
{{- end }}

{{- define "dify.sandbox.config" -}}
CODE_EXECUTION_ENDPOINT: http://{{ template "dify.sandbox.fullname" .}}:{{ .Values.sandbox.service.port }}
GIN_MODE: release
SANDBOX_PORT: '8194'
{{- if .Values.ssrfProxy.enabled }}
HTTP_PROXY: http://{{ template "dify.ssrfProxy.fullname" .}}:{{ .Values.ssrfProxy.service.port }}
HTTPS_PROXY: http://{{ template "dify.ssrfProxy.fullname" .}}:{{ .Values.ssrfProxy.service.port }}
{{- end }}
{{- end }}

{{- define "dify.nginx.config.proxy" }}
Expand Down Expand Up @@ -356,3 +392,62 @@ server {
}
}
{{- end }}

{{- define "dify.ssrfProxy.config.squid" }}
acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localhost
include /etc/squid/conf.d/*.conf
http_access deny all

################################## Proxy Server ################################
http_port 3128
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
refresh_pattern . 0 20% 4320

# upstream proxy, set to your own upstream proxy IP to avoid SSRF attacks
# cache_peer 172.1.1.1 parent 3128 0 no-query no-digest no-netdb-exchange default


################################## Reverse Proxy To Sandbox ################################
http_port {{ .Values.sandbox.service.port }} accel vhost
cache_peer {{ template "dify.sandbox.fullname" .}} parent {{ .Values.sandbox.service.port }} 0 no-query originserver
acl src_all src all
http_access allow src_all

{{/*Dump logs to stdout only when log persistence is not enabled*/}}
{{- if not .Values.ssrfProxy.log.persistence.enabled }}
cache_log none
access_log none
cache_store_log none
{{- end }}
{{- end }}
24 changes: 12 additions & 12 deletions charts/dify/templates/credentials.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{{- define "dify.api.credentials" -}}
# 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 | b64enc | quote }}
{{- if .Values.sandbox.enabled }}
CODE_EXECUTION_API_KEY: {{ .Values.sandbox.auth.apiKey | b64enc | quote }}
{{- end }}
{{- include "dify.db.credentials" . }}
# The configurations of redis connection.
# It is consistent with the configuration in the 'redis' service below.
Expand Down Expand Up @@ -56,6 +59,9 @@ S3_SECRET_KEY: {{ .Values.externalS3.secretKey | b64enc | quote }}
{{- else if .Values.externalAzureBlobStorage.enabled }}
# The Azure Blob storage configurations, only available when STORAGE_TYPE is `azure-blob`.
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 }}
{{- end }}
{{- end }}
Expand Down Expand Up @@ -98,6 +104,10 @@ QDRANT_API_KEY: {{ .Values.externalQdrant.apiKey | b64enc | quote }}
MILVUS_USER: {{ .Values.externalMilvus.user | b64enc | quote }}
# The milvus password.
MILVUS_PASSWORD: {{ .Values.externalMilvus.password | b64enc | quote }}
{{- else if .Values.externalPgvector.enabled}}
PGVECTOR_USER: {{ .Values.externalPgvector.username | b64enc | quote }}
# The pgvector password.
PGVECTOR_PASSWORD: {{ .Values.externalPgvector.password | b64enc | quote }}
{{- else if .Values.weaviate.enabled }}
# The Weaviate API key.
{{- if .Values.weaviate.authentication.apikey }}
Expand All @@ -117,15 +127,5 @@ SMTP_PASSWORD: {{ .Values.api.mail.smtp.password | b64enc | quote }}
{{- end }}

{{- define "dify.sandbox.credentials" -}}
CODE_EXECUTION_API_KEY: {{ .Values.sandbox.auth.apiKey | b64enc | quote }}
{{- end }}

{{- define "dify.sandbox.secretPasswordKey" -}}
{{- if and .Values.sandbox.enabled .Values.sandbox.auth.existingSecret }}
{{- .Values.sandbox.auth.existingSecretAuthKey | printf "%s" }}
{{- else if and (not .Values.sandbox.enabled) .Values.externalSandbox.existingSecret }}
{{- .Values.externalSandbox.existingSecretAuthKey | printf "%s" }}
{{- else -}}
{{- printf "CODE_EXECUTION_API_KEY" }}
{{- end -}}
{{- end -}}
API_KEY: {{ .Values.sandbox.auth.apiKey | b64enc | quote }}
{{- end }}
33 changes: 32 additions & 1 deletion charts/dify/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not .Values.externalS3.enabled }}
{{- if not (or .Values.externalS3.enabled .Values.externalAzureBlobStorage.enabled .Values.externalOSS.enabled) }}
{{- $pvc := .Values.api.persistence.persistentVolumeClaim -}}
{{- if (not $pvc.existingClaim) }}
apiVersion: v1
Expand Down Expand Up @@ -57,3 +57,34 @@ spec:
requests:
storage: {{ $pvc.size }}
{{- end }}


{{- $pvc := .Values.ssrfProxy.log.persistence.persistentVolumeClaim -}}
{{- if and .Values.ssrfProxy.log.persistence.enabled (not $pvc.existingClaim) }}

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ printf "%s-logs" (include "dify.ssrfProxy.fullname" . | trunc 58)}}
{{- with .Values.ssrfProxy.log.persistence.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
labels:
{{ include "dify.labels" . | indent 4 }}
spec:
accessModes:
- {{ $pvc.accessModes | quote }}
{{- if $pvc.storageClass }}
{{- if eq "-" $pvc.storageClass }}
storageClassName: ""
{{- else }}
storageClassName: {{ $pvc.storageClass }}
{{- end }}
{{- end }}
resources:
requests:
storage: {{ $pvc.size }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/dify/templates/sandbox-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "dify.sandbox.fullname" . }}
data:
{{- include "dify.sandbox.config" . | nindent 2 }}
2 changes: 2 additions & 0 deletions charts/dify/templates/sandbox-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ spec:
{{- toYaml .Values.sandbox.extraEnv | nindent 8 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ template "dify.sandbox.fullname" . }}
- secretRef:
name: {{ template "dify.sandbox.fullname" . }}
ports:
Expand Down
2 changes: 2 additions & 0 deletions charts/dify/templates/sandbox-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{- if .Values.sandbox.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "dify.sandbox.fullname" . }}
type: Opaque
data:
{{- include "dify.sandbox.credentials" . | nindent 2 }}
{{- end }}
9 changes: 9 additions & 0 deletions charts/dify/templates/ssrf-proxy-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- if .Values.ssrfProxy.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "dify.ssrfProxy.fullname" . }}
data:
squid.conf: |-
{{- include "dify.ssrfProxy.config.squid" . | indent 4 }}
{{- end }}
Loading