Commit graph

6 commits

Author SHA1 Message Date
David Wilkins
467a411e88 Convert RestClient to Gitlab::HTTP for Prometheus Monitor
- Closes #60024

- Change PrometheusClient.new to accept a base url instead of an
  already created RestClient

- Use Gitlab::HTTP in PrometheusClient instead of creating RestClient
  in PrometheusService

- Move http_options from PrometheusService to
  PrometheusClient (follow_redirects: false)

- ensure that base urls don't have the trailing slash

- Created a `PrometheusClient#url` method that might not be strictly
  required

- Change rescued exceptions from RestClient::* to
  HTTParty::ResponseError where possible and StandardError for the
  rest
2019-08-07 02:42:20 +00:00
Thong Kuah
85b29c1c2f Add frozen_string_literal to spec/services
Probably useful as we often move these files to "new" files.
2019-04-12 10:14:54 +12:00
Reuben Pereira
7f529353e7 Add a proxy method to PrometheusClient
- Also refactor the get and json_api_get methods so that the get method
can be reused by the new proxy method.
- The new proxy method makes no changes to the request to the prometheus
server and response from the prometheus server. This allows it to be
used as a proxy to the Prometheus server, hence the name.
2019-04-05 08:05:54 +00:00
Thong Kuah
13bb704d50 Remove #ready? method in favor of #available?
Given https://github.com/helm/helm/issues/3338, I think that we should
exclude applications that are :update_errored, :updating as well.
2019-02-15 12:43:44 +13:00
Thong Kuah
4e5494081e Spec: applications not yet installed doesn't count
We should not consider an application that is not yet installed or where
the install errored as available. Write a spec to assert this
2019-02-15 12:41:10 +13:00
Pawel Chojnacki
5ceec83a01 Implemente Prometheus:AdapterService 2018-03-05 19:34:59 +01:00