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
Click to show internal directories.
Click to hide internal directories.