Skip to content

Make QEMU version, arch and flags overridable via environment variables#4418

Open
xuxiaowei-com-cn wants to merge 2 commits into
kubernetes:masterfrom
xuxiaowei-com-cn:xuxiaowei/issues/4417
Open

Make QEMU version, arch and flags overridable via environment variables#4418
xuxiaowei-com-cn wants to merge 2 commits into
kubernetes:masterfrom
xuxiaowei-com-cn:xuxiaowei/issues/4417

Conversation

@xuxiaowei-com-cn
Copy link
Copy Markdown

@xuxiaowei-com-cn xuxiaowei-com-cn commented May 31, 2026

Allow customizing QEMUVERSION and QEMUFLAGS without modifying Makefiles, so that users can use different QEMU configurations for cross-arch builds.

What type of PR is this?

/kind cleanup

#4417

What this PR does / why we need it:

Makes QEMU version, flags, and ALL_ARCH configurable via environment variables in three image build Makefiles:

  • Changes QEMUVERSION from = to ?= so it can be overridden
  • Extracts hardcoded --reset -p yes flags into a new QEMUFLAGS variable with ?= assignment
  • Replaces the inline flags in docker run with $(QEMUFLAGS)
  • Changes ALL_ARCH from = to ?= so target architectures can be overridden

This allows downstream users and CI pipelines to customize QEMU behavior and target architectures without patching the Makefiles.

Files changed:

  • images/build/debian-base/Makefile
  • images/build/distroless-iptables/Makefile
  • images/build/setcap/Makefile

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

The changes are identical across all three files — extracting hardcoded values into conditionally-assignable variables (?=). The default behavior is unchanged.

Does this PR introduce a user-facing change?

NONE

Allow customizing QEMUVERSION and QEMUFLAGS without modifying Makefiles,
so that users can use different QEMU configurations for cross-arch builds.
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels May 31, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: xuxiaowei-com-cn
Once this PR has been reviewed and has the lgtm label, please assign jeremyrickard for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the area/release-eng Issues or PRs related to the Release Engineering subproject label May 31, 2026
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 31, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @xuxiaowei-com-cn. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 31, 2026
Use ?= instead of = for ALL_ARCH so it can be overridden, consistent
with ARCH and the recent QEMU variable changes (7f6c512).
@xuxiaowei-com-cn xuxiaowei-com-cn changed the title Make QEMU version and flags overridable via environment variables Make QEMU version, arch and flags overridable via environment variables May 31, 2026
@xuxiaowei-com-cn
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority release-note-none Denotes a PR that doesn't merit a release note. sig/release Categorizes an issue or PR as relevant to SIG Release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants