incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

[Question][Helm Chart deployment] Unable to connect to MySQL database through Grafana

Open gauravagerwala opened this issue 1 year ago • 13 comments

Question

I created a new deployment using Helm charts (with ingress) and am unable to connect Grafana to the mySQL datasource.

The pipelines ran successfully and ingested data into the database. (verified by checking the data on the cluster)

Screenshots

Image ## Additional context When I attempted a similar deployment with NodePort I was able to connect succesfully.

gauravagerwala avatar Sep 09 '25 18:09 gauravagerwala

Can you scroll up to the top and check the mysql host setting?

klesh avatar Sep 10 '25 02:09 klesh

The host on this page is pointing to localhost:3306

I attempted to update this but that does not change the host. Note the banner that says the config cannot be modified.

Image

On the cluster I see a config map that defines the URL as devlake-mysql:3306. This matches with the name of the ClusterIP service for mysql on the cluster.

Image

gauravagerwala avatar Sep 10 '25 18:09 gauravagerwala

Which version was it? Stable or development?

klesh avatar Sep 11 '25 08:09 klesh

I tried the stable version v1.0.2 on Minikube and observed the same result.
After some digging, it seems the issue might be related to #337.

That said, my knowledge of Helm charts is limited, so I wonder if @kahirokunn could help diagnose the problem?

PS: I also tried deploying the development version but ran into another issue, similar to grafana/helm-charts#752. I’m not sure if this is specific to minikube on my local machine or if it could also affect production deployments.

klesh avatar Sep 11 '25 09:09 klesh

Could you please share the exact Helm values you used for installation, along with the commands you ran and how you accessed Grafana? That way I can fully reproduce the issue on my side.

kahirokunn avatar Sep 11 '25 10:09 kahirokunn

@klesh I think this fixed it. 🙏 https://github.com/apache/incubator-devlake-helm-chart/pull/353

kahirokunn avatar Sep 11 '25 10:09 kahirokunn

@kahirokunn Thank you very much for the quick fix. Much appreciated

klesh avatar Sep 12 '25 01:09 klesh

@kahirokunn any advice on how I can patch my environment directly? (While we wait for the new helm release to be created)

I added the variables directly to the grafana pod, but that did not refresh the variables on the dashboard itself

gauravagerwala avatar Sep 15 '25 16:09 gauravagerwala

@kahirokunn I also don't see a configmap names devlake_mysql_auth_config in my cluster.

The configmap with the variables defined is devlake-config

gauravagerwala avatar Sep 16 '25 00:09 gauravagerwala

In the meantime, using an older version of helm chart works fine.

kahirokunn avatar Sep 16 '25 02:09 kahirokunn

I was able to locate the issue. The grafana deployment was not referencing devlake-config configmap Once I added this configmap to the deployment, the grafana pod was able to pick up the required env variables.

gauravagerwala avatar Sep 16 '25 02:09 gauravagerwala

This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar Nov 16 '25 00:11 github-actions[bot]

This issue has been closed because it has been inactive for a long time. You can reopen it if you encounter the similar problem in the future.

github-actions[bot] avatar Nov 23 '25 00:11 github-actions[bot]