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

arm64: agent_policy build always pulls amd64 opa binary #8375

Merged
merged 1 commit into from Jan 29, 2024

Conversation

zvonkok
Copy link
Contributor

@zvonkok zvonkok commented Nov 3, 2023

The versions.yaml has only a default amd64 binary configured extend the versions.yaml for aarch64 as well.

Fixes: #8373

@zvonkok
Copy link
Contributor Author

zvonkok commented Nov 16, 2023

/ok-to-test

@zvonkok
Copy link
Contributor Author

zvonkok commented Nov 16, 2023

/test

@zvonkok
Copy link
Contributor Author

zvonkok commented Nov 16, 2023

/ok-to-test

@zvonkok
Copy link
Contributor Author

zvonkok commented Nov 16, 2023

/test

@zvonkok
Copy link
Contributor Author

zvonkok commented Dec 4, 2023

@fidencio PTAL

versions.yaml Outdated Show resolved Hide resolved
@katacontainersbot katacontainersbot added size/small Small and simple task and removed size/tiny Smallest and simplest task labels Jan 15, 2024
The versions.yaml has a default for the amd64 binary, but there is no
code to actually build the arm64 binary, which seems an overlook.

Let's simplify the OPA logic by removing the direct link to the binary,
and construct that link as part of the checks we do to decide whether we
need to build OPA or not.

Fixes: kata-containers#8373

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Comment on lines +710 to +714
case ${ARCH} in
x86_64) opa_binary_arch="amd64" ;;
aarch64) opa_binary_arch="arm64" ;;
*) die "Unsupported architecture for the OPA binary" ;;
esac
Copy link
Member

Choose a reason for hiding this comment

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

I proposed this, and I'd like to state that I'm not a big fond of this, as we already have this logic in a lot of places in our repo.

However, this is needed here, and building the OPA agent as part of the rootfs will be short-lived (theoretically), as we want to actually just use a binary that was built in a previous state, but that's not for now.

All in all, lgtm, thanks @zvonkok!

@zvonkok
Copy link
Contributor Author

zvonkok commented Jan 23, 2024

FYI @cdesiniotis @tariq1890 @shivamerla

@danmihai1
Copy link
Contributor

Thanks for improving this script @zvonkok !

@gkurz
Copy link
Member

gkurz commented Jan 25, 2024

/test

@zvonkok zvonkok merged commit a9348fa into kata-containers:main Jan 29, 2024
280 of 290 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test size/small Small and simple task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

arm64: agent_policy build always pulls amd64 opa binary
5 participants