Documentation ¶
Index ¶
- Constants
- func GetGrafanaConfigMapName(monitor *v1alpha1.TidbMonitor) string
- func GetMonitorFirstPVCName(name string) string
- func GetMonitorInstanceName(monitor *v1alpha1.TidbMonitor, shard int32) string
- func GetMonitorObjectName(monitor *v1alpha1.TidbMonitor) string
- func GetMonitorObjectNameCrossNamespace(monitor *v1alpha1.TidbMonitor) string
- func GetMonitorShardName(name string, shard int32) string
- func GetPromConfigMapName(monitor *v1alpha1.TidbMonitor) string
- func GetTLSAssetsSecretName(name string) string
- func GrafanaName(name string, shard int32) string
- func GreaterThanOrEqual(left *semver.Version, right *semver.Version) bool
- func PrometheusName(name string, shard int32) string
- func RenderPrometheusConfig(model *MonitorConfigModel) (yaml.MapSlice, error)
- type BasicAuthCredentials
- type ClusterRegexInfo
- type MonitorConfigModel
- type MonitorManager
- type Store
- type TLSAsset
- type TLSAssetKey
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 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 GetPromConfigMapName ¶ added in v1.2.4
func GetPromConfigMapName(monitor *v1alpha1.TidbMonitor) string
func GetTLSAssetsSecretName ¶ added in v1.2.0
func GrafanaName ¶ added in v1.3.0
func GreaterThanOrEqual ¶ added in v1.4.0
func PrometheusName ¶ added in v1.3.0
func RenderPrometheusConfig ¶
func RenderPrometheusConfig(model *MonitorConfigModel) (yaml.MapSlice, error)
Types ¶
type BasicAuthCredentials ¶ added in v1.4.0
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.
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.
Click to show internal directories.
Click to hide internal directories.