Andy Bursavich
69ae2d1210
pkg/custom-provider: update expected test queries
2024-08-13 12:36:44 -07:00
Andy Bursavich
7d895374b0
pkg/naming: shorten regexp when matching many similar names
2024-07-25 18:24:22 -07:00
Olivier Lemasle
0ea1c1b8d3
Use Golangci-lint
2022-11-28 23:17:16 +01:00
Damien Grisonnet
4eb6c313a1
go.mod: update custom-metrics-apiserver to v1.22.0
...
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-11 13:56:45 +02: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
c0ae5d6dd4
fix tests
2021-04-23 11:39:47 -06:00
Carson Anderson
fa5f8cd742
Add requested fixes
2021-04-23 11:27:38 -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
Sergiusz Urbaniak
752ce84723
cmd/*,pkg/*,docs,go.mod: bump custom-metrics-apiserver, metrics-server
2020-10-28 15:52:12 +01:00
Sergiusz Urbaniak
a858d53495
pkg/*,cmd/*: move to k8s.io/klog/v2
2020-10-28 15:48:05 +01:00
Sergii Koshel
d091fff18b
Update metrics apiserver to support filtering by labels
2020-02-12 17:54:40 +02:00
paulfantom
e84becd7ac
pkg/names: test namespaced external metrics selectors
2019-05-17 15:35:04 +02:00
Sergiusz Urbaniak
486324753e
pkg/naming/BuildExternal: respect namespace
...
Currently, the namespace is ignored for external labels.
This fixes it.
2019-05-17 15:02:57 +02:00
paulfantom
2374cef641
pkg/naming: fix unit test
2019-05-17 14:36:02 +02:00
paulfantom
0d5c3ebd04
pkg/naming: add unit tests
2019-05-17 11:47:29 +02:00
Sergiusz Urbaniak
9e072b2b57
pkg/naming: fix LabelValuesByName rendering
...
According to documentation LabelValuesByName is supposed to render "|" separated values.
Currently it is returned as a slice per label name. This fixes it
Fixes #191
2019-05-07 14:04:29 +02:00
Sergiusz Urbaniak
f18b6fd370
*: replace glog with klog
2019-04-24 11:04:42 +02:00
Jens Ulrich Hjuler Pedersen
113f90ec5e
Remove unnecessary log line - Fix #188
2019-04-24 10:03:35 +02:00
Sergiusz Urbaniak
d447eb1ec2
pkg/naming: add non-namespace resources
...
This is a merge commit back-porting PR #179
2019-03-28 21:04:42 -04: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
Solly Ross
74c0c53e4f
Refactor metrics query building to interface
...
This moves the metrics query building to a separate interface in the
naming package so that it can be used across providers.
2018-10-03 11:05:43 -04:00
Solly Ross
7dd9e94aea
Extract label-resource logic to separate package
...
This extracts the label-to-resource conversion to a separte "naming" package for
use across different providers.
Early versions of the commit were done by antoinne85 in #79 .
2018-10-02 16:57:55 -04:00