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

[E2E refactor - 2] change e2e to create and run on a kind cluster per Test* function #744

Closed pintohutch closed 9 months ago

pintohutch commented 10 months ago

I decided to break out the kind E2E test refactor PR https://github.com/GoogleCloudPlatform/prometheus-engine/pull/738 into smaller, digestible PRs for reviewing.

Note: because of the nature of the change, presubmits (i.e. Github Actions) may fail until the final PR is merged.

This is the second one, where we change the e2e make target to provision and run e2e tests against a kind cluster per Test* function.

We also build the go binaries and deploy them to a local image registry, which the kind clusters use to run the images from. This way, when we change code, that change is reflected in the components running in the cluster, without relying on published gke images.

Finally, we introduce using GOOGLE_APPLICATION_CREDENTIALS as a path to a service account file. If specified, the e2e tests will be run against the Cloud Monitoring backend to assert metric data is properly collected.

pintohutch commented 9 months ago

Friendly ping here @TheSpiritXIII