Skip to content

Commit 57cf985

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 78134a0 commit 57cf985

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,36 @@ 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+
iam_members = [
97+
{
98+
// Let the upload job write to this bucket.
99+
role = "roles/storage.objectAdmin"
100+
member = "serviceAccount:k8s-testgrid-config-updater@k8s-infra-prow-build-trusted.iam.gserviceaccount.com"
101+
},
102+
{
103+
// Let K8s TestGrid canary read configs from this bucket.
104+
role = "roles/storage.objectViewer"
105+
member = "serviceAccount:testgrid-canary@k8s-testgrid.iam.gserviceaccount.com"
106+
},
107+
{
108+
// Let K8s TestGrid production read configs from this bucket.
109+
role = "roles/storage.objectViewer"
110+
member = "serviceAccount:updater@k8s-testgrid.iam.gserviceaccount.com"
111+
}
112+
]
113+
}
114+
85115
// Create gs://k8s-ci-logs to store logs from Prow jobs.
86116
module "prow_bucket" {
87117
source = "terraform-google-modules/cloud-storage/google//modules/simple_bucket"

0 commit comments

Comments
 (0)