-
Notifications
You must be signed in to change notification settings - Fork 611
Switch to using kind build node-image for e2e tests #11251
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,21 @@ export E2E_SKIP_IMAGE_RELOAD="${E2E_SKIP_IMAGE_RELOAD:-false}" | |
|
|
||
| export KIND_VERSION="${E2E_KIND_VERSION/"kindest/node:v"/}" | ||
|
|
||
| function build_kind_node_image { | ||
| if [[ "$E2E_KIND_VERSION" != kindest/node:v* ]]; then | ||
| echo "Skipping kind node image build for non-standard image: $E2E_KIND_VERSION" | ||
| return 0 | ||
| fi | ||
|
|
||
| if [[ "${E2E_MODE}" == "dev" ]] && docker image inspect "$E2E_KIND_VERSION" &>/dev/null; then | ||
| echo "Reusing existing node image: $E2E_KIND_VERSION (E2E_MODE=dev)" | ||
| return 0 | ||
| fi | ||
|
|
||
| echo "Building kind node image: $E2E_KIND_VERSION (K8s v$KIND_VERSION)" | ||
| $KIND build node-image "v$KIND_VERSION" --image "$E2E_KIND_VERSION" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How much longer does it take compared to just downloading it? I’m wondering if we can first check whether the image already exists, and only build it if it doesn’t.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @kannon92
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't seem too bad, the longest taking suite took 26min, which seems normal for the suite: https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/kubernetes-sigs_kueue/11251/pull-kueue-test-e2e-sequential-baseline-main/2055376057527177216
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either way you have to download the base image layer (squashed) and the kubernetes binaries (Either via a node-image or via the release tarball) so it's similar. |
||
| } | ||
|
|
||
| function e2e_is_truthy { | ||
| case "${1:-}" in | ||
| 1|true|TRUE|True|yes|YES|Yes|y|Y|on|ON|On) return 0 ;; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,7 @@ function startup { | |
| } | ||
|
|
||
| trap cleanup EXIT | ||
| build_kind_node_image | ||
| startup & | ||
| prepare_docker_images | ||
| wait | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments as kubernetes-sigs/jobset#1234 (comment)