From 33407ba175a0f496af5059e1f123d9784dcfc9c2 Mon Sep 17 00:00:00 2001 From: majian159 <46617237@qq.com> Date: Tue, 14 May 2024 14:38:09 +0800 Subject: [PATCH] 1. Upgrade dify version to 0.6.8 2. Change default tag for sandbox to 0.2.0, latest does not point to the newest version 3. Use configmap to mount sandbox's python-requirements.txt 4. Update chart version to 0.3.5 --- charts/dify/Chart.yaml | 4 ++-- charts/dify/templates/configmap.yaml | 8 ++++++++ charts/dify/templates/deployment.yaml | 7 +++++++ charts/dify/values.yaml | 7 ++++++- 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 charts/dify/templates/configmap.yaml diff --git a/charts/dify/Chart.yaml b/charts/dify/Chart.yaml index 8bc8ced..b720a7e 100644 --- a/charts/dify/Chart.yaml +++ b/charts/dify/Chart.yaml @@ -20,13 +20,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.4 +version: 0.3.5 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.6.3" +appVersion: "0.6.8" dependencies: - name: redis diff --git a/charts/dify/templates/configmap.yaml b/charts/dify/templates/configmap.yaml new file mode 100644 index 0000000..0ce543a --- /dev/null +++ b/charts/dify/templates/configmap.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "dify.fullname" . }}-sandbox-config +data: + python-requirements.txt: | +{{ .Values.sandbox.config.python_requirements | indent 4 }} \ No newline at end of file diff --git a/charts/dify/templates/deployment.yaml b/charts/dify/templates/deployment.yaml index 245e747..7660014 100644 --- a/charts/dify/templates/deployment.yaml +++ b/charts/dify/templates/deployment.yaml @@ -315,6 +315,9 @@ spec: value: {{ .Values.sandbox.apiKey | quote }} {{- else }} {{- end }} + volumeMounts: + - name: config-volume + mountPath: /dependencies ports: - name: http containerPort: {{ .Values.sandbox.containerPort }} @@ -341,3 +344,7 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + volumes: + - name: config-volume + configMap: + name: {{ include "dify.fullname" . }}-sandbox-config diff --git a/charts/dify/values.yaml b/charts/dify/values.yaml index 2179eaa..299e6e3 100644 --- a/charts/dify/values.yaml +++ b/charts/dify/values.yaml @@ -292,7 +292,12 @@ sandbox: repository: langgenius/dify-sandbox pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "" + tag: "0.2.0" + config: + # python_requirements: | + # numpy==1.20.3 + # scipy==1.6.3 + python_requirements: "" envs: - name: GIN_MODE