namespacelabeler

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Labeler

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

Labeler enables to enforce adding namespace labels to PrometheusRules and to metrics used in them

func New

func New(enforcedNsLabel string, excludeConfig []monitoringv1.PrometheusRuleExcludeConfig, prometheusRuleLabeler bool) *Labeler

New - creates new Labeler enforcedNsLabel - label name to be enforced for namespace excludeConfig - list of namespace + PrometheusRule names to be excluded while enforcing adding namespace label

func (*Labeler) EnforceNamespaceLabel

func (l *Labeler) EnforceNamespaceLabel(rule *monitoringv1.PrometheusRule) error

EnforceNamespaceLabel - adds(or modifies) namespace label to promRule labels with specified namespace and also adds namespace label to all the metrics used in promRule

Jump to

Keyboard shortcuts

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