Commit Graph
741 Commits
Author SHA1 Message Date
Łukasz Mierzwa 4debfd3560 Save space between alert groups 2018-04-19 09:17:18 -07:00
Łukasz Mierzwa dc58c26b90 Fix silence borders
There's an extra layer of transparent border and padding makes the green side to be missing a few pixels, correct that
2018-04-19 09:17:18 -07:00
Łukasz Mierzwa f5c91f48da Add CODEOWNERS file
CODEOWNERS allows github to automatically require code review from the right set of people. Start with defaulting to myself for all files
2018-04-19 09:17:18 -07:00
Łukasz Mierzwa 131e8e2c93 Comment out dead condition 2018-04-19 09:17:18 -07:00
Łukasz Mierzwa 62555df1b0 Use the correct variable in tests
'es.JiraURL == es.JiraURL' is always true, it should compare es with gs. Fix it and reformat for readability
2018-04-19 09:17:18 -07:00
Łukasz Mierzwa 93c0fbe284 Upgrade moment to >2.19.3
CVE-2017-18214 affects <2.19.3, fixes #244
2018-04-19 09:17:18 -07:00
Łukasz Mierzwa 286f0f59ff Use Go 1.10
Use Go 1.10 when testing/releasing on Travis and building docker images
2018-04-19 09:17:18 -07:00
Łukasz Mierzwa e17018339a Add mock files for Alertmanager 0.14.0 2018-04-19 09:17:18 -07:00
Łukasz Mierzwa 835797c81b Set proxy value when logging configuration on startup 2018-04-19 09:17:18 -07:00
Łukasz Mierzwa 8b4e8a1cca 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-04-19 09:17:18 -07: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 MierzwaandGitHub 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 MierzwaandGitHub 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 MierzwaandGitHub 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 MierzwaandGitHub 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 MierzwaandGitHub 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 MierzwaandGitHub 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 MierzwaandGitHub 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 MierzwaandGitHub 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 MierzwaandGitHub 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 MierzwaandGitHub 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 MierzwaandGitHub 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 MierzwaandGitHub 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