GoogleCloudPlatform / prometheus-engine

Google Cloud Managed Service for Prometheus libraries and manifests.
https://g.co/cloud/managedprometheus
Apache License 2.0
195 stars 93 forks source link

refactor: prevent collector pod restarts on startup #965

Closed TheSpiritXIII closed 4 months ago

TheSpiritXIII commented 6 months ago

Pass GKE metadata through the Prometheus configuration rather than using flags.

See original attempt: https://github.com/GoogleCloudPlatform/prometheus-engine/pull/920

Prerequisites:

  1. prometheus-engine: https://github.com/GoogleCloudPlatform/prometheus-engine/pull/977
  2. prometheus: https://github.com/GoogleCloudPlatform/prometheus/pull/162
TheSpiritXIII commented 5 months ago

NOTE: This still needs a new Prometheus image. Please approve but do not merge yet!

TheSpiritXIII commented 4 months ago

Do you think we should add some e2e tests?

Thanks @pintohutch! I added some unit tests instead. Please let me know if you think this is not enough.