mimir-rules-controller

module
v0.0.0-...-50dd82c Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT

README

Mimir Rules Controller

Kubernetes controller for managing Mimir rules as Kubernetes resources. This controller heavily inspired by Prometheus Operator and Thanos Rule Controller.

Installation

Use the package manager helm to install Mimir Rules Controller. You need to specify the address of your mimir installation and cluster name.

helm install --set mimir.address=mimir.example.com --set mimir.clusterName=example-cluster mimir-rules-controller ./deployments/charts/mimir-rules-controller 

That will install CRDs and the controller itself.

Usage

To add rules or alerts for Mimir using the controller, you need to create a custom resource in a cluster with the installed controller:

apiVersion: rulescontroller.k8s.healthjoy.com/v1alpha1
kind: MimirRule
metadata:
    name: example-mimirrule
    namespace: default
spec:
    groups:
    - name: example-mimirrule
      rules:
      - alert: example-mimirrule
        expr: 1
        for: 1m
        labels:
            severity: critical
        annotations:
            summary: example-mimirrule
            description: example-mimirrule

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Directories

Path Synopsis
cmd
pkg
generated/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
generated/clientset/versioned/typed/rulescontroller/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
generated/clientset/versioned/typed/rulescontroller/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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