controller

package
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 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ClusterName is the name of the cluster and use as the first part of the
	// Namespace of RuleNamespace in Mimir
	ClusterName string
	// PodName is the name of the pod running the controller.
	PodName string
	// PodNamespace is the namespace of the pod running the controller.
	PodNamespace string
	// LeaseLockName is the name of the lease lock.
	LeaseLockName string
	// LeaseLockNamespace is the namespace of the lease lock.
	LeaseLockNamespace string
	// contains filtered or unexported fields
}

Config is the configuration for the controller.

func (*Config) Identity

func (c *Config) Identity() string

Identity returns the identity of the controller.

type Controller

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

Controller is the controller implementation for Rule resources

func NewController

func NewController(
	config Config,
	kubeclientset kubernetes.Interface,
	rulesclientset clientset.Interface,
	mimirclient *client.MimirClient,
	ruleinformer informers.MimirRuleInformer,
	reg *prometheus.Registry) *Controller

NewController returns a new rules controller.

func (*Controller) Run

func (c *Controller) Run(ctx context.Context, threadiness int) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until ctx is cancelled, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

Jump to

Keyboard shortcuts

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