ruler

package
v0.0.0-...-5e131ef Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the name of the Thanos Ruler component.
	Name = "thanos-ruler"

	// ComponentName is the name of the Thanos Ruler component.
	ComponentName = "rule-evaluation-engine"

	GRPCPort     = 10901
	GRPCPortName = "grpc"

	HTTPPort     = 9090
	HTTPPortName = "http"
)

Variables

This section is empty.

Functions

func GenerateRuleFileContent

func GenerateRuleFileContent(groups []monitoringv1.RuleGroup) string

Convert PrometheusRule groups to YAML format

func GetLabels

func GetLabels(opts Options) map[string]string

func GetRequiredLabels

func GetRequiredLabels() map[string]string

GetRequiredLabels returns a map of labels that can be used to look up thanos ruler resources. These labels are guaranteed to be present on all resources created by this package.

func NewRulerService

func NewRulerService(opts Options) *corev1.Service

func NewRulerStatefulSet

func NewRulerStatefulSet(opts Options) *appsv1.StatefulSet

Types

type Endpoint

type Endpoint struct {
	ServiceName string
	Namespace   string
	Port        int32
}

Endpoint represents a single QueryAPI DNS formatted address. TODO(saswatamcode): Add validation.

type Options

type Options struct {
	manifests.Options
	Endpoints          []Endpoint
	RuleFiles          []corev1.ConfigMapKeySelector
	ObjStoreSecret     corev1.SecretKeySelector
	Retention          manifests.Duration
	AlertmanagerURL    string
	ExternalLabels     map[string]string
	AlertLabelDrop     []string
	StorageSize        resource.Quantity
	EvaluationInterval manifests.Duration
}

Options for Thanos Ruler

func (Options) Build

func (opts Options) Build() []client.Object

func (Options) GetGeneratedResourceName

func (opts Options) GetGeneratedResourceName() string

func (Options) GetSelectorLabels

func (opts Options) GetSelectorLabels() map[string]string

Jump to

Keyboard shortcuts

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