Expose GCP project as PROJECT env for ClusterLoader2 on GCE - #18537
Merged
kubernetes-prow[bot] merged 1 commit intoJul 5, 2026
Merged
Conversation
ClusterLoader2's managed Prometheus client (clusterloader2/pkg/prometheus/clients/gcp_managed.go) reads the GCP project from the PROJECT env var to build the Cloud Monitoring query URL. The kubetest2-kops deployer only exported GCP_PROJECT, so for scalability jobs that enable the "Quotas total usage" measurement (via preset-e2e-scalability-common's CL2_ENABLE_QUOTAS_USAGE_MEASUREMENT) the query URL had an empty project and Cloud Monitoring rejected it with HTTP 400 INVALID_ARGUMENT, failing the load test. Also export PROJECT alongside GCP_PROJECT so the measurement can query the correct project. This is set from d.GCPProject, which is populated even when the project is acquired from boskos.
Contributor
|
Skipping CI for Draft Pull Request. |
Member
Author
|
/test pull-kops-gce-master-scale-kindnet-performance-100 |
rifelpet
marked this pull request as ready for review
July 5, 2026 10:06
Member
Author
|
/cc @hakman |
hakman
approved these changes
Jul 5, 2026
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
In the kubetest2-kops deployer, export
PROJECTalongsideGCP_PROJECT(both fromd.GCPProject) when running the test command on GCE.Why
ClusterLoader2's managed Prometheus client (
clusterloader2/pkg/prometheus/clients/gcp_managed.go) reads the GCP project from thePROJECTenv var to build the Cloud Monitoring query URL:The deployer only exported
GCP_PROJECT, so for scalability jobs that enable the "Quotas total usage" measurement (viapreset-e2e-scalability-common'sCL2_ENABLE_QUOTAS_USAGE_MEASUREMENT=true) the query URL had an empty project and Cloud Monitoring rejected it withHTTP 400 INVALID_ARGUMENT, failing the load test.Setting
PROJECTin the deployer (rather than inrun-test.sh) is required because these jobs acquire their project from boskos, soGCP_PROJECTis empty at scenario start —d.GCPProjectis where the resolved project value is guaranteed populated.Failing job
ci-kubernetes-kops-gce-small-scale-kindnet-using-cl2fails on theQuotas total usagemeasurement:https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/ci-kubernetes-kops-gce-small-scale-kindnet-using-cl2/2073413226502033408