Commit graph

10 commits

Author SHA1 Message Date
Olivier Lemasle
0ea1c1b8d3 Use Golangci-lint 2022-11-28 23:17:16 +01:00
Damien Grisonnet
9dfbca09ca go.mod: move to sigs.k8s.io golang package
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-06-01 17:35:45 +02:00
Carson Anderson
6c1d85ccf9 Split ExternalMetricsQuery and MetricsQuery funcs 2021-05-11 14:49:11 -06:00
Carson Anderson
510c3724ce Add docs, tests, and move namespaced to metricsQuery 2021-04-08 11:07:50 -06:00
Carson Anderson
3ae38c7417 Allow metrics to be defined as namespaced: false
When set to false, no namespace label will be set by the adapter based on the namespace
portion of the url in the request path.

This allows individual consumers to set namespace independent of the source kubernetes resource.

---

Example:

Given an adapter config like this:

```
    externalRules:
    - seriesQuery: 'nsq_topic_depth'
      resources:
        namespaced: false
```

An HPA could target a different namespace by setting it in the selector:

```
  - type: External
    external:
      metric:
        name: nsq_topic_depth
        selector:
          labelSelector:
            topic: my-topic
            namespace: nsq
```

This is useful for scaling on metrics from services that run in a differnt namespace than the source resource.
2021-03-05 15:25:37 -07:00
paulfantom
cd55a67b89
*: move all imports to github.com/kubernetes-sigs/prometheus-adapter
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-22 15:49:03 +01:00
Sergii Koshel
d091fff18b Update metrics apiserver to support filtering by labels 2020-02-12 17:54:40 +02:00
John Delivuk
ff409a0994
Refactoring external to leverage naming 2019-03-26 18:57:02 -04:00
John Delivuk
0bb762b367
Adding license to externalprovider and naming. 2019-02-22 10:29:24 -05:00
John Delivuk
6030912cc0
Moving metric naming to it's own package 2019-02-10 15:59:14 -05:00
Renamed from pkg/custom-provider/metric_namer.go (Browse further)