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

build: Add support for RISC-V #12067

Closed
wants to merge 1 commit into from
Closed

Conversation

chazapis
Copy link
Contributor

This PR adds RISC-V support, by generating a CLI binary for RISC-V and container images.

Motivation

The work is part of an ongoing effort to run K3s on RISC-V. The main functionality is there, so we are now moving to higher-level services and Argo Workflows is first on the list. We expect Argo Workflows to enable us to seamlessly run workflows in a hybrid hardware environment with amd64, arm64, and riscv64 hosts.

Modifications

There are no code changes in this PR, just small additions and modifications in the Makefile and release scripts.

A binary for riscv64 is created by adding the architecture to the Makefile.

The container image generation is a bit trickier, as the base images used do not currently support RISC-V. Alpine supports RISC-V in the "edge" branch and distroless has deferred releasing RISC-V images until the Debian unstable branch is moved into stable (estimated in 2025). For this reason, I turned the base image names into arguments in the Dockerfile and use different ones for RISC-V in release.yaml.

Verification

I built container images by running the script in release.yaml by hand. They can be found at my organization's Docker Hub account. I then modified install.yaml to use these container images and tested Argo Workflows in a QEMU setup with a RISC-V build of K3s. The installation manifest, as well as test workflow can be found here.

@terrytangyuan
Copy link
Member

I don't know much about RISC-V so I'll defer the review to others who are more experienced

Signed-off-by: Antony Chazapis <[email protected]>
@agilgur5 agilgur5 added the area/build Build or GithubAction/CI issues label Oct 25, 2023
Copy link

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

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

IMO, I don't think we should add support for new architectures that do not have significant user requests. In this case, this seems pre-emptive to user requests (correct me if I'm wrong).

Argo CD supports a few different archs, but that doesn't currently include RISC-V. Those different archs do also slow down the build considerably for some rare use-cases.

Adding support for a new arch means a new maintenance burden for that arch. If there are no user requests for that, that maintenance burden seems not worthwhile. Given the unstable status of several upstream projects as you mentioned, that sounds even more maintenance heavy as a result


RUN apk update && apk add --no-cache \
RUN apk update && \
(command -v go >/dev/null 2>&1 || apk add --no-cache go) && \
Copy link

@agilgur5 agilgur5 Oct 25, 2023

Choose a reason for hiding this comment

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

we should add versions if we want this to match the regular alpine images.

this also feels very hacky to have different base images, but it sounds like there's no pre-built Alpine image with Go and Node for RISC-V?

Comment on lines +35 to +36
(command -v node >/dev/null 2>&1 || apk add --no-cache nodejs-current) && \
(command -v yarn >/dev/null 2>&1 || apk add --no-cache yarn) && \
Copy link

@agilgur5 agilgur5 Oct 25, 2023

Choose a reason for hiding this comment

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

same as above re: versioning

@chazapis
Copy link
Contributor Author

chazapis commented Oct 26, 2023

IMO, I don't think we should add support for new architectures that do not have significant user requests. In this case, this seems pre-emptive to user requests (correct me if I'm wrong).

Argo CD supports a few different archs, but that doesn't currently include RISC-V. Those different archs do also slow down the build considerably for some rare use-cases.

Adding support for a new arch means a new maintenance burden for that arch. If there are no user requests for that, that maintenance burden seems not worthwhile. Given the unstable status of several upstream projects as you mentioned, that sounds even more maintenance heavy as a result

@agilgur5, I agree.

However, I want to stress out that even though the RISC-V community is still small, it is constantly growing. You may not have user requests now, but RISC-V users currently just run what is available (or recompile). If Argo (and Kubernetes/K3s) were already available, I am sure people would find good use for them. A whole range of RISC-V hardware has been announced. We envision these devices to join a Kubernetes control plane and run partial workflows via Argo.

Also, at this point, I think it would be perfectly acceptable to publish a build marked as experimental/untested.

In any case, let me know if there is any way I can help.

@agilgur5
Copy link

agilgur5 commented Oct 27, 2023

As an example of previous work in the industry, https://github.com/nodejs/unofficial-builds/ creates experimental builds for less common architectures like RISC-V. We could potentially have something similar in argoproj-labs, which would be very explicitly experimental. We have been thinking of doing something similar for the auto-generated SDKs as well

@juliev0 juliev0 added the problem/stale This has not had a response in some time label Dec 8, 2023
@juliev0
Copy link
Contributor

juliev0 commented Jun 28, 2024

Closing stale PRs

@juliev0 juliev0 closed this Jun 28, 2024
@agilgur5 agilgur5 added solution/workaround There's a workaround, might not be great, but exists solution/unimplemented This was not implemented, but may be in the future labels Jun 28, 2024
@chazapis
Copy link
Contributor Author

@juliev0, this is still relevant. CLI support has been added with #12977, but we need this to run Argo on RISC-V machines.

@agilgur5
Copy link

@chazapis I'll refer back to my earlier comments, particularly the unofficial-builds one, which was not responded to. Not to mention my in-line comments as well.

@agilgur5 agilgur5 added the problem/more information needed Not enough information has been provide to diagnose this issue. label Jun 29, 2024
@AllardKrings
Copy link

Hello,

as I am using a Kubernetes cluster on RISCV hardware I am now looking for a workflow tool.

I would like to use Argo Workflows on RISCV as soon as it is available.

@szpeter80
Copy link

Reflecting on the "no user request" part: Risc V currently has the attention of a nice amount of highly motivated and skilled developers. Supporting the architecture - or at least a sign of strong intent - can make some of them interested in Argo as well.

@agilgur5
Copy link

agilgur5 commented Oct 25, 2024

can make some of them interested in Argo as well.

The equivalent was said above, but "build and maintain it pre-emptive to an actual need" is not a sustainable maintenance strategy -- following that could make infinite permutations of features -- and Argo already has sustainability issues.

highly motivated and skilled developers

Also neither high skill nor high motivation is needed to create an unofficial-builds repo, yet no individual community member nor corporate entity has made one, so such an argument is also a strawman.

@szpeter80
Copy link

I understand your point, and thanks for the clarification.

As currently procurable RiscV boards just getting over the RPi3 performance level, things might change in the future as drivers and Kubernetes ecosystem support matures.

@agilgur5
Copy link

agilgur5 commented Oct 26, 2024

Yea I'd personally love to see an open source ISA like RISC-V gain more traction and adoption.

Just wouldn't make sense for some projects like Argo to support it as part of core yet as the maintenance would not be worthwhile / sustainable. Community builds make more sense at the current juncture and limited amount of hardware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Build or GithubAction/CI issues problem/more information needed Not enough information has been provide to diagnose this issue. problem/stale This has not had a response in some time solution/unimplemented This was not implemented, but may be in the future solution/workaround There's a workaround, might not be great, but exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants