loki-rule-operator

command module
v0.6.3 Latest Latest
Warning

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

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

README

Loki Rule Operator

Mounts and manages CRD provided rules to Loki Ruler Instances.

Description

Loki Rule Operator mounts rules provided by CRDs into loki ruler instances via a configMap. Loki ruler must be configured to use local storage. loki-ruler-operator-diagram.png

Installing

We provide a helm-chart with all CRDs and manifests necessary for running the loki-rule-operator:

helm repo add queroedu https://quero-edu.github.io/loki-rule-operator;

# provide values so the operator can find your loki deployment/rules path
helm upgrade loki-rule-operator queroedu/loki-rule-operator --install \
  --set lokiRuleOperator.lokiLabelSelector: "app.kubernetes.io/name=loki" \
  --set lokiRuleOperator.lokiNamespace: "default" \
  --set lokiRuleOperator.lokiRuleMountPath: "/etc/loki/rules"

Example

apiVersion: quero.com/v1alpha1
kind: LokiRule
metadata:
  name: lokirule-sample
spec:
  # rule groups should match the loki rule spec: https://grafana.com/docs/loki/latest/rules/
  groups:
    - name: my-rule-group
      rules:
        - alert: HighRequestLatency
          expr: rate({job="myjob"} |~ "request"[5m]) > 0.6
          for: 10m
          labels:
            severity: page
          annotations:
            summary: High request latency

Licensing

Loki rule operator is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=quero.com
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=quero.com
internal
pkg

Jump to

Keyboard shortcuts

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