common

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigGrafanaImage              = "grafana.image.url"
	ConfigGrafanaImageTag           = "grafana.image.tag"
	ConfigPluginsInitContainerImage = "grafana.plugins.init.container.image.url"
	ConfigPluginsInitContainerTag   = "grafana.plugins.init.container.image.tag"
	ConfigOperatorNamespace         = "grafana.operator.namespace"
	ConfigDashboardLabelSelector    = "grafana.dashboard.selector"
	ConfigGrafanaPluginsUpdated     = "grafana.plugins.updated"
	ConfigOpenshift                 = "mode.openshift"
	GrafanaImage                    = "docker.io/grafana/grafana"
	GrafanaVersion                  = "5.4.2"
	LogLevel                        = "error"
	GrafanaConfigMapName            = "grafana-config"
	GrafanaProvidersConfigMapName   = "grafana-providers"
	GrafanaDatasourcesConfigMapName = "grafana-datasources"
	GrafanaDashboardsConfigMapName  = "grafana-dashboards"
	GrafanaServiceAccountName       = "grafana-serviceaccount"
	GrafanaDeploymentName           = "grafana-deployment"
	GrafanaRouteName                = "grafana-route"
	GrafanaIngressName              = "grafana-ingress"
	GrafanaServiceName              = "grafana-service"
	PluginsInitContainerImage       = "quay.io/integreatly/grafana_plugins_init"
	PluginsInitContainerTag         = "0.0.2"
	PluginsEnvVar                   = "GRAFANA_PLUGINS"
	PluginsUrl                      = "https://grafana.com/api/plugins/%s/versions/%s"
	PluginsMinAge                   = 5
	InitContainerName               = "grafana-plugins-init"
	ResourceFinalizerName           = "grafana.cleanup"
	RequeueDelaySeconds             = 10
)
View Source
const (
	StatusResourceUninitialized int = iota
	StatusResourceSetFinalizer
	StatusResourceCreated
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerConfig

type ControllerConfig struct {
	Values  map[string]interface{}
	Plugins map[string]v1alpha1.PluginList
}

func GetControllerConfig

func GetControllerConfig() *ControllerConfig

func (*ControllerConfig) AddConfigItem

func (c *ControllerConfig) AddConfigItem(key string, value interface{})

func (*ControllerConfig) GetConfigBool

func (c *ControllerConfig) GetConfigBool(key string, defaultValue bool) bool

func (*ControllerConfig) GetConfigItem

func (c *ControllerConfig) GetConfigItem(key string, defaultValue interface{}) interface{}

func (*ControllerConfig) GetConfigString

func (c *ControllerConfig) GetConfigString(key, defaultValue string) string

func (*ControllerConfig) GetConfigTimestamp

func (c *ControllerConfig) GetConfigTimestamp(key string, defaultValue time.Time) time.Time

func (*ControllerConfig) GetDashboardId

func (c *ControllerConfig) GetDashboardId(dashboard *v1alpha1.GrafanaDashboard) string

func (*ControllerConfig) GetPluginsFor

func (c *ControllerConfig) GetPluginsFor(dashboard *v1alpha1.GrafanaDashboard) v1alpha1.PluginList

func (*ControllerConfig) HasConfigItem

func (c *ControllerConfig) HasConfigItem(key string) bool

func (*ControllerConfig) RemovePluginsFor

func (c *ControllerConfig) RemovePluginsFor(dashboard *v1alpha1.GrafanaDashboard)

func (*ControllerConfig) SetPluginsFor

func (c *ControllerConfig) SetPluginsFor(dashboard *v1alpha1.GrafanaDashboard)

type KubeHelperImpl

type KubeHelperImpl struct {
	// contains filtered or unexported fields
}

func NewKubeHelper

func NewKubeHelper() *KubeHelperImpl

func (KubeHelperImpl) DeleteDashboard

func (h KubeHelperImpl) DeleteDashboard(monitoringNamespace string, dashboardNamespace string, dashboard *v1alpha1.GrafanaDashboard) error

func (KubeHelperImpl) DeleteDataSources

func (h KubeHelperImpl) DeleteDataSources(name, namespace string) error

func (KubeHelperImpl) RestartGrafana

func (h KubeHelperImpl) RestartGrafana(monitoringNamespace string) error

func (KubeHelperImpl) UpdateDashboard

func (h KubeHelperImpl) UpdateDashboard(ns string, d *v1alpha1.GrafanaDashboard) (bool, error)

func (KubeHelperImpl) UpdateDataSources

func (h KubeHelperImpl) UpdateDataSources(name, namespace, ds string) (bool, error)

func (KubeHelperImpl) UpdateGrafanaDeployment

func (h KubeHelperImpl) UpdateGrafanaDeployment(monitoringNamespace string, newEnv string) error

Jump to

Keyboard shortcuts

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