grafana

package
v3.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerName = "grafana-controller"
View Source
const DefaultClientTimeoutSeconds = 5

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, autodetectChannel chan schema.GroupVersionKind, _ string) error

Add creates a new Grafana Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

Types

type GrafanaReconciler

type GrafanaReconciler struct {
	DsHash     string
	ConfigHash string
	PluginsEnv string
	Plugins    *PluginsHelperImpl
}

func NewGrafanaReconciler

func NewGrafanaReconciler() *GrafanaReconciler

func (*GrafanaReconciler) Reconcile

type PluginsHelperImpl

type PluginsHelperImpl struct {
	BaseUrl    string
	HttpClient *http.Client
}

func (*PluginsHelperImpl) BuildEnv

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

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

func (*ReconcileGrafana) Reconcile

func (r *ReconcileGrafana) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Grafana object and makes changes based on the state read and what is in the Grafana.Spec

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL