v1

package
v1.15.0-rc.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PrometheusTemplate = lazy.New(func() *assets.ObjectTemplate[*monitoringv1.Prometheus] {
		return ParseObjectTemplateOrDie[*monitoringv1.Prometheus]("prometheus", prometheusTemplateString)
	})

	PrometheusSATemplate = lazy.New(func() *assets.ObjectTemplate[*corev1.ServiceAccount] {
		return ParseObjectTemplateOrDie[*corev1.ServiceAccount]("prometheus-sa", prometheusSATemplateString)
	})

	PrometheusRoleBindingTemplate = lazy.New(func() *assets.ObjectTemplate[*rbacv1.RoleBinding] {
		return ParseObjectTemplateOrDie[*rbacv1.RoleBinding]("prometheus-rolebinding", prometheusRoleBindingTemplateString)
	})

	PrometheusServiceTemplate = lazy.New(func() *assets.ObjectTemplate[*corev1.Service] {
		return ParseObjectTemplateOrDie[*corev1.Service]("prometheus-service", prometheusServiceTemplateString)
	})

	ScyllaDBServiceMonitorTemplate = lazy.New(func() *assets.ObjectTemplate[*monitoringv1.ServiceMonitor] {
		return ParseObjectTemplateOrDie[*monitoringv1.ServiceMonitor]("scylladb-servicemonitor", scyllaDBServiceMonitorTemplateString)
	})

	PrometheusRules = lazy.New(func() PrometheusRulesMap {
		return helpers.Must(NewPrometheusRulesFromFS(prometheusRulesFS))
	})

	LatencyPrometheusRuleTemplate = lazy.New(func() *assets.ObjectTemplate[*monitoringv1.PrometheusRule] {
		return ParseObjectTemplateOrDie[*monitoringv1.PrometheusRule]("latency-prometheus-rule", latencyPrometheusRuleTemplateString)
	})

	AlertsPrometheusRuleTemplate = lazy.New(func() *assets.ObjectTemplate[*monitoringv1.PrometheusRule] {
		return ParseObjectTemplateOrDie[*monitoringv1.PrometheusRule]("alerts-prometheus-rule", alertsPrometheusRuleTemplateString)
	})

	TablePrometheusRuleTemplate = lazy.New(func() *assets.ObjectTemplate[*monitoringv1.PrometheusRule] {
		return ParseObjectTemplateOrDie[*monitoringv1.PrometheusRule]("table-prometheus-rule", tablePrometheusRuleTemplateString)
	})

	PrometheusIngressTemplate = lazy.New(func() *assets.ObjectTemplate[*networkingv1.Ingress] {
		return ParseObjectTemplateOrDie[*networkingv1.Ingress]("prometheus-ingress", prometheusIngressTemplateString)
	})
)

Functions

func ParseObjectTemplateOrDie

func ParseObjectTemplateOrDie[T runtime.Object](name, tmplString string) *assets.ObjectTemplate[T]

Types

type AccessChecker added in v1.15.0

type AccessChecker[T any] interface {
	Get() T
	Accessed() bool
}

func NewAccessChecker added in v1.15.0

func NewAccessChecker[T any](value T) AccessChecker[T]

type PrometheusRulesMap added in v1.15.0

type PrometheusRulesMap map[string]fileAccessChecker

func NewPrometheusRulesFromFS added in v1.15.0

func NewPrometheusRulesFromFS(filesystem embed.FS) (PrometheusRulesMap, error)

Jump to

Keyboard shortcuts

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