monitor

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FailedSync  = "FailedSync"
	SuccessSync = "SuccessSync"
)

Variables

This section is empty.

Functions

func GetGrafanaConfigMapName added in v1.2.4

func GetGrafanaConfigMapName(monitor *v1alpha1.TidbMonitor) string

func GetMonitorFirstPVCName added in v1.2.0

func GetMonitorFirstPVCName(name string) string

func GetMonitorInstanceName added in v1.3.0

func GetMonitorInstanceName(monitor *v1alpha1.TidbMonitor, shard int32) string

func GetMonitorObjectName

func GetMonitorObjectName(monitor *v1alpha1.TidbMonitor) string

func GetMonitorObjectNameCrossNamespace added in v1.1.6

func GetMonitorObjectNameCrossNamespace(monitor *v1alpha1.TidbMonitor) string

func GetMonitorShardName added in v1.3.0

func GetMonitorShardName(name string, shard int32) string

func GetPromConfigMapName added in v1.2.4

func GetPromConfigMapName(monitor *v1alpha1.TidbMonitor) string

func GetTLSAssetsSecretName added in v1.2.0

func GetTLSAssetsSecretName(name string) string

func GrafanaName added in v1.3.0

func GrafanaName(name string, shard int32) string

func GreaterThanOrEqual added in v1.4.0

func GreaterThanOrEqual(left *semver.Version, right *semver.Version) bool

func PrometheusName added in v1.3.0

func PrometheusName(name string, shard int32) string

func RenderPrometheusConfig

func RenderPrometheusConfig(model *MonitorConfigModel) (yaml.MapSlice, error)

Types

type BasicAuthCredentials added in v1.4.0

type BasicAuthCredentials struct {
	Username string
	Password string
}

type ClusterRegexInfo added in v1.1.8

type ClusterRegexInfo struct {
	Name      string
	Namespace string
	// contains filtered or unexported fields
}

ClusterRegexInfo is the monitor cluster info

type MonitorConfigModel

type MonitorConfigModel struct {
	AlertmanagerURL           string
	ClusterInfos              []ClusterRegexInfo
	DMClusterInfos            []ClusterRegexInfo
	ExternalLabels            model.LabelSet
	RemoteWriteCfg            *yaml.MapItem
	EnableAlertRules          bool
	EnableExternalRuleConfigs bool
	// contains filtered or unexported fields
}

type MonitorManager

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

func NewMonitorManager

func NewMonitorManager(deps *controller.Dependencies) *MonitorManager

func (*MonitorManager) SyncMonitor

func (m *MonitorManager) SyncMonitor(monitor *v1alpha1.TidbMonitor) error

type Store added in v1.2.0

type Store struct {
	TLSAssets       map[TLSAssetKey]TLSAsset
	BasicAuthAssets map[string]BasicAuthCredentials
	// contains filtered or unexported fields
}

Store is a store that fetches and caches TLS materials, bearer tokens and auth credentials from configmaps and secrets. Data can be referenced directly from a TiDBMonitor object. In practice a new store is created and used by each reconciliation loop.

Store doesn't support concurrent access.

func NewStore added in v1.2.0

func NewStore(secretLister corelisterv1.SecretLister) *Store

NewStore returns an empty assetStore.

func (*Store) AddBasicAuth added in v1.4.0

func (s *Store) AddBasicAuth(ns string, ba *v1alpha1.BasicAuth, key string) error

AddBasicAuth processes the given *BasicAuth and adds the referenced credentials to the store.

type TLSAsset added in v1.2.0

type TLSAsset string

TLSAsset represents any TLS related opaque string, e.g. CA files, client certificates.

type TLSAssetKey added in v1.2.0

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

TLSAssetKey is a key for a TLS asset.

func (TLSAssetKey) String added in v1.2.0

func (k TLSAssetKey) String() string

String implements the fmt.Stringer interface.

Jump to

Keyboard shortcuts

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