alerts

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetricsService added in v1.8.0

func NewMetricsService(namespace string, owner metav1.OwnerReference) *corev1.Service

func NewPrometheusRuleSpec

func NewPrometheusRuleSpec() *monitoringv1.PrometheusRuleSpec

NewPrometheusRuleSpec creates PrometheusRuleSpec for alert rules

func NewServiceMonitor added in v1.8.0

func NewServiceMonitor(namespace string, owner metav1.OwnerReference) *monitoringv1.ServiceMonitor

Types

type AlertRuleReconciler

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

func (*AlertRuleReconciler) EmptyObject added in v1.8.0

func (r *AlertRuleReconciler) EmptyObject() client.Object

func (*AlertRuleReconciler) GetFullResource added in v1.8.0

func (r *AlertRuleReconciler) GetFullResource() client.Object

func (*AlertRuleReconciler) Kind added in v1.8.0

func (r *AlertRuleReconciler) Kind() string

func (*AlertRuleReconciler) ResourceName added in v1.8.0

func (r *AlertRuleReconciler) ResourceName() string

func (*AlertRuleReconciler) UpdateExistingResource added in v1.8.0

func (r *AlertRuleReconciler) UpdateExistingResource(ctx context.Context, cl client.Client, existing client.Object, logger logr.Logger) (client.Object, bool, error)

type MetricReconciler added in v1.8.0

type MetricReconciler interface {
	Kind() string
	ResourceName() string
	GetFullResource() client.Object
	EmptyObject() client.Object
	UpdateExistingResource(context.Context, client.Client, client.Object, logr.Logger) (client.Object, bool, error)
}

type MonitoringReconciler added in v1.8.0

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

func NewMonitoringReconciler added in v1.8.0

func NewMonitoringReconciler(ci hcoutil.ClusterInfo, cl client.Client, ee hcoutil.EventEmitter, scheme *runtime.Scheme) *MonitoringReconciler

func (*MonitoringReconciler) Reconcile added in v1.8.0

func (r *MonitoringReconciler) Reconcile(req *common.HcoRequest, firstLoop bool) error

func (*MonitoringReconciler) ReconcileOneResource added in v1.8.0

func (r *MonitoringReconciler) ReconcileOneResource(req *common.HcoRequest, reconciler MetricReconciler, firstLoop bool) (client.Object, error)

func (*MonitoringReconciler) UpdateRelatedObjects added in v1.8.0

func (r *MonitoringReconciler) UpdateRelatedObjects(req *common.HcoRequest) error

type RoleBindingReconciler added in v1.8.0

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

RoleBindingReconciler maintains an RBAC RoleBinding to allow Prometheus operator to read from HCO metric

func (*RoleBindingReconciler) EmptyObject added in v1.8.0

func (r *RoleBindingReconciler) EmptyObject() client.Object

func (*RoleBindingReconciler) GetFullResource added in v1.8.0

func (r *RoleBindingReconciler) GetFullResource() client.Object

func (*RoleBindingReconciler) Kind added in v1.8.0

func (r *RoleBindingReconciler) Kind() string

func (*RoleBindingReconciler) ResourceName added in v1.8.0

func (r *RoleBindingReconciler) ResourceName() string

func (*RoleBindingReconciler) UpdateExistingResource added in v1.8.0

func (r *RoleBindingReconciler) UpdateExistingResource(ctx context.Context, cl client.Client, resource client.Object, logger logr.Logger) (client.Object, bool, error)

type RoleReconciler added in v1.8.0

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

RoleReconciler maintains an RBAC Role to allow Prometheus operator to read from HCO metric

func (*RoleReconciler) EmptyObject added in v1.8.0

func (r *RoleReconciler) EmptyObject() client.Object

func (*RoleReconciler) GetFullResource added in v1.8.0

func (r *RoleReconciler) GetFullResource() client.Object

func (*RoleReconciler) Kind added in v1.8.0

func (r *RoleReconciler) Kind() string

func (*RoleReconciler) ResourceName added in v1.8.0

func (r *RoleReconciler) ResourceName() string

func (*RoleReconciler) UpdateExistingResource added in v1.8.0

func (r *RoleReconciler) UpdateExistingResource(ctx context.Context, cl client.Client, resource client.Object, logger logr.Logger) (client.Object, bool, error)

Jump to

Keyboard shortcuts

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