Commit graph

11 commits

Author SHA1 Message Date
Olivier Lemasle
0ea1c1b8d3 Use Golangci-lint 2022-11-28 23:17:16 +01:00
lokichoggio
df3080de31
fix: close file 2022-04-11 17:54:51 +08: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
1cc7bed020
pkg/config: allow configuration to be read from json schema 2021-02-22 10:17:27 +01:00
Solly Ross
c2e176bb23
Merge pull request #158 from linux-on-ibm-z/cross-compile
Edited Makefile to add cross build support for s390x.

Adding External Metrics Provider
2019-02-10 15:59:11 -05:00
Tiago Matias
2e82759ca9 fix typos
revert from less ideal wording

more typos
2018-11-20 10:09:02 -02:00
Solly Ross
c5801455ec Introduce support for the resource metrics API
This introduces support for the resource metrics in the adapter.
The individual queries and window sizes are fully customizable via a new
config section.  This uses just the generic machinery from
metrics-server to serve the API.
2018-10-03 11:05:43 -04:00
Tanner Bruce
1ec7809eaf use strict unmarshalling to ensure correct configuration 2018-08-09 16:30:06 -05:00
Solly Ross
40a9ee2474 Add a helper to generate legacy configuration
This moves the DefaultConfig method out into a helper to generate legacy
configuration.  Passing in a config file is now required.
2018-06-27 16:56:20 -04:00
Solly Ross
2984604be8 Advanced Configuration
This commit introduces advanced configuration.  The rate-interval and
label-prefix flags are removed, and replaced by a configuration file
that allows you to specify series queries and the rules for transforming
those into metrics queries and API resources.
2018-06-22 15:37:12 -04:00