-
Notifications
You must be signed in to change notification settings - Fork 41
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
支持dify 1.1及以上版本,修改版本号为1.1.0 #108
base: master
Are you sure you want to change the base?
Conversation
charts/dify/values.yaml
Outdated
- name: SERVER_KEY | ||
value: "lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该键值需要同样写进其他服务, 如 worker, 建议提供统一配置方式, 比如统一的 plaintext, 或统一引用 secret key
charts/dify/values.yaml
Outdated
- name: DIFY_INNER_API_KEY | ||
value: "QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
和 SERVER_KEY
相同, 需要在其他位置渲染
- Introduce conditional logic in PVC, Deployment, and Service templates to handle embedded plugin daemon. - Update values.yaml to include new environment variables and configuration options for the plugin daemon. - Ensure proper handling of environment variables for the plugin daemon in the deployment configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢修改, 另外还请 bump version
charts/dify/values.yaml
Outdated
- name: SERVER_KEY | ||
value: "lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi" | ||
- name: PLUGIN_DAEMON_KEY | ||
value: "lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi" | ||
- name: DIFY_INNER_API_KEY | ||
value: "QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请参照 sandbox.apiKey
和 sandbox.apiKeySecret
的实现方式进行实现 , 参考 https://github.com/douban/charts/blob/4642a9f68e1fac36d3018f45eb82234573735c75/charts/dify/values.yaml#L303C1-L307C19 此处的实现需要用户重复写一个key, 且需要用户来保证这两个环境变量完全相同
…ronment variable handling for API keys - Change condition from `pluginDaemon.embedded` to `pluginDaemon.enabled` in PVC and Service templates. - Introduce environment variable `PLUGIN_DAEMON_KEY` in Deployment templates, supporting both secret reference and direct value. - Update `values.yaml` to reflect changes in plugin daemon configuration, including enabling the daemon and specifying API keys. - Increment chart version to 0.5.2 and app version to 0.6.12.
charts/dify/Chart.yaml
Outdated
|
||
# 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.11" | ||
appVersion: "0.6.12" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appversion 请bump 至 dify 最新版
charts/dify/Chart.yaml
Outdated
@@ -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.5.1 | |||
version: 0.5.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
新version选 0.6.0 因为提供了新功能
charts/dify/values.yaml
Outdated
replicaCount: 1 | ||
# please change to avoid abuse 对应官方配置 SERVER_KEY PLUGIN_DAEMON_KEY | ||
apiKey: "lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/search?q=repo%3Alanggenius%2Fdify+PLUGIN_DIFY_INNER_API_KEY&type=code
PLUGIN_DIFY_INNER_API_KEY 同样需要在worker/api 等区域进行注入,并且环境变量名字不同,请设计不同的名字防止混淆
{{- else if .Values.pluginDaemon.apiKey }} | ||
value: {{ .Values.pluginDaemon.apiKey | quote }} | ||
{{- else }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处代码和上面一处重复,如果需要同时在dify api 和 dify worker 内注入,请修改 dify.commonBackendEnvs 来尽可能进行代码复用
I'm missing some required env. For me, REDIS_PORT was required on plugin daemon, also the plugin daemon url needs to be added to api and probably worker. |
@notz thanks for your suggestion, this pr is still WIP and currently I have no time to test it for real, definitely will do a real install test before it's merged. Any kind of help would be appriciated, including drafting a brand new pull request. |
This commit refactors the plugin daemon configuration and adds a new environment variable for the Redis port. Changes: - Rename `apiKey` and `apiKeySecret` to `serverKey`, `serverKeySecret`, `difyInnerApiKey`, and `difyInnerApiKeySecret` in `values.yaml` and `deployment.yaml`. - Add `MARKETPLACE_API_URL`, `PLUGIN_DAEMON_KEY`, and `PLUGIN_DIFY_INNER_API_KEY` environment variables to `_helpers.tpl` when plugin daemon is enabled. - Add `REDIS_PORT` environment variable to `_helpers.tpl` when embedded Redis is enabled. - Update dify and plugin-daemon image tags. - Update chart and app versions.
@xieyos the PLUGIN_DAEMON_URL is still missing. Should be added to commonBackendEnvs |
Adds the `PLUGIN_DAEMON_URL` environment variable to the helper template when plugin daemon is enabled.
支持dify 1.0级以上版本,修改版本号为1.0.1
fix #106