Closed ceelias closed 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.
I think this might be related to https://github.com/grafana/grafana/issues/12878 . I am doing a similar setup and grafana isn't loading the default datasource, even though/etc/grafana/provisioning/datasources/datasource.yaml
and grafana.ini
points to the correct paths. Maybe the reason it sometimes works for OP is a race condition (as pointed out in the grafana issue)?
EDIT: I just tried forcing grafana to restart via kubectl exec -n kube-prometheus-stack -it deployment/kube-prometheus-stack-grafana -c grafana -- /bin/sh -c 'kill 1'
and now the default datasource shows up. More evidence in support of https://github.com/grafana/grafana/issues/12878 I guess.
With respect to datasources that are defined in configmaps, these get collected by the datasource sidecar grafana.sidecar.datasources.enabled
implemented with k8s-sidecar. If
its requests to the Grafana's reload endpoint fail and hence, Grafana does not know of the new datasources until it gets redeployed and finds new datasources via provisioning directory. This might be the reason why a datasource from a configmap shows occasionally up.
The default Prometheus datasource with grafana.sidecar.datasources.defaultDatasourceEnabled
gets also collected by the sidecar, and similarly grafana.additionalDatasources
.
Another means to define custom datasources is through grafana.datasources
(Ref.). In this case, a change to the datasources initiates a redeployment on release upgrade.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.
This issue is being automatically closed due to inactivity.
Describe the bug a clear and concise description of what the bug is.
While attempting to deploy Grafana with TLS/Ingress and updated values of Prometheus datasource, I am seeing inconsistent results but generally not seeing any datasource configured at all
What's your helm version?
version.BuildInfo{Version:"v3.11.0", GitCommit:"472c5736ab01133de504a826bd9ee12cbe4e7904", GitTreeState:"clean", GoVersion:"go1.19.5"}
What's your kubectl version?
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.4", GitCommit:"872a965c6c6526caa949f0c6ac028ef7aff3fb78", GitTreeState:"clean" , BuildDate:"2022-11-09T13:36:36Z", GoVersion:"go1.19.3", Compiler:"gc", Platform:"darwin/arm64"} Kustomize Version: v4.5.7 Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.4", GitCommit:"872a965c6c6526caa949f0c6ac028ef7aff3fb78", GitTreeState:"clean" , BuildDate:"2022-11-09T13:29:58Z", GoVersion:"go1.19.3", Compiler:"gc", Platform:"linux/amd64"}
Which chart?
kube-prometheus-stack
What's the chart version?
43.3.1
What happened?
'm attempting to deploy Grafana with TLS enabled (
grafana.ini
updated withprotocol: https
) and ingress along with loading a Prometheus datasource. This deploys fine and works as expected. The issue is when I navigate to the data sources in the Grafana UI, I see 1 of 3 things:I am creating a separate configmap that I then attach the label
grafana_datasource=1
to. I know this works fine when I am not attempting to update the grafana.ini with ingress or TLS enabled so I'm unsure why it is failing to work now. As I mentioned, it will occasionally/randomly work when I deploy which makes the issue a bit more odd for me.In another attempt to solve my use case, I have updated the default datasource to use the appropriate url I need using
https://
, but I would also like the ability to toggletlsSkipVerify
which does not appear to be a supported configuration for the default data source.I see no errors in the logs related to these changes or anything that would indicate an issue to me. I am able to manually add the datasource through the UI and it has not issue.
I am able to confirm that my datasource configmap gets created with the correct label but I do see another configmap that appears to be created by default
v4m-grafana-datasource
that is completely empty with the correct label as well. I wonder if somehow this configmap is getting picked up first and is the one causing the issue.What you expected to happen?
I expect Grafana to get deployed with TLS and Ingress enabled with my Prometheus datasource configured.
How to reproduce it?
Deploy Grafana with TLS/ingress configured and a custom Prometheus datasource
Enter the changed values of values.yaml?
Datasource configmap(
grafana-datasource-prom-https.yaml
):Enter the command that you execute and failing/misfunctioning.
Configmap is created:
No failure in logs or returned to me on deploy
Anything else we need to know?
Willing to provide any other information that would make the issue more clear. Thanks for looking!