Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
32 changes: 28 additions & 4 deletions config/jobs/image-pushing/k8s-staging-e2e-test-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
set -o errexit

readonly OUTPUT="$(dirname $0)/k8s-staging-e2e-test-images.yaml"

# Default machine type for builds
readonly DEFAULT_MACHINE_TYPE="E2_HIGHCPU_8"

# Images to build. Format: "image-name" or "image-name:worker-pool"
# If worker-pool is specified, the --worker-pool flag will be used instead of --machine-type
# Worker pools must be pre-configured in the GCP project and have the same name as the instance type
readonly IMAGES=(
agnhost
agnhost:c3-highcpu-22
apparmor-loader
busybox
glibc-dns-testing
Expand All @@ -29,9 +36,7 @@ readonly IMAGES=(
node-perf/npb-ep
node-perf/npb-is
node-perf/pytorch-wide-deep
nonewprivs
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonroot
perl
pets/peer-finder
pets/zookeeper-installer
regression-issue-74839
Expand All @@ -50,7 +55,24 @@ postsubmits:
kubernetes/kubernetes:
EOF

for image in "${IMAGES[@]}"; do
for entry in "${IMAGES[@]}"; do
# Parse entry - format is "image" or "image:worker-pool"
image="${entry%%:*}"
worker_pool="${entry#*:}"
# If no colon was present, worker_pool equals image
if [[ "${worker_pool}" == "${image}" ]]; then
worker_pool=""
fi

# Determine machine-type or worker-pool args
if [[ -n "${worker_pool}" ]]; then
machine_args="--worker-pool=projects/k8s-staging-e2e-test-images/locations/us-central1/workerPools/${worker_pool}"
region_arg=$'\n - --region=us-central1'
else
machine_args="--machine-type=${DEFAULT_MACHINE_TYPE}"
region_arg=""
fi

cat >>"${OUTPUT}" <<EOF
- name: post-kubernetes-push-e2e-${image//\//-}-test-images
rerun_auth_config:
Expand Down Expand Up @@ -86,6 +108,7 @@ for image in "${IMAGES[@]}"; do
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- ${machine_args}${region_arg}
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -140,6 +163,7 @@ periodics:
args:
- --project=k8s-staging-e2e-test-images
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=${DEFAULT_MACHINE_TYPE}
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down
116 changes: 28 additions & 88 deletions config/jobs/image-pushing/k8s-staging-e2e-test-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --worker-pool=projects/k8s-staging-e2e-test-images/locations/us-central1/workerPools/c3-highcpu-22
- --region=us-central1
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -78,6 +80,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -120,6 +123,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -162,6 +166,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -204,6 +209,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -246,6 +252,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -288,6 +295,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -330,6 +338,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -372,6 +381,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand All @@ -380,48 +390,6 @@ postsubmits:
# We override that with the nginx-new image.
- name: WHAT
value: "nginx-new"
- name: post-kubernetes-push-e2e-node-perf-pytorch-wide-deep-test-images
rerun_auth_config:
github_team_slugs:
- org: kubernetes
slug: release-managers
- org: kubernetes
slug: test-infra-admins
github_users:
- aojea
- chewong
- claudiubelu
- mkumatag
cluster: k8s-infra-prow-build-trusted
annotations:
testgrid-dashboards: sig-testing-images, sig-k8s-infra-gcb
decorate: true
# we only need to run if the test images have been changed.
run_if_changed: '^.go-version$|^test/images/[^/]+$|^test\/images\/node-perf\/pytorch-wide-deep\/'
branches:
# TODO(releng): Remove once repo default branch has been renamed
- ^master$
- ^main$
spec:
serviceAccountName: gcb-builder
containers:
- image: gcr.io/k8s-staging-test-infra/image-builder:v20251215-d7853fe2a6
command:
- /run.sh
args:
# this is the project GCB will run in, which is the same as the GCR
# images are pushed to.
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
env:
# By default, the E2E test image's WHAT is all-conformance.
# We override that with the node-perf/pytorch-wide-deep image.
- name: WHAT
value: "node-perf/pytorch-wide-deep"
- name: post-kubernetes-push-e2e-node-perf-npb-ep-test-images
rerun_auth_config:
github_team_slugs:
Expand Down Expand Up @@ -456,6 +424,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -498,6 +467,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand All @@ -506,7 +476,7 @@ postsubmits:
# We override that with the node-perf/npb-is image.
- name: WHAT
value: "node-perf/npb-is"
- name: post-kubernetes-push-e2e-nonewprivs-test-images
- name: post-kubernetes-push-e2e-node-perf-pytorch-wide-deep-test-images
rerun_auth_config:
github_team_slugs:
- org: kubernetes
Expand All @@ -523,7 +493,7 @@ postsubmits:
testgrid-dashboards: sig-testing-images, sig-k8s-infra-gcb
decorate: true
# we only need to run if the test images have been changed.
run_if_changed: '^.go-version$|^test/images/[^/]+$|^test\/images\/nonewprivs\/'
run_if_changed: '^.go-version$|^test/images/[^/]+$|^test\/images\/node-perf\/pytorch-wide-deep\/'
branches:
# TODO(releng): Remove once repo default branch has been renamed
- ^master$
Expand All @@ -540,14 +510,15 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
env:
# By default, the E2E test image's WHAT is all-conformance.
# We override that with the nonewprivs image.
# We override that with the node-perf/pytorch-wide-deep image.
- name: WHAT
value: "nonewprivs"
value: "node-perf/pytorch-wide-deep"
- name: post-kubernetes-push-e2e-nonroot-test-images
rerun_auth_config:
github_team_slugs:
Expand Down Expand Up @@ -582,6 +553,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand All @@ -590,48 +562,6 @@ postsubmits:
# We override that with the nonroot image.
- name: WHAT
value: "nonroot"
- name: post-kubernetes-push-e2e-perl-test-images
rerun_auth_config:
github_team_slugs:
- org: kubernetes
slug: release-managers
- org: kubernetes
slug: test-infra-admins
github_users:
- aojea
- chewong
- claudiubelu
- mkumatag
cluster: k8s-infra-prow-build-trusted
annotations:
testgrid-dashboards: sig-testing-images, sig-k8s-infra-gcb
decorate: true
# we only need to run if the test images have been changed.
run_if_changed: '^.go-version$|^test/images/[^/]+$|^test\/images\/perl\/'
branches:
# TODO(releng): Remove once repo default branch has been renamed
- ^master$
- ^main$
spec:
serviceAccountName: gcb-builder
containers:
- image: gcr.io/k8s-staging-test-infra/image-builder:v20251215-d7853fe2a6
command:
- /run.sh
args:
# this is the project GCB will run in, which is the same as the GCR
# images are pushed to.
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
env:
# By default, the E2E test image's WHAT is all-conformance.
# We override that with the perl image.
- name: WHAT
value: "perl"
- name: post-kubernetes-push-e2e-pets-peer-finder-test-images
rerun_auth_config:
github_team_slugs:
Expand Down Expand Up @@ -666,6 +596,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -708,6 +639,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -750,6 +682,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -792,6 +725,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -834,6 +768,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -876,6 +811,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -918,6 +854,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -960,6 +897,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -1002,6 +940,7 @@ postsubmits:
- --project=k8s-staging-e2e-test-images
# This is the same as above, but with -gcb appended.
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down Expand Up @@ -1052,6 +991,7 @@ periodics:
args:
- --project=k8s-staging-e2e-test-images
- --scratch-bucket=gs://k8s-staging-e2e-test-images-gcb
- --machine-type=E2_HIGHCPU_8
- --env-passthrough=PULL_BASE_REF,PULL_BASE_SHA,WHAT
- --build-dir=.
- test/images
Expand Down