Commit Graph

734 Commits

Author SHA1 Message Date
Łukasz Mierzwa
396ace2aa3 Merge pull request #231 from cloudflare/dep-prune
dep prune is depracated, drop it
2018-02-01 21:08:38 -08:00
Łukasz Mierzwa
4f5926d54f dep prune is depracated, drop it
dep will now run prune based on the Gopkg.toml settings, add a config for it and drop 'dep prune' from the Makefile
2018-01-31 22:07:30 -08:00
Łukasz Mierzwa
e590305b4a Merge pull request #226 from cloudflare/revert-travis-branch
Revert "Tell Travis CI to only build on pushes to the master branch"
v0.9.1
2018-01-28 22:37:49 -08:00
Łukasz Mierzwa
8a676c2c0a Revert "Tell Travis CI to only build on pushes to the master branch"
This reverts commit 15a8446588.

Limiting build branches to only master has a side effect of not triggering automatic release builds, revert it to Travis defaults since we want release branch jobs.
2018-01-28 22:14:50 -08:00
Łukasz Mierzwa
eabb4a2f46 Merge pull request #212 from cloudflare/bakelite
Use bakelite to cross-compile binaries on Travis
v0.9.0
2018-01-28 21:48:19 -08:00
Łukasz Mierzwa
061ffe3e60 Use bakelite to crosscompile binaries 2018-01-28 20:37:05 -08:00
Łukasz Mierzwa
78cbd104c9 Merge pull request #225 from cloudflare/file-uri-fix
Use decoded URI path partial for file paths
2018-01-27 15:15:48 -08:00
Łukasz Mierzwa
782b633f8c Fix error checking in file read tests 2018-01-27 09:57:19 -08:00
Łukasz Mierzwa
b8cf0a83f4 Correctly handle all types of file:// values
For absolute paths we correctly return full decoded path, but for relative paths we can't simply strip file:// prefix as it might leave query args in place. Build absolute path by joining working dir + hostname part + path part.
Add an extra test case for coverage.
2018-01-27 09:54:19 -08:00
Łukasz Mierzwa
fe1cdc9977 Merge pull request #224 from cloudflare/version
Add --version flag
2018-01-27 09:39:57 -08:00
Łukasz Mierzwa
193c6cf372 Drop duplicated pflag.Parse call 2018-01-26 18:21:57 -08:00
Łukasz Mierzwa
c1a4e30bbd Add --version flag
This is useful to get the version from the compiled binary without the need to run it
2018-01-26 18:21:40 -08:00
Łukasz Mierzwa
b88aa4a1c9 Merge pull request #223 from cloudflare/v04-fix-args
Drop the path from v0.4 query args
2018-01-26 09:26:08 -08:00
Łukasz Mierzwa
ded69c11ff Drop the path from v0.4 query args
This results in requests to 'GET http://localhost:9093/api/v1/silences?api/v1/silences?limit=2147483647' instead of 'GET http://localhost:9093/api/v1/silences?limit=2147483647'. Too much copy&paste.
2018-01-25 19:34:35 -08:00
Łukasz Mierzwa
37364741ac Merge pull request #222 from cloudflare/v04-silences
Allow passing query args to HTTP requests send to the Alertmanager API
2018-01-25 16:01:29 -08:00
Łukasz Mierzwa
0f73b20bc6 Allow passing query args to HTTP requests send to the Alertmanager API
Alertmanager 0.4.x silences endpoint uses pagination, code for this was incorrectly dropped in #216, re-add it. Requires a way for mapper packages to signal the need for passing query args to HTTP requests
2018-01-24 19:09:02 -08:00
Łukasz Mierzwa
3f8368b8c2 Merge pull request #220 from cloudflare/vendor-updates
Vendor updates
2018-01-24 17:10:31 -08:00
Łukasz Mierzwa
1d1b7a4acb Update nodejs dependencies
New release is around the corner, update vendored packages so we can test it before the cut
2018-01-24 17:00:28 -08:00
Łukasz Mierzwa
14b248de91 Update Go vendor packages
New release will be cut soon, update vendored packages before that to allow testing
2018-01-24 17:00:28 -08:00
Łukasz Mierzwa
a31b182e4d Merge pull request #221 from cloudflare/tls-fix
Too many 'T' in NewHTTTPTransport
2018-01-24 14:12:50 -08:00
Łukasz Mierzwa
60b1c696a3 Too many 'T' in NewHTTTPTransport 2018-01-24 13:04:27 -08:00
Łukasz Mierzwa
0d228d2def Merge pull request #207 from cloudflare/tls-auth
Add support for passing path to custom TLS CA cert & client key/cert …
2018-01-24 12:21:35 -08:00
Łukasz Mierzwa
a0cf3cc43c Add a JSON tag for ProxyRequests attr 2018-01-23 21:38:46 -08:00
Łukasz Mierzwa
49d1ed2e1e Pass HTTP transport to the proxy
When we proxy requests we should use same transport as we use when collecting alerts & silences
2018-01-23 21:37:56 -08:00
Łukasz Mierzwa
d5a7cb9ace Rename Transport interface to Reader 2018-01-23 19:40:24 -08:00
Łukasz Mierzwa
6f89a77f8d Rename 'transport' package to 'uri'
This package adds handlers for different URI schemes, name clashes with http.Transport which is now passed around. Rename it to make it more obvious what it does
2018-01-23 19:32:39 -08:00
Łukasz Mierzwa
338a4c38a6 Drop duplicated function
There's identical method on the Alertmanager instance that's being used
2018-01-23 19:22:50 -08:00
Łukasz Mierzwa
24335ebf1f Add support for passing path to custom TLS CA cert & client key/cert pair
This adds support for passing a custom http.RoundTripper so in effect we can customize TLS client config for HTTPS requests.
Fixes #184
2018-01-23 19:22:12 -08:00
Łukasz Mierzwa
90a517bc9a Merge pull request #216 from cloudflare/mapper-refactor
Mapper package refactoring
2018-01-22 11:39:19 -08:00
Łukasz Mierzwa
c7fb8db98d Drop Release() from SilenceMapper
Not used
2018-01-22 11:26:36 -08:00
Łukasz Mierzwa
1f89ba05fe Migrate rest of the code to new mapper and transport packages 2018-01-22 11:26:36 -08:00
Łukasz Mierzwa
6124196b0f Finish refactoring mapper package
Fix bugs, add docstrings and let each mapper give us full url since it doesn't handle any http requests now (it just maps text to objects now)
2018-01-22 11:26:36 -08:00
Łukasz Mierzwa
2cf9253d3c Refactor transport package
With this change we'll initialize Transport object for each Alertmanager and just call Read() on it when we need to use this transport to read from upstream Alertmanager
2018-01-22 11:26:35 -08:00
Łukasz Mierzwa
0b30a23c2a Refactor mapper package responsibilities
Mapper should only take input, decode it and map onto internal model instances
2018-01-22 11:26:35 -08:00
Łukasz Mierzwa
1981898bd0 Merge pull request #218 from cloudflare/travis-build-only-master
Tell Travis CI to only build on pushes to the master branch
2018-01-21 17:47:08 -08:00
Łukasz Mierzwa
15a8446588 Tell Travis CI to only build on pushes to the master branch
I've noticed that Travis runs 2 builds for each open PR, that's because one build is triggered on push to a branch and another on opening  the PR. It's possible to disable both triggers in Travis web UI but both option are desired, it's just that the push trigger should only fire on a push to the master so that we always run a build after any merge

See travis-ci/travis-ci#1147 for details
2018-01-21 17:35:12 -08:00
Łukasz Mierzwa
ab62379846 Merge pull request #217 from cloudflare/slim-travis
Make .travis.yml more DRY
2018-01-21 17:33:34 -08:00
Łukasz Mierzwa
fafe6d7bf1 Move lint docs stage closer to other lint stages 2018-01-20 23:19:58 -08:00
Łukasz Mierzwa
4fb7afa0bb Use 'generic' language for docker stage 2018-01-20 23:08:01 -08:00
Łukasz Mierzwa
33f5d91044 Drop go_import_path from .travis.yml
Travis linter doesn't recognize this key and it's a global, which makes no sense with stages and anchors
2018-01-20 23:07:35 -08:00
Łukasz Mierzwa
a01cfd0f95 Use YAML anchors to deduplicate common stage variables 2018-01-20 23:05:44 -08:00
Łukasz Mierzwa
28e656fb48 Merge pull request #215 from cloudflare/markdown-lint
Markdown linter
2018-01-20 18:00:06 -08:00
Łukasz Mierzwa
68d58a24c1 Fix docs issues found by markdown linter 2018-01-20 13:10:31 -08:00
Łukasz Mierzwa
25e796f2ac Add a make target and Travis CI stage for linting docs
Nobody wants borked markdown syntax in docs
2018-01-20 12:54:45 -08:00
Łukasz Mierzwa
764ccc2147 Merge pull request #214 from cloudflare/setup-proxy-via-env
Add a 'simplified mode' for configuration that can be used with only …
2018-01-15 16:58:33 -08:00
Łukasz Mierzwa
36178ee1ba Add a 'simplified mode' for configuration that can be used with only one Alertmanager instance 2018-01-14 21:15:43 -08:00
Łukasz Mierzwa
63a0799263 Merge pull request #211 from cloudflare/am-0.13.0
Add Alertmanager 0.13.0 mock resposes for testing
2018-01-13 11:13:31 -08:00
Łukasz Mierzwa
c7a1c9b865 Add Alertmanager 0.13.0 mock resposes for testing
0.13.0 was released, add it to the list of tested versions
2018-01-12 15:47:38 -08:00
Łukasz Mierzwa
cfdd38c312 Merge pull request #209 from cloudflare/update-package-lock
Update package-lock.json using latest LTS nodejs/npm
2018-01-08 17:47:53 -08:00
Łukasz Mierzwa
4584a046ea Update package-lock.json using latest LTS nodejs/npm
This adds optional deps that only work on OSX back to the lock file, previous npm versions were only adding it when run on OSX, now that it's fixed we should update the lock file so it doesn't show any diff when working on OSX
2018-01-08 16:25:19 -08:00