Skip to content

Commit 1eefb78

Browse files
authored
Merge pull request #6985 from michelle192837/migrateimagejobs
Add bucket + service account for TestGrid upload.
2 parents 51b5fbd + fb36558 commit 1eefb78

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

infra/gcp/terraform/k8s-infra-prow-build-trusted/serviceaccounts.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ locals {
5757
project_roles = ["roles/secretmanager.secretAccessor"]
5858
cluster_namespace = "kubernetes-external-secrets"
5959
}
60+
// also assigned roles by:
61+
// - terraform/k8s-infra-prow
62+
k8s-testgrid-config-updater = {
63+
description = "writes TestGrid config to gs://k8s-testgrid-config"
64+
}
6065
}
6166
}
6267

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,30 @@ module "gcb_bucket" {
4343
}
4444
]
4545
}
46+
47+
// Create gs://k8s-testgrid-config to store K8s TestGrid config.
48+
module "testgrid_config_bucket" {
49+
source = "terraform-google-modules/cloud-storage/google//modules/simple_bucket"
50+
version = "~> 5"
51+
52+
name = "k8s-testgrid-config"
53+
project_id = module.project.project_id
54+
location = "us"
55+
56+
lifecycle_rules = [{
57+
action = {
58+
type = "Delete"
59+
}
60+
condition = {
61+
age = 90 # 90d
62+
with_state = "ANY"
63+
}
64+
}]
65+
66+
iam_members = [
67+
{
68+
role = "roles/storage.objectAdmin"
69+
member = "serviceAccount:k8s-testgrid-config-updater@k8s-infra-prow-build-trusted.iam.gserviceaccount.com"
70+
}
71+
]
72+
}

0 commit comments

Comments
 (0)