apache / dolphinscheduler

Apache DolphinScheduler is the modern data orchestration platform. Agile to create high performance workflow with low-code
https://dolphinscheduler.apache.org/
Apache License 2.0
12.88k stars 4.63k forks source link

[Bug] [Helm] env `DEFAULT_TENANT_ENABLED` is not taking effect. #16410

Closed yelijing18 closed 3 months ago

yelijing18 commented 3 months ago

Search before asking

What happened

The env variable for worker "DEFAULT_TENANT_ENABLED" is not taking effect. Worker 的 env 配置 "DEFAULT_TENANT_ENABLED" 不生效。

https://github.com/apache/dolphinscheduler/blob/aabda868daabe938e4894f1886d56def9401651c/deploy/kubernetes/dolphinscheduler/values.yaml#L691 https://github.com/apache/dolphinscheduler/blob/aabda868daabe938e4894f1886d56def9401651c/deploy/kubernetes/dolphinscheduler/README.md?plain=1#L310

What you expected to happen

The Bootstrap User is used as the execution user. 启动用户会被用作执行用户。

How to reproduce

When deploying via Helm, set worker.env.DEFAULT_TENANT_ENABLED to true, and use 'default' as the tenant to trigger the workflow, then observe whether the Bootstrap User is used as the execution user. 在通过 Helm 部署时设置 worker.env.DEFAULT_TENANT_ENABLED 为 true,并使用 default 作为租户触发工作流,观察是否使用 Bootstrap User 作为执行用户。

Anything else

The purpose of this environment variable configuration is to override the Spring configuration item at https://github.com/apache/dolphinscheduler/blob/aabda868daabe938e4894f1886d56def9401651c/dolphinscheduler-worker/src/main/resources/application.yaml#L70. 该环境变量配置的目的是覆盖 /dolphinscheduler-worker/src/main/resources/application.yaml#L70 的 Spring 配置项。

According to the Spring Externalized Configuration documentation, the environment variable should be named WORKER_TENANT_CONFIG_DEFAULT_TENANT_ENABLED rather than the current DEFAULT_TENANT_ENABLED. 根据 Spring Externalized Configuration 文档的说明,该环境变量应该命名为 WORKER_TENANT_CONFIG_DEFAULT_TENANT_ENABLED 而非目前的 DEFAULT_TENANT_ENABLED

ref: https://docs.spring.io/spring-boot/reference/features/external-config.html#features.external-config.typesafe-configuration-properties.relaxed-binding.environment-variables

Version

dev

Are you willing to submit PR?

Code of Conduct

github-actions[bot] commented 3 months ago

Search before asking

What happened

The env variable for worker "DEFAULT_TENANT_ENABLED" is not taking effect. Worker 的 env 配置 "DEFAULT_TENANT_ENABLED" 不生效。

https://github.com/apache/dolphinscheduler/blob/aabda868daabe938e4894f1886d56def9401651c/deploy/kubernetes/dolphinscheduler/values.yaml#L691 https://github.com/apache/dolphinscheduler/blob/aabda868daabe938e4894f1886d56def9401651c/deploy/kubernetes/dolphinscheduler/README.md?plain=1#L310

What you expected to happen

The Bootstrap User is used as the execution user. 启动用户会被用作执行用户。

How to reproduce

When deploying via Helm, set worker.env.DEFAULT_TENANT_ENABLED to true, and use 'default' as the tenant to trigger the workflow, then observe whether the Bootstrap User is used as the execution user. 在通过 Helm 部署时设置 worker.env.DEFAULT_TENANT_ENABLED 为 true,并使用 default 作为租户触发工作流,观察是否使用 Bootstrap User 作为执行用户。

Anything else

The purpose of this environment variable configuration is to override the Spring configuration item at https://github.com/apache/dolphinscheduler/blob/aabda868daabe938e4894f1886d56def9401651c/dolphinscheduler-worker/src/main/resources/application.yaml#L70. 该环境变量配置的目的是覆盖 /dolphinscheduler-worker/src/main/resources/application.yaml#L70 的 Spring 配置项。

According to the Spring Externalized Configuration documentation, the environment variable should be named WORKER_TENANT_CONFIG_DEFAULT_TENANT_ENABLED rather than the current DEFAULT_TENANT_ENABLED. 根据 Spring Externalized Configuration 文档的说明,该环境变量应该命名为 WORKER_TENANT_CONFIG_DEFAULT_TENANT_ENABLED 而非目前的 DEFAULT_TENANT_ENABLED

ref: https://docs.spring.io/spring-boot/reference/features/external-config.html#features.external-config.typesafe-configuration-properties.relaxed-binding.environment-variables

Version

dev

Are you willing to submit PR?

Code of Conduct