GoogleCloudPlatform / prometheus-engine

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

refactor: consolidate webhook code and add CA bundle unit test #959

Closed TheSpiritXIII closed 6 months ago

TheSpiritXIII commented 6 months ago

Fixes https://github.com/GoogleCloudPlatform/prometheus-engine/issues/713

I've consolidated all webhook-related code into its own file. Furthermore, the TestWebhookCABundleUpdate unit test ensures that the webhook CA is updated correctly. Since the CA update loop sleeps for 1 minute, I made the tests run in parallel.

bernot-dev commented 6 months ago

I'm going to close #663 because there will be too many merge conflicts for that PR to make sense.