-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[Improvement-11505][k8s] Use configmap to mount the configuration files of each server #11508
Conversation
…es of each server
Hi @rickchengx , for those |
Kudos, SonarCloud Quality Gate passed! |
Hi @kezhenxu94 , thanks for the reply. #11402 seems to be related to submitting a The purpose of this pr is to allow users to easily change the configuration files of each server before deploying with Please correct me if my understanding is wrong. |
No. 11402 is nothing related to task.
This scenario is the same as 11402
11402 not only allows users to modify the configs before starting DS components, but also allows users to modify the configs without restarting the components and the configs can be reloaded at runtime. |
this solution will not use helm chart's values.yaml to change the properties file, which is a breaking change since it is available for v2.0.6, better to keep the same behavior. In v2.0.6 a script is used to sed all ENV variables into properties file. |
@kezhenxu94 Sorry for the late response. I understand that 11402 could allow users to modify the configs without restarting the components and the configs can be reloaded at runtime. But my point is that if users use In this case, DS cannot apply some configuration modifications at startup unless he modifies the configuration file in the docker image (Some configurations cannot be specified via This PR mainly mounts the configuration directory through |
Hi, do you also know that the configs also works at startup phase, not only at runtime? Meaning when you create a config map with the desired configurations, the components will pick them up when starting |
Hi, @kezhenxu94 , thanks for the response. I know that the configs work at startup phase, and this is exactly the purpose of this PR. This PR mainly mounts the configuration directory through Maybe I should explain my point more clearly:
But with this PR, if user wants to modify some cofigurations, he can just modify the configuration files in |
@rickchengx now, in the master, if the user wants to modify some configurations, they can just ALso, the benefit of 👆 compared to your changes, is that, users can just provide a patch config without copying the whole |
Thanks for the reply. I've got your point. |
@kezhenxu94 you only created these configmaps, but not mounting them into deployment/statefulset, which will not be seen by DS pods, right? I agree with your point users do not need to specify all configs within values.yaml, can we refer back to what 2.x version did:
|
Please learn how Spring Cloud works, DS components will automatically pick up the config map, please also read #11730 (comment) |
@kezhenxu94 thx for the link, its useful. Here's some caveat, correct me if I'm wrong:
|
I don't see there is a scenario to share configs between different DS components. Every component has its own configurations. Also, sharing configs between components might be error-prone because you need to manually merge the common config and the component-specific config to see the final effective config when debugging. There is a method to do that in Spring but I don't see a scenario yet.
if you want, you are welcome to migrate from helm to kustomize. But currently polishing the documentation is our better choice
Yes we missed that. I will manage to add them |
cool, I will test it out afterwards, may try to convert to Kustomize if I have time, seems more intuitive, thx. |
Purpose of the pull request
close: #11505
Use
configmap
to mount the configuration files of each server so that user can easily modify the configuration of each server when deploying Dolphinscheduler in the k8s cluster throughHelm
.Ref:
https://kubernetes.io/docs/concepts/configuration/configmap/
https://helm.sh/docs/chart_template_guide/accessing_files/
For example, if the user wants to change the configuration (E.g., the
root directory
ofzookeeper
inapplication.yaml
, or thelog.base
inlogback-spring.yaml
, orresource.storage.type
incommon.properties
), he can directly do the modification indeploy/kubernetes/dolphinscheduler/conf/<server>/<configuration file>
.Take
master-server
as an example, k8s will automatically mount the configmap (4 configuration files indeploy/kubernetes/dolphinscheduler/conf/master-server
) to/opt/dolphinscheduler/conf
in the container.Brief change log
Verify this pull request
Manually verified the change by testing locally.
/opt/dolphinscheduler/conf
in the container is mounted.