mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-06 17:57:51 +00:00
Adds Support for Cross-Namespace Metrics
This commit is contained in:
parent
03bc47e9fb
commit
718cb2400e
4 changed files with 51 additions and 5 deletions
|
|
@ -38,6 +38,9 @@ type DiscoveryRule struct {
|
|||
// `.GroupBy` is the comma-separated expected group-by label names. The delimeters
|
||||
// are `<<` and `>>`.
|
||||
MetricsQuery string `yaml:"metricsQuery,omitempty"`
|
||||
// Options specifies additional parameters that are taken into account
|
||||
// when configuring a rule. These can be used to fine-tune the retrieval of metrics
|
||||
Options Options `yaml:"options,omitempty"`
|
||||
}
|
||||
|
||||
// RegexFilter is a filter that matches positively or negatively against a regex.
|
||||
|
|
@ -80,6 +83,13 @@ type NameMapping struct {
|
|||
As string `yaml:"as"`
|
||||
}
|
||||
|
||||
// Option describes a set of customisations for retrieving metrics
|
||||
type Options struct {
|
||||
// option to allow cross-namespace metrics. Used to determine whether to
|
||||
// append the namespace as a label selector when retrieving metrics
|
||||
DetatchFromNamespace bool `yaml:"detachFromNamespace,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceRules describe the rules for querying resource metrics
|
||||
// API results. It's assumed that the same metrics can be used
|
||||
// to aggregate across different resources.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue