Documentation ¶
Index ¶
- Constants
- func AppendMessage(message string, dashboard *v1alpha1.GrafanaDashboard)
- type ControllerConfig
- func (c *ControllerConfig) AddConfigItem(key string, value interface{})
- func (c *ControllerConfig) GetConfigBool(key string, defaultValue bool) bool
- func (c *ControllerConfig) GetConfigItem(key string, defaultValue interface{}) interface{}
- func (c *ControllerConfig) GetConfigString(key, defaultValue string) string
- func (c *ControllerConfig) GetConfigTimestamp(key string, defaultValue time.Time) time.Time
- func (c *ControllerConfig) GetDashboardId(dashboard *v1alpha1.GrafanaDashboard) string
- func (c *ControllerConfig) GetPluginsFor(dashboard *v1alpha1.GrafanaDashboard) v1alpha1.PluginList
- func (c *ControllerConfig) HasConfigItem(key string) bool
- func (c *ControllerConfig) RemovePluginsFor(dashboard *v1alpha1.GrafanaDashboard)
- func (c *ControllerConfig) SetPluginsFor(dashboard *v1alpha1.GrafanaDashboard)
- type KubeHelperImpl
- func (h KubeHelperImpl) DeleteDashboard(d *v1alpha1.GrafanaDashboard) error
- func (h KubeHelperImpl) DeleteDataSources(name, namespace string) error
- func (h KubeHelperImpl) IsKnown(kind string, o runtime.Object) (bool, error)
- func (h KubeHelperImpl) RestartGrafana() error
- func (h KubeHelperImpl) UpdateDashboard(d *v1alpha1.GrafanaDashboard, json string) (bool, error)
- func (h KubeHelperImpl) UpdateDataSources(name, namespace, ds string) (bool, error)
- func (h KubeHelperImpl) UpdateGrafanaConfig(config string, cr *v1alpha1.Grafana) error
- func (h KubeHelperImpl) UpdateGrafanaDeployment(newEnv string) error
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" ConfigPodLabelValue = "grafana.pod.label" ConfigOperatorNamespace = "grafana.operator.namespace" ConfigDashboardLabelSelector = "grafana.dashboard.selector" ConfigGrafanaPluginsUpdated = "grafana.plugins.updated" ConfigOpenshift = "mode.openshift" GrafanaImage = "quay.io/openshift/origin-grafana" GrafanaVersion = "4.2" GrafanaConfigMapName = "grafana-config" GrafanaConfigFileName = "grafana.ini" GrafanaProvidersConfigMapName = "grafana-providers" GrafanaDatasourcesConfigMapName = "grafana-datasources" GrafanaDashboardsConfigMapName = "grafana-dashboards" GrafanaServiceAccountName = "grafana-serviceaccount" GrafanaDeploymentName = "grafana-deployment" GrafanaRouteName = "grafana-route" GrafanaIngressName = "grafana-ingress" GrafanaServiceName = "grafana-service" GrafanaDataPath = "/var/lib/grafana" GrafanaLogsPath = "/var/log/grafana" GrafanaPluginsPath = "/var/lib/grafana/plugins" GrafanaProvisioningPath = "/etc/grafana/provisioning" 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" RequeueDelay = time.Second * 15 PodLabelDefaultValue = "grafana" )
View Source
const ( StatusResourceUninitialized int = iota StatusResourceSetFinalizer StatusResourceCreated StatusResourceOrphaned )
Variables ¶
This section is empty.
Functions ¶
func AppendMessage ¶
func AppendMessage(message string, dashboard *v1alpha1.GrafanaDashboard)
Append a status message to the origin dashboard of a plugin
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 (*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(d *v1alpha1.GrafanaDashboard) error
func (KubeHelperImpl) DeleteDataSources ¶
func (h KubeHelperImpl) DeleteDataSources(name, namespace string) error
func (KubeHelperImpl) RestartGrafana ¶
func (h KubeHelperImpl) RestartGrafana() error
func (KubeHelperImpl) UpdateDashboard ¶
func (h KubeHelperImpl) UpdateDashboard(d *v1alpha1.GrafanaDashboard, json string) (bool, error)
func (KubeHelperImpl) UpdateDataSources ¶
func (h KubeHelperImpl) UpdateDataSources(name, namespace, ds string) (bool, error)
func (KubeHelperImpl) UpdateGrafanaConfig ¶
func (h KubeHelperImpl) UpdateGrafanaConfig(config string, cr *v1alpha1.Grafana) error
func (KubeHelperImpl) UpdateGrafanaDeployment ¶
func (h KubeHelperImpl) UpdateGrafanaDeployment(newEnv string) error
Click to show internal directories.
Click to hide internal directories.