43 Commits

Author SHA1 Message Date
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
Mikkel Oscar Lyderik Larsen
0da71f7702 Update aws-sdk-go version to be compatible with kube-aws-iam-controller (#22)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-12-15 20:57:41 +01:00
Muaaz Saleem
67ac2092f5
Look at total replicas instead of readyReplicas (#21)
* Look at total replicas instead of readyReplicas

In cases where replicas take a bit of time to get ready, the Stackset Controller just keeps on scaling. To avoid this issue,
using the total replicas instead of replicas that are ready.

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>

* Fix bitbucket clones

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

* Updating .gitignore

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>

* Fixing Typo

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>

* Adding tests to avoid regression

Testing that collectors depend on Resource.Status.Replicas and not
Resource.Status.ReadyReplicas

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-12-11 14:39:34 +01:00
Mikkel Oscar Lyderik Larsen
4566d1aa03
Merge pull request #18 from zalando-incubator/rbac
Fix RBAC configuration
2018-12-08 14:34:58 +01:00
Mikkel Oscar Lyderik Larsen
e80b5fe6b0
Fix RBAC configuration
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-12-07 20:54:17 +01:00
Mikkel Oscar Lyderik Larsen
6b8468d2ec
Merge pull request #14 from zalando-incubator/unit-tests
Adding Unit tests to metric_store.go
2018-11-22 16:57:42 +01:00
Muhammad Muaaz Saleem
e3ee745777 Testing multiple metrics inserts with different Group/Resources/Namesapces
Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-22 16:36:51 +01:00
Muhammad Muaaz Saleem
28b3b3b2b7 Testing inserting multiple external metric values
Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-21 18:04:55 +01:00
Muhammad Muaaz Saleem
be9b85c3cc Test errors in metric_store.go
Adding tests for error cases in metric_store.go. This will primarily
protect against regression.

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-21 17:28:00 +01:00
Mikkel Oscar Lyderik Larsen
ee3cece2a6
Merge pull request #15 from zalando-incubator/skip-resource-types
Skipper metrics collection for resource types
2018-11-21 16:42:13 +01:00
Arjun Naik
8492832baa Skipper metrics collection for resource types
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2018-11-21 15:16:26 +01:00
Muhammad Muaaz Saleem
d50771094a Making metrics TTL configurable per instance of metric store
Avoiding the global var and making metrics TTL configurable per
metric store

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-20 16:34:17 +01:00
Muhammad Muaaz Saleem
553f8b5993 Testing that metrics with TTL > now are not removed
This test mostly serves as protection against regression

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-20 11:00:13 +01:00
Muhammad Muaaz Saleem
b1745c5eed Making TTL configurable, at least globally
Making metrics expiration TTL configurable globally configurable.
This is so RemoveExpired can be tested. Not making the TTL configurable
per metric yet because it could change behaviour in production.

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-20 10:34:44 +01:00
Muhammad Muaaz Saleem
49cdca4c68 Testing expired metrics' removal
Testing that metrics get removed once expired. Tests are failing
because metric.TTL isn't configurable at the moment

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-19 23:28:06 +01:00
Muhammad Muaaz Saleem
7c8c239d18 Testing External Metrics Storage
Added a testcase for insert/list/get an external metric

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-19 15:57:51 +01:00
Muhammad Muaaz Saleem
fb1a08195d Testing GetMetricsBySelector
Adding test cases to get metrics by label selector

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-19 14:55:35 +01:00
Muhammad Muaaz Saleem
669eb2b441 Making the tests table driven
Adding test cases to insert/list/get a namespaced and a non-namespaced
resource metric

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-19 14:10:21 +01:00
Muhammad Muaaz Saleem
7e247ce0d4 Adding a basic test for the metricStore
Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-15 18:05:52 +01:00
Muaaz Saleem
217bf900a0
Adding test coverage (#13)
* Adding test coverage through coverall

Adding test coverage through coverall so we can see the current state of
test coverage

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>

* Fix go.sum for go 1.11.2

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

* Trying to make travis use go 1.11.2

Since go.mod and go.sum files don't seem to be compatible between
go1.11.1, trying to make travis use go 1.11.2

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-14 11:02:53 +01:00
Mikkel Oscar Lyderik Larsen
c86a82ca88 Simple ZMON collector implementation (#2)
* Simple ZMON collector implementation

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

* Add tests for ZMON client

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

* Add tests for zmon collector

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

* Update ZMON collector docs

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

* Expose tags instead of entities for queries

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

* Remove unused function

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-10-29 14:26:25 +01:00
Nick Jüttner
b18acf3ed0 Adding event recorder and replace glog (#12)
Signed-off-by: Nick Jüttner <nick@zalando.de>
2018-10-24 17:27:30 +02:00
Martin Linkhorst
3e7b8ba964 Expose basic go metrics via prometheus (#11)
* feat: expose basic go metrics via prometheus

Signed-off-by: Martin Linkhorst <martin.linkhorst@zalando.de>

* feat: expose basic counter of successful and failed collections and updates

Signed-off-by: Martin Linkhorst <martin.linkhorst@zalando.de>
2018-10-19 13:40:31 +02:00
Arjun
d263e9cc49
Merge pull request #10 from zalando-incubator/rename-module
Rename module path from mikkeloscar -> zalando-incubator
2018-10-14 11:43:01 +02:00
Mikkel Oscar Lyderik Larsen
1daacb0873
Rename module path from mikkeloscar -> zalando-incubator
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-10-14 11:37:58 +02:00
Arjun
e44c3b3ada
Merge pull request #9 from zalando-incubator/update-contributors
Removed contributors placeholder.
2018-10-12 11:33:19 +02:00
Arjun Naik
3f248d611a Removed contributors placeholder.
Signed-off-by: Arjun Naik <arjun.naik@zalando.de>
2018-10-12 10:00:56 +02:00
Mikkel Oscar Lyderik Larsen
845a1b14ed
Merge pull request #8 from zalando-incubator/travis-badge-fix
travis-ci.org instead of travis-ci.com
2018-10-09 13:28:00 +02:00
Mikkel Oscar Lyderik Larsen
7534702d02
travis-ci.org instead of travis-ci.com
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-10-09 13:23:50 +02:00
Mikkel Oscar Lyderik Larsen
653c0073a5
Merge pull request #7 from zalando-incubator/travis-badge
Update travis badge to point to the right repo
2018-10-09 13:11:43 +02:00
Mikkel Oscar Lyderik Larsen
b0d789d0fe
Update travis badge to point to the right repo
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-10-09 11:15:36 +02:00
Arjun
d6959cfa1e
Merge pull request #3 from zalando-incubator/cdp-build
Add delivery.yaml
2018-10-09 10:21:31 +02:00
Arjun
c8cb23b1c6
Merge pull request #4 from zalando-incubator/zappr
Add .zappr.yaml config
2018-10-09 10:20:50 +02:00
Mikkel Oscar Lyderik Larsen
f729fb0d19
Add .zappr.yaml config
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-10-08 20:48:22 +02:00
Mikkel Oscar Lyderik Larsen
1379293ae9
Add delivery.yaml
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-10-08 18:12:30 +02:00
Per Ploug
3db0cc3135 Adding boilerplate files
Signed-off-by: Per Ploug <per.ploug@zalando.de>
2018-10-08 13:17:05 +02:00
Per Ploug
e9b677605a
Initial commit 2018-10-08 13:16:59 +02:00