Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager, autodetectChannel chan schema.GroupVersionKind, _ string) error
- type GrafanaReconciler
- type PluginsHelperImpl
- func (h *PluginsHelperImpl) BuildEnv(cr *grafanav1alpha1.Grafana) string
- func (h *PluginsHelperImpl) FilterPlugins(cr *grafanav1alpha1.Grafana, requested grafanav1alpha1.PluginList) (grafanav1alpha1.PluginList, bool)
- func (h *PluginsHelperImpl) PluginExists(plugin grafanav1alpha1.GrafanaPlugin) bool
- type ReconcileGrafana
Constants ¶
View Source
const ( JsonnetExtension = ".libsonnet" JsonnetAnnotation = "jsonnet/library" )
View Source
const ControllerName = "grafana-controller"
View Source
const DefaultClientTimeoutSeconds = 5
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GrafanaReconciler ¶
type GrafanaReconciler struct { DsHash string ConfigHash string PluginsEnv string Plugins *PluginsHelperImpl }
func NewGrafanaReconciler ¶
func NewGrafanaReconciler() *GrafanaReconciler
func (*GrafanaReconciler) Reconcile ¶
func (i *GrafanaReconciler) Reconcile(state *common.ClusterState, cr *v1alpha1.Grafana) common.DesiredClusterState
type PluginsHelperImpl ¶
func (*PluginsHelperImpl) BuildEnv ¶
func (h *PluginsHelperImpl) BuildEnv(cr *grafanav1alpha1.Grafana) string
Turns an array of plugins into a string representation of the form `<name>:<version>,...` that is used as the value for the GRAFANA_PLUGINS environment variable
func (*PluginsHelperImpl) FilterPlugins ¶
func (h *PluginsHelperImpl) FilterPlugins(cr *grafanav1alpha1.Grafana, requested grafanav1alpha1.PluginList) (grafanav1alpha1.PluginList, bool)
Creates the list of plugins that can be added or updated Does not directly deal with removing plugins: if a plugin is not in the list and the env var is updated, it will automatically be removed
func (*PluginsHelperImpl) PluginExists ¶
func (h *PluginsHelperImpl) PluginExists(plugin grafanav1alpha1.GrafanaPlugin) bool
Query the Grafana plugin database for the given plugin and version A 200 OK response indicates that the plugin exists and can be downloaded
type ReconcileGrafana ¶
type ReconcileGrafana struct {
// contains filtered or unexported fields
}
ReconcileGrafana reconciles a Grafana object
Click to show internal directories.
Click to hide internal directories.