Add preinstall feature to defaults.ini (#92347)

This commit is contained in:
Andres Martinez Gotor 2024-08-23 10:32:23 +02:00 committed by GitHub
parent d8ec95e9b1
commit a990b77c70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -1729,6 +1729,12 @@ install_token =
hide_angular_deprecation =
# Comma separated list of plugin ids for which environment variables should be forwarded. Used only when feature flag pluginsSkipHostEnvVars is enabled.
forward_host_env_vars =
# Comma separated list of plugin ids to install as part of the startup process. Used only when feature flag backgroundPluginInstaller is enabled.
preinstall =
# Controls whether preinstall plugins asynchronously (in the background) or synchronously (blocking). Useful when preinstalled plugins are used with provisioning.
preinstall_async = true
# Disables preinstall feature. It has the same effect as setting preinstall to an empty list.
preinstall_disabled = false
#################################### Grafana Live ##########################################
[live]

View File

@ -39,7 +39,7 @@ func (cfg *Cfg) readPluginSettings(iniFile *ini.File) error {
cfg.DisablePlugins = util.SplitString(pluginsSection.Key("disable_plugins").MustString(""))
cfg.HideAngularDeprecation = util.SplitString(pluginsSection.Key("hide_angular_deprecation").MustString(""))
cfg.ForwardHostEnvVars = util.SplitString(pluginsSection.Key("forward_host_env_vars").MustString(""))
disablePreinstall := pluginsSection.Key("disable_preinstall").MustBool(false)
disablePreinstall := pluginsSection.Key("preinstall_disabled").MustBool(false)
if !disablePreinstall {
rawInstallPlugins := util.SplitString(pluginsSection.Key("preinstall").MustString(""))
cfg.PreinstallPlugins = make([]InstallPlugin, len(rawInstallPlugins))