Skip to content

Commit 449c6be

Browse files
committed
Add GCS bucket for external TestGrid configurations
Add a GCS bucket so we can migrate testgrid dashboards from Google to the Kubernetes infrastructure Ref: - #8973 Signed-off-by: Arnaud Meukam <ameukam@gmail.com>
1 parent 10ec2d5 commit 449c6be

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

infra/gcp/terraform/k8s-infra-prow/buckets.tf

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,38 @@ module "testgrid_config_bucket" {
8282
]
8383
}
8484

85+
// Create gs://k8s-testgrid-config-external to store TestGrid configs.
86+
// - testgrid.prow.k8s.io (community-operated, K8s project configs only)
87+
// See: https://github.com/kubernetes/k8s.io/issues/8973
88+
module "testgrid_config_external_bucket" {
89+
source = "terraform-google-modules/cloud-storage/google//modules/simple_bucket"
90+
version = "~> 5"
91+
92+
name = "k8s-testgrid-config-external"
93+
project_id = module.project.project_id
94+
location = "us-central1"
95+
96+
uniform_bucket_level_access = true
97+
98+
iam_members = [
99+
{
100+
// Let the upload job write to this bucket.
101+
role = "roles/storage.objectAdmin"
102+
member = "serviceAccount:k8s-testgrid-config-updater@k8s-infra-prow-build-trusted.iam.gserviceaccount.com"
103+
},
104+
{
105+
// Let K8s TestGrid canary read configs from this bucket.
106+
role = "roles/storage.objectViewer"
107+
member = "serviceAccount:testgrid-canary@k8s-testgrid.iam.gserviceaccount.com"
108+
},
109+
{
110+
// Let K8s TestGrid production read configs from this bucket.
111+
role = "roles/storage.objectViewer"
112+
member = "serviceAccount:updater@k8s-testgrid.iam.gserviceaccount.com"
113+
}
114+
]
115+
}
116+
85117
// Create gs://k8s-ci-logs to store logs from Prow jobs.
86118
module "prow_bucket" {
87119
source = "terraform-google-modules/cloud-storage/google//modules/simple_bucket"

0 commit comments

Comments
 (0)