GoogleCloudPlatform / prometheus-engine

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

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

Closed TheSpiritXIII closed 4 months ago

TheSpiritXIII commented 4 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 4 months ago

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