86 Commits

Author SHA1 Message Date
Mikkel Oscar Lyderik Larsen
a72380125f Update SECURITY.md (#84)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
v0.0.4
2019-10-22 16:11:29 +02:00
aermakov-zalando
70c7fb843d
Merge pull request #83 from zalando-incubator/ingress-collector
Skipper: simplify metrics collection
2019-10-22 16:07:49 +02:00
Alexey Ermakov
79533a5a93 Skipper: simplify metrics collection
* Drop MaxWeightedCollector (we don't want max anyway, we want sum)
 * Use Prometheus to add up all matching metrics and scale them; this
   has a nice side effect of ensuring that unused hostnames don't cause
   an error when collecting the metrics
 * Update the tests a bit

Signed-off-by: Alexey Ermakov <alexey.ermakov@zalando.de>
2019-10-21 14:05:30 +02:00
Mikkel Oscar Lyderik Larsen
2765ff9811
Merge pull request #68 from zalando-incubator/skipper-collector-averagevalue
Add support for averageValue for request-per-second Skipper metric
2019-10-10 08:09:30 +02:00
Mikkel Oscar Lyderik Larsen
76d2f74743
Add support for averageValue for request-per-second Skipper metric
This adds support for `averageValue` for the `request-per-second` metric
based on Ingress Objects. This is only supported from Kubernetes
`>=v1.14` (https://github.com/kubernetes/kubernetes/pull/72872).

When defining the HPA with `autoscaling/v2beta1` you still need to
define `targetValue` even though it won't be used when `averageValue` is
set. Once we default to `autoscaling/v2beta2` this akward API will be
gone.

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-10-08 17:10:28 +02:00
Mikkel Oscar Lyderik Larsen
0de5042d3d Update dependencies (#80)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-10-08 16:20:47 +02:00
aermakov-zalando
07c0e179b3 Fail on dirty and/or non-exact versions on master (#79)
* Fail on dirty and/or non-exact versions on master

Signed-off-by: Alexey Ermakov <alexey.ermakov@zalando.de>

* Prevent go from modifying go.mod

Signed-off-by: Alexey Ermakov <alexey.ermakov@zalando.de>

* Fix go.mod version

Signed-off-by: Alexey Ermakov <alexey.ermakov@zalando.de>

* Allow non-exact tag matches

Signed-off-by: Alexey Ermakov <alexey.ermakov@zalando.de>
v0.0.3
2019-10-01 11:54:37 +02:00
aermakov-zalando
29ee953a16
Merge pull request #78 from zalando-incubator/return-err
When traffic switching is used, require a backend for the RPS metric
2019-09-27 17:56:35 +02:00
Alexey Ermakov
f78ef26857 When traffic switching is used, require a backend for the RPS metric
Signed-off-by: Alexey Ermakov <alexey.ermakov@zalando.de>
2019-09-27 15:02:46 +02:00
Mikkel Oscar Lyderik Larsen
a3c14e9dcb
Merge pull request #76 from zalando-incubator/refactor-parsing
Prevent panic when parsing HPAs
2019-08-23 09:08:07 +02:00
Mikkel Oscar Lyderik Larsen
b6b13fb31a
Prevent panic when parsing HPAs
This is a slight refactoring/unification of how metric
labels/annotations are parsed and handled accross collectors. This is
done to prevent crashes when labels are not defined on external metrics.

Fix #69

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-08-22 08:09:28 +02:00
Mikkel Oscar Lyderik Larsen
0a06691d39
Merge pull request #75 from edganiukov/master
collector/prometheus: add Prometheus URL (optional) as an annotation in HPA
2019-08-21 09:55:10 +02:00
Eduard Ganiukov
2d1d51e829
collector/prometheus: add prometheus server (optional) as an annotation in HPA.
Signed-off-by: Eduard Ganiukov <eduard.ganiukov@swisscom.com>
2019-08-14 13:05:50 +02:00
aermakov-zalando
41761e62df
Merge pull request #71 from zalando-incubator/fix-rps-test
Skipper: fix the no annotation test so it makes more sense
v0.0.2
2019-07-30 17:57:11 +02:00
Alexey Ermakov
ed4c93abbb Skipper: fix the no annotation test so it makes more sense
Signed-off-by: Alexey Ermakov <alexey.ermakov@zalando.de>
2019-07-30 17:50:39 +02:00
aermakov-zalando
b2194ca136 Correctly handle zero-weight backends (#70)
Signed-off-by: Alexey Ermakov <alexey.ermakov@zalando.de>
2019-07-30 17:32:36 +02:00
Mikkel Oscar Lyderik Larsen
bd0dd10e72 Use proper tags for docker images (#66)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
v0.0.1
2019-07-26 20:36:03 +02:00
Mikkel Oscar Lyderik Larsen
461869c69b Fix response on no metrics found (#67)
Fixes the response from `GetMetricsBySelector` in case no metrics are
found. This issue caused a panic in kube-controller-manager:
https://github.com/kubernetes/kubernetes/pull/80392

Fix #40

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-07-26 20:35:17 +02:00
Mikkel Oscar Lyderik Larsen
9950851cad
Merge pull request #64 from zalando-incubator/v2beta1-conversion
Support autoscaling v2beta1
2019-07-26 19:27:31 +02:00
Mikkel Oscar Lyderik Larsen
d85fee795e
Don't import v2beta2 twice
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-07-21 12:36:32 +02:00
Mikkel Oscar Lyderik Larsen
990f8eab14
Ignore files with upstream code
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-07-21 12:11:59 +02:00
Mikkel Oscar Lyderik Larsen
9a396bde68
Support autoscaling v2beta1
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-07-21 11:22:55 +02:00
Mikkel Oscar Lyderik Larsen
aa8d24dbcf
Merge pull request #63 from zalando-incubator/document-pod-https
Document how to use HTTPS for pod collector
2019-07-15 09:09:39 +02:00
Arjun Naik
19e9be9671 Document how to use HTTPS for pod collector
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-07-14 15:49:00 +02:00
Mikkel Oscar Lyderik Larsen
8fed8538ad
Merge pull request #53 from zalando-incubator/prometheus-external-metric
Allow Prometheus metrics for External target
2019-05-19 23:19:29 +02:00
Sandor Szücs
9a234cbdac
add AWS IAM policy as requirement to integrate with AWS SQS (#58)
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2019-05-17 11:07:18 +02:00
Mikkel Oscar Lyderik Larsen
ffff8c2040 Prevent leaking collectors when HPA gets updated (#54)
* Prevent leaking collectors when HPA gets updated

This fixes an issue where collectors would be leaking when HPAs are
getting updated.

Fix this by stopping the collector started for the previous version of
the HPA.

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>

* Add tests to verify old collector is removed

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-05-08 10:34:49 +02:00
Mikkel Oscar Lyderik Larsen
9d2760e3fc
Allow Prometheus metrics for External target
Fix #45

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-04-30 23:22:18 +02:00
Mikkel Oscar Lyderik Larsen
5598b4d012
Merge pull request #52 from zalando-incubator/fix/golangci-lint-errors
Fix all errors from golangci-lint command
2019-04-27 16:11:35 +02:00
Arjun Naik
888e76b748 Fix all errors from golangci-lint command
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-04-27 15:54:15 +02:00
Arjun
7c848a1282
Max collector should ignore only no result errors (#50)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-04-27 14:54:20 +02:00
Arjun
445c7c874a
Added golangci linter (#51)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-04-27 13:35:55 +02:00
Arjun
2eed3e64d0
Return a value when atleast one of the metrics returns a value (#47)
* Return a value when atleast one of the metrics returns a value

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>

* Added test for max weighted collector

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-04-26 17:54:25 +02:00
Mikkel Oscar Lyderik Larsen
f097e63401 Add build cache for CDP build (#49)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-04-26 16:47:00 +02:00
Mikkel Oscar Lyderik Larsen
ca4e2008c4
Merge pull request #48 from zalando-incubator/fix-config-key
Remove unused Configuration key from MetricConfig
2019-04-26 16:34:48 +02:00
Mikkel Oscar Lyderik Larsen
3f019a1ceb
Remove unused Configuration key from MetricConfig
This fixes an issue of setting up a ZMON collector where the incorrect
key `Configuration` was used, which was not initialized in the metrics
config parser. The `Config` key is the right one to use.

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-04-26 16:19:53 +02:00
Arjun
5a6f4997bd
Add the labels from the zmon check into the config object (#46)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-04-18 13:34:11 +02:00
Arjun
8db22f38a3
Fixed metric labels so that metric are tagged correct. Also added nil check (#44)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-04-05 16:05:37 +02:00
Mikkel Oscar Lyderik Larsen
d5b803d923
Merge pull request #43 from zalando-incubator/fix/panic
Fix nil dereference panics for the Annotation config parser
2019-04-04 15:00:46 +02:00
Arjun Naik
14f13495af Fix nil dereference panics
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-04-04 10:57:08 +02:00
Arjun
dfeae82cae Upgrade all pacakges to autoscalingv2beta2 (#39)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-04-03 10:23:52 +02:00
Arjun
04b212175e
Added clarification of dummy-pod (#42)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-03-25 16:15:54 +01:00
Arjun
478c97d5cb
Added instructions on configuring adapter to collect ingress metrics (#34)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-02-24 21:03:55 +01:00
Arjun
f4efa2898b
Handle condition when backend weights only sometimes present (#33)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-02-01 10:59:42 +01:00
Mikkel Oscar Lyderik Larsen
7258cb7800
Merge pull request #31 from zalando-incubator/fix/no-backend
Fix case when backend is not set
2019-01-23 11:44:54 +01:00
Arjun Naik
56dd8b52e0 Fix case when backend is not set
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-01-23 11:36:09 +01:00
Arjun
248acf0311
Added logic and test case for weight of backend is 0 (#29)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-01-18 17:39:01 +01:00
Arjun
75633d3082
Changed request-per-second metric separator to a comma (#28)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-01-17 13:46:57 +01:00
Arjun
72aa672f51
Added weighting of RPS metrics based on backend weights (#27)
* Added weighting of rps metrics based on backend weights

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>

* Updated documented with instructions on how to use the backend weighting

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>

* Changed separator for RPS metric and added flag to specify backend weights annotation.

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>

* Allow for multiple backends with for weighting.

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-01-17 13:13:52 +01:00
Çağdaş Şenol
f49f7821dc Fix json serialization naming for zmon queries (#25)
Signed-off-by: Cagdas Senol <cagdas.senol@zalando.de>
2019-01-08 16:24:46 +01:00