config

package
v3.10.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 9 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"
	ConfigOpenshift                 = "mode.openshift"
	ConfigJsonnetBasePath           = "grafonnet.location"
	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.3"
	PluginsUrl                      = "https://grafana.com/api/plugins/%s/versions/%s"
	RequeueDelay                    = time.Second * 10
	SecretsMountDir                 = "/etc/grafana-secrets/"
	ConfigMapsMountDir              = "/etc/grafana-configmaps/"
	ConfigRouteWatch                = "watch.routes"
	ConfigGrafanaDashboardsSynced   = "grafana.dashboards.synced"
	JsonnetBasePath                 = "/opt/jsonnet"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerConfig

type ControllerConfig struct {
	*sync.Mutex
	Values     map[string]interface{}
	Plugins    map[string]v1alpha1.PluginList
	Dashboards map[string][]*v1alpha1.GrafanaDashboardRef
}

func GetControllerConfig

func GetControllerConfig() *ControllerConfig

func (*ControllerConfig) AddConfigItem

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

func (*ControllerConfig) AddDashboard

func (c *ControllerConfig) AddDashboard(dashboard *v1alpha1.GrafanaDashboard, folderId *int64, folderName string)

func (*ControllerConfig) Cleanup

func (c *ControllerConfig) Cleanup(plugins bool)

func (*ControllerConfig) GetAllPlugins added in v3.8.0

func (c *ControllerConfig) GetAllPlugins() v1alpha1.PluginList

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(namespace, name string) string

func (*ControllerConfig) GetDashboards

func (c *ControllerConfig) GetDashboards(namespace string) []*v1alpha1.GrafanaDashboardRef

func (*ControllerConfig) GetPluginsFor

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

func (*ControllerConfig) HasConfigItem

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

func (*ControllerConfig) HasDashboard

func (c *ControllerConfig) HasDashboard(namespace, name string) (int, bool)

func (*ControllerConfig) InvalidateDashboards

func (c *ControllerConfig) InvalidateDashboards()

func (*ControllerConfig) RemoveConfigItem

func (c *ControllerConfig) RemoveConfigItem(key string)

func (*ControllerConfig) RemoveDashboard

func (c *ControllerConfig) RemoveDashboard(namespace, name string)

func (*ControllerConfig) RemovePluginsFor

func (c *ControllerConfig) RemovePluginsFor(namespace, name string)

func (*ControllerConfig) SetDashboards

func (c *ControllerConfig) SetDashboards(dashboards map[string][]*v1alpha1.GrafanaDashboardRef)

func (*ControllerConfig) SetPluginsFor

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

type GrafanaIni

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

func NewGrafanaIni

func NewGrafanaIni(cfg *v1alpha1.GrafanaConfig) *GrafanaIni

func (*GrafanaIni) Write

func (i *GrafanaIni) Write() (string, string)

Jump to

Keyboard shortcuts

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