diff --git a/infra/gcp/clusters/projects/k8s-infra-prow-build-trusted/prow-build-trusted/resources/build-serviceaccounts.yaml b/infra/gcp/clusters/projects/k8s-infra-prow-build-trusted/prow-build-trusted/resources/build-serviceaccounts.yaml index d798d9e54ff..34fe5dd02bc 100644 --- a/infra/gcp/clusters/projects/k8s-infra-prow-build-trusted/prow-build-trusted/resources/build-serviceaccounts.yaml +++ b/infra/gcp/clusters/projects/k8s-infra-prow-build-trusted/prow-build-trusted/resources/build-serviceaccounts.yaml @@ -63,3 +63,11 @@ metadata: iam.gke.io/gcp-service-account: k8s-infra-gcr-promoter@k8s-artifacts-prod-bak.iam.gserviceaccount.com name: k8s-infra-gcr-promoter-bak namespace: test-pods +--- +kind: ServiceAccount +apiVersion: v1 +metadata: + annotations: + iam.gke.io/gcp-service-account: gcb-builder-cluster-api-gcp@k8s-staging-cluster-api-gcp.iam.gserviceaccount.com + name: gcb-builder-cluster-api-gcp + namespace: test-pods diff --git a/infra/gcp/ensure-staging-storage.sh b/infra/gcp/ensure-staging-storage.sh index fa060855f7b..af3ea4ac1be 100755 --- a/infra/gcp/ensure-staging-storage.sh +++ b/infra/gcp/ensure-staging-storage.sh @@ -311,3 +311,13 @@ color 6 "Configuring special case for k8s-staging-releng-test" ( ensure_staging_gcb_builder_service_account "releng-test" "k8s-infra-prow-build" ) + +# Special case: In order to build the node images using image-builder it needs +# the compute api to be enabled because it will create a VM +# to build the node image. +color 6 "Configuring special case for k8s-staging-cluster-api-gcp" +( + readonly STAGING_PROJECT="k8s-staging-cluster-api-gcp" + enable_api "${STAGING_PROJECT}" compute.googleapis.com + ensure_staging_gcb_builder_service_account "cluster-api-gcp" "k8s-infra-prow-build-trusted" +)