-
Notifications
You must be signed in to change notification settings - Fork 374
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
Avoid dependency on external circumstances on restart #1350
Comments
Well, the operator does not install the plugins itself, it only generates an environment variable with a list of plugins that Grafana reads upon start. The current implementation of CR already allows you to have full access to any workload properties, so there are plenty of things you could do:
|
I think there used to be Grafana init plugin in v4 operator - https://github.com/grafana-operator/grafana_plugins_init, but this seems to have changed. So it seems that the upstream Grafana image is responsible to download plugins according to GF_INSTALL_PLUGINS env variable? It seems Grafana v5 CR should allow me to add my own init container, so maybe this is the way to go, providing that Grafana will respect already downloaded plugins and will not try to redownload them (via the GF_INSTALL_PLUGIN variable) again even if init container has already done so. I will test this out next week. |
That is correct, v4 had a different implementation. With changes that came with v5, we just wanted to let Grafana do the things it's already capable of, so we don't have to overcomplicate our code base :) |
It seems it will be necessary to open an issue for Grafana image directly. Studying the Docker code, it seems that:
I will try to create a custom init image and put the plugin into plugins directory for the mount, and see if Grafana will find the plugin and skip the download. Otherwise the options for download are quite limited. |
@bukovjanmic I good solution could be to bundle the plugins in a custom Grafana image and deploy that using the operator. You can override the base image. |
Do you know a place (path) where these plugins should be put? Normally, we have a mount grafana-data on the /var/lib/grafana mount path, which means that /var/lib/grafana/plugins, where plugins are downloaded, cannot be used by image, as it will be overridden by the mount. |
@bukovjanmic you can use a setting to override the path where Grafana looks for plugins: https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#plugins |
Good point, we will try this out. Hopefully, if the plugins are already present, Grafana will not try to redownload the plugins (as GF_INSTALL_PLUGINS will still be passed by the operator). |
This issue hasn't been updated for a while, marking as stale, please respond within the next 7 days to remove this label |
Current behavior of Grafana operator is, when there are declared custom plugins in e.g. Grafana dashboad, to download those plugins during Grafana startup from grafana.com website.
However, there is a catch. If the grafana website is not available (e.g. there is no internet connection), grafana deployment fails to start and ends up in a crash loop.
I suggest the following enahncements:
This would not only make Grafana start faster, but also make it less dependent on external circumstances (e.g. Internet connection availability) when starting the deployment.
The text was updated successfully, but these errors were encountered: