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

[Improvement][k8s] No configuration provided for loading MySQL JDBC driver during Helm deployment to Kubernetes. #16901

Open
3 tasks done
bli22ard opened this issue Dec 18, 2024 · 2 comments
Assignees
Labels
feature new feature good idea improvement make more easy to user or prompt friendly

Comments

@bli22ard
Copy link

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

When creating a new MySQL data source, I need to copy the MySQL data source JAR file to the following directories: api-server/libs, alert-server/libs, master-server/libs, worker-server/libs, and tools/libs. Currently, I can only achieve this by modifying the YAML files in the helm/templates folder.

    command:
            - sh
            - -c
            - |
              sed -i 's|$DOLPHINSCHEDULER_HOME/libs/\*|$DOLPHINSCHEDULER_HOME/libs/\*":"$CLASSPATH_API|g' /opt/dolphinscheduler/bin/start.sh;
              exec /opt/dolphinscheduler/bin/start.sh

Additionally, after replacing the code as described, I need to configure the classpath_api environment variable externally to load the MySQL driver from common.sharedStoragePersistence. This method is extremely cumbersome.

It would be better to provide a Persistent Volume Claim (PVC) to load external JAR files. Ideally, there should be a separate external JAR loading path for each component: api-server, alert-server, master-server, worker-server, and tools. This would allow external users to easily provide these JAR files to DolphinScheduler.

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@bli22ard bli22ard added improvement make more easy to user or prompt friendly Waiting for reply Waiting for reply labels Dec 18, 2024
@Gallardot
Copy link
Member

For missing JARs, such as MySQL or Oracle, rebuilding docker images directly may be more convenient in many cases. However, shared storage is also a suitable solution. Welcome to create a PR to make this feature possible.

@Gallardot Gallardot added feature new feature good idea and removed Waiting for reply Waiting for reply labels Dec 18, 2024
@bli22ard
Copy link
Author

Another solution is to modify the java startup command in /opt/dolphinscheduler/bin/start.sh by adding the CLASSPATH environment variable to the -cp parameter. Then, in Helm, provide separate environment variable configurations for the api-server/libs, alert-server/libs, master-server/libs, worker-server/libs, and tools/libs components. We need to discuss the best solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature good idea improvement make more easy to user or prompt friendly
Projects
None yet
Development

No branches or pull requests

2 participants