Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add prow build clusters #830

Merged
merged 19 commits into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,44 @@
resources:
- names:
- spiffxp-boskos-project-01
- spiffxp-boskos-project-02
- spiffxp-boskos-project-03
- k8s-infra-e2e-boskos-001
- k8s-infra-e2e-boskos-002
- k8s-infra-e2e-boskos-003
- k8s-infra-e2e-boskos-004
- k8s-infra-e2e-boskos-005
- k8s-infra-e2e-boskos-006
- k8s-infra-e2e-boskos-007
- k8s-infra-e2e-boskos-008
- k8s-infra-e2e-boskos-009
- k8s-infra-e2e-boskos-010
- k8s-infra-e2e-boskos-011
- k8s-infra-e2e-boskos-012
- k8s-infra-e2e-boskos-013
- k8s-infra-e2e-boskos-014
- k8s-infra-e2e-boskos-015
- k8s-infra-e2e-boskos-016
- k8s-infra-e2e-boskos-017
- k8s-infra-e2e-boskos-018
- k8s-infra-e2e-boskos-019
- k8s-infra-e2e-boskos-020
- k8s-infra-e2e-boskos-021
- k8s-infra-e2e-boskos-022
- k8s-infra-e2e-boskos-023
- k8s-infra-e2e-boskos-024
- k8s-infra-e2e-boskos-025
- k8s-infra-e2e-boskos-026
- k8s-infra-e2e-boskos-027
- k8s-infra-e2e-boskos-028
- k8s-infra-e2e-boskos-029
- k8s-infra-e2e-boskos-030
- k8s-infra-e2e-boskos-031
- k8s-infra-e2e-boskos-032
- k8s-infra-e2e-boskos-033
- k8s-infra-e2e-boskos-034
- k8s-infra-e2e-boskos-035
- k8s-infra-e2e-boskos-036
- k8s-infra-e2e-boskos-037
- k8s-infra-e2e-boskos-038
- k8s-infra-e2e-boskos-039
- k8s-infra-e2e-boskos-040
state: dirty
type: k8s-infra-gce-project
33 changes: 17 additions & 16 deletions infra/gcp/ensure-e2e-projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,38 +34,38 @@ function usage() {

## setup service accounts and ips for the prow build cluster

# TODO: replace prow-build-test with actual service account
PROW_BUILD_SVCACCT=$(svc_acct_email "kubernetes-public" "prow-build-test")

# TODO: replace boskos-janitor-test with actual service account
BOSKOS_JANITOR_SVCACCT=$(svc_acct_email "kubernetes-public" "boskos-janitor-test")
# TODO(spiffxp): delete kubernetes-public prow-build-test SA
PROW_BUILD_SVCACCT=$(svc_acct_email "k8s-infra-prow-build" "prow-build")
# TODO(spiffxp): delete kubernetes-public boskos-janitor SA
BOSKOS_JANITOR_SVCACCT=$(svc_acct_email "k8s-infra-prow-build" "boskos-janitor")

color 6 "Ensuring boskos-janitor is empowered"
(
color 6 "Ensuring external ip address exists for boskos-metrics service in prow build cluster"
# this is so monitoring.prow.k8s.io is able to scrape metrics from boskos
# TODO: replace this with a global address used by an ingress
# TODO(spiffxp): get rid of kubernetes-public/boskos-metrics regional ip address
# TODO(spiffxp): redo this as a global ip address and use ingress
ensure_regional_address \
"kubernetes-public" \
spiffxp marked this conversation as resolved.
Show resolved Hide resolved
"k8s-infra-prow-build" \
"us-central1" \
"boskos-metrics" \
"to allow monitoring.k8s.prow.io to scrape boskos metrics"
) 2>&1 | indent

## setup projects to be used by e2e tests for standing up clusters

# TODO: replace spiffxp- projects with actual projects
E2E_PROJECTS=(
# for manual use during node-e2e job migration, eg: --gcp-project=spiffxp-node-e2e-project
spiffxp-node-e2e-project
# for manual use during job migration, eg: --gcp-project=spiffxp-gce-project
spiffxp-gce-project
# managed by boskos, part of the gce-project pool, eg: --gcp-project-type=gce-project
spiffxp-boskos-project-01
spiffxp-boskos-project-02
spiffxp-boskos-project-03
# TODO(spiffxp): delete spiffxp- projects
# for manual use during node-e2e job migration, eg: --gcp-project=k8s-infra-e2e-gce-project
k8s-infra-e2e-gce-project
# for manual use during job migration, eg: --gcp-project=k8s-infra-e2e-node-e2e-project
k8s-infra-e2e-node-e2e-project
)

for i in $(seq 1 40); do
E2E_PROJECTS+=($(printf "k8s-infra-e2e-boskos-%03i" $i))
done

if [ $# = 0 ]; then
# default to all e2e projects
set -- "${E2E_PROJECTS[@]}"
Expand All @@ -80,6 +80,7 @@ for prj; do
color 6 "Enabling APIs necessary for kubernetes e2e jobs to use e2e project: ${prj}"
enable_api "${prj}" compute.googleapis.com
enable_api "${prj}" logging.googleapis.com
enable_api "${prj}" monitoring.googleapis.com
enable_api "${prj}" storage-component.googleapis.com

color 6 "Empower prow-build service account to edit e2e project: ${prj}"
Expand Down