VictoriaMetrics/lib/promscrape
Aliaksandr Valialkin 4304950391
lib/promscrape/discovery/yandexcloud: follow-up for 070abe5c71
- Obtain IAM token via GCE-like API instead of Amazon EC2 IMDSv2 API,
  since it looks like IMDBSv2 API isn't supported by Yandex Cloud
  according to https://yandex.cloud/en/docs/security/standard/authentication#aws-token :

  > So far, Yandex Cloud does not support version 2, so it is strongly recommended
  > to technically disable getting a service account token via the Amazon EC2 metadata service.

- Try obtaining IAM token via GCE-like API at first and then fall back to the deprecated Amazon EC2 IMDBSv1.
  This should prevent from auth errors for instances with disabled GCE-like auth API.
  This addresses @ITD27M01 concern at https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5513#issuecomment-1867794884

- Make more clear the description of the change at docs/CHANGELOG.md , add reference to the related issue.

P.S. This change wasn't tested in prod because I have no access to Yandex Cloud.
It is recommended to test this change by @ITD27M01 and @vmazgo , who filed
the issue https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5513

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6524
2024-07-16 17:58:40 +02:00
..
discovery lib/promscrape/discovery/yandexcloud: follow-up for 070abe5c71 2024-07-16 17:58:40 +02:00
discoveryutils lib/{httputils,netutil}: move httputils.GetStatDialFunc to netutil.NewStatDialFunc 2024-07-15 23:02:34 +02:00
testdata lib/promscrape: disable support for service discovery and metrics scrape via http2 2023-07-06 16:03:37 -07:00
client.go lib/promscrape: follow-up for 1e83598be3 2024-07-16 12:38:21 +02:00
config_test.go lib/promscrape: follow-up for 1e83598be3 2024-07-16 12:38:21 +02:00
config_timing_test.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
config.go lib/promscrape: follow-up for 1e83598be3 2024-07-16 12:38:21 +02:00
relabel_debug.go app/vmselect: small cleanup after 4f3f9950d0 2023-05-08 14:57:11 -07:00
scraper.go feature: [vmagent] Add service discovery support for Vultr (#6068) 2024-05-08 10:01:48 +02:00
scrapework_test.go lib/promscrape: use prompbmarshal.MustParsePromMetrics function at parseData() test function 2024-07-03 16:08:13 +02:00
scrapework_timing_test.go all: fix golangci-lint(revive) warnings after 0c0ed61ce7 2024-04-02 23:16:29 +03:00
scrapework.go lib/promscrape: follow-up for 1e83598be3 2024-07-16 12:38:21 +02:00
targetstatus.go lib/promscrape: follow-up for 1e83598be3 2024-07-16 12:38:21 +02:00
targetstatus.qtpl lib/promscrape: follow-up for 1e83598be3 2024-07-16 12:38:21 +02:00
targetstatus.qtpl.go lib/promscrape: follow-up for 1e83598be3 2024-07-16 12:38:21 +02:00