Repository navigation
Description
Is your feature request related to a problem? Please describe.
At the moment is is not possible to build k3s as an RPM or DEB package. This means I have to use the curl installer to install k3s on my host system. For me this represents an inconvenience because I would like to manage my system(s) via RPM/DEB packages.
Describe the solution you'd like
A build process which would build k3s only from sources checked in before build time. This would enable any Linux distribution to ship k3s in their repositories which should increase the visibility in a great manner. Specific build chains like dapper should not be involved in that process.
Describe alternatives you've considered
I have tried my best to understand how the current build system works and it is not even possible to exchange docker with podman without further bash reconfiguration (symlinks etc.). I have tried to understand the necessity of this - imho - inflexible buildchain and I lack the understanding of the decision sadly. I have tried to research the reasons but I was not successful.
Having a consistent environment for building can be achieved in many ways, I don't see a reason why this has to be achieved with dapper and continuos internet access.
Additional context
You said you'd disable this "for now" and reevaluate this later in #2440. I hope that this reevaluation can be done now. Obviously #1535 would reopen which I would also take care of then.
I am willing to invest my time to maintain this solution in the long term if we can find an agreement on how it should look like according to my desired solution.
Having RPMs and DEBs is not that hard if we consider the following:
- The specific requirements, for example for runc or containerd, can be built as subpackages of k3s. The build process is already available in most distributions, meaning that a
git clone ...like done here is not required. - The Traefik Helmchart can easily be built in any environment if the sources are previously downloaded since there is no black magic involved for this part of the build.
- For the userspace tools like
iptableswhich are currently a part of the k3s-root repository one can easily again just branch the required version from the distribution of choice like the first bullet point already describes.
The effort of doing this should be relatively small since the packaging of all the vendored dependencies is already done, they just need to be taken at the desired point in time. If architected well this doesn't even mean dapper is discontinued but in the end it would be just one options/the preferred option to build k3s.
For me the strongest point for such a solution is that the trust in k3s should be much higher when it comes from the vendor of your OS instead of a third party. Because normally packages are maintained by your OS vendor it is easy to trust them. If I execute a script of a third party I normally would need to establish trust to such a party first.
Additionally if I have an RPM/DEB I have a defined version which is installed. This means I know that a specific version will install a set of files on my system to previously known locations. When I install k3s via the current curl method I don't know what, where and how k3s will install itself on my system.
Lastly if an RPM would be available, one could take advantage of things like the SUSE Manager/Uyuni Content lifecycle management which enables automated staging of the k3s RPMs. This means a company can have an automated rollout for their k3s package with the tools already present in an environment, instead of a custom tailored solution.
Example: One could have a staging cluster where a new k3s package (with a bugfix or new version) is deployed to. If that is successful the package would be promoted to the next environment where the likelihood of that failing is much less then if I would install this directly in an environment.
Backporting
- Needs backporting to older releases
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone Issue
Activity
SchoolGuy commentedon May 28, 2022
Okay I want to provide a tldr as a question: What are the requirements for you that k3s can be built in the OBS as an RPM?
It is not my intention to complicate things with this request but to make it easier. For me installing an RPM is the easiest way to manage the software I have on my system. I understand that this is not the opinion of everyone but I would like to see it possible that I can go my way and others can go theirs.
SchoolGuy commentedon May 29, 2022
Okay I am running into build trouble while building k3s but so far the changes I have come up with are rather minimal...
SchoolGuy commentedon May 29, 2022
Okay I tried digging further into the build failure but I don't find a clue here to continue sadly. Help would be much appreciated:
SchoolGuy commentedon May 30, 2022
Okay the upgrade to go 1.17 solved my issue. It seems the
go.modfile onmasteris maybe outdated?SchoolGuy commentedon May 30, 2022
I was successful 🥳
A lot can be improved by me optimizing the specfile and ripping the build in multiple subpackages so eventually one can build with a
_servicefile and there is no need anymore to execute something on a local machine.SchoolGuy commentedon Jun 7, 2022
@brandond What would be your wishes in terms for my refactoring of the k3s build scripts? I have multiple ideas and options. The minimal intrusive changes I already posted above but for a better compatibility I would love to do more. I have much more ideas for cleaning up the scripts folder. I would love to upstream those ideas and even maintain the rpm for you in openSUSE. The only thing I would need is that we work together in terms of what you need so I can find the middle ground that suits both of us.
TheBigBear commentedon Jun 24, 2022
@SchoolGuy do you have a git branch that allows one to build [ pre-release and unofficial ( for now)] k3s RPMS right now?
SchoolGuy commentedon Jun 24, 2022
@TheBigBear I have something locally. I will clean it up and then provide a branch plus PR. Will take me over the weekend probably.
SchoolGuy commentedon Jun 30, 2022
@TheBigBear I have created WIP PR #5793, I will try to take time and refine it during the weekend.
cwayne18 commentedon Jul 20, 2022
While we're happy for the k3s community to support/maintain k3s as RPM's, there is currently not any plans for the k3s team to build on OBS as an upstream.
SchoolGuy commentedon Jul 20, 2022
@cwayne18 Yes I am aware and accept that. However it would be nice of your buildscripts to make it easier and allow it. I have a WIP PR open where I am currently refactoring them so it is easier to do that.
benridley commentedon Sep 29, 2022
@cwayne18 I would love for the k3s team to reconsider their position on not providing official RPM/DEB packages.
If I can share my experience: Installing Kubernetes in enterprise environments is often a horrendous experience with a multitude of random shell scripts, container images, systemd units, CNI plugins, etc all required. This is especially bad in air-gapped environments where you must bring all these things together on some internally hosted infra. In my opinion, k3s is uniquely placed to address these challenges because it is already delivered as a single binary. The installation process is really lacking, however, because it relies on running a shell script that brings in lots of artifacts from across the internet and does not play nicely with the native package managers that exist on RHEL and Debian systems.
k3s would be a no-brainer in enterprise environments if the team provided official RPM and Deb repos that allowed organisations and administrators to simply
dnf/apt install k3sand get everything you needed. Plus, this provides a simple and sustainable way for admins to update k3s because they can utilize the existing package management mechanisms. Right now, this is also a manual process relying on downloading and unpacking releases etc.I would be happy to provide effort to enable this. I think it would be the best way to deploy and maintain k8s in these kinds of environments.
SchoolGuy commentedon Sep 29, 2022
@benridley My PR is doing 90% of the work for this. Feel free to test it. I am not able to get SELinux to work atm because either I need to adjust the SELinux policy to take the host binaries or I need to link the userspace of whatever OS I am building on atm. Both things are the famous 10% that take 80% of the time. If you don't care about SELinux my PR is working wonderfully according to my testing.
UnconventionalMindset commentedon Jan 29, 2023
is anyone still working or interested in this?
SchoolGuy commentedon Jan 29, 2023
I am. However I am blocked by the k3s maintainers to actually get this in.
Edit: My RPM in the OBS is not compatible with selinux due to the missing copy of the userspace. However without selinux the RPM that is depending on my PR is fully functional.
27 remaining items
c4t3l commentedon Aug 27, 2024
+1 this is still valid
SchoolGuy commentedon Aug 27, 2024
I am renewing my commitment to the closed PR if upstream decides to accept my contributions.
The proposed solution by my does not interfere with the build system choosen by the k3s maintainers, it merly allows an additonal way that enabled the community to build k3s as an RPM to allow it to integrate with traditional management of system components.
This is beneficial to SUSE as a company as our customers now would be able to use Uyuni/SUMAs Content Lifecycle Management to be able to deploy their SUMA managed edged servers to depend less on custom scripting that is currently used to work around this limitation of k3s, reducing the amout of support for those particular customer(s). Further potential synergies are that k3s could now be integrated with CVE scanners that can crosscheck installed versions of RPMs against the CVE database. Lastly we would benefit from this because we can patch those mentioned CVEs without needing to release a new upstream version of k3s to fix those as the OBS automatically rebuilds RPMs when transitive dependencies change, this should gave package maintainers the peace of mind that they only need to worry about their own source code and not about the entire vendored userspace.
clintfred commentedon Oct 11, 2024
+1 still relevant. We are looking to use this in space and having a well-maintained deb/rpm package is a must.
SchoolGuy commentedon Oct 12, 2024
I can again just urge all customers of SUSE/Rancher to contact their corresponding contacts at our company to push this up the chain. I am still internally trying to make this happening but without customers (and the linked revenue) it seems there is no levers I can push at the moment.
I am sorry that this issue is still not implemented but my options from the other side of the business seem limited.
For Rancher folks reading this: I still believe that this is beneficial and I still stand by my offer to rebase my PR anytime you give me the green light. This will not interfere with how you desire to ship your project, it will just offer a second way.
denisgolius commentedon Oct 29, 2024
For me, It would be easier to create a repository for k3s rpm builds and build rpms via fedora COPR, as I did here.
PS: i'm thinking to do the same for apt repositories
vincebrannon commentedon Nov 14, 2024
Raised jira SURE-9364
github-actions commentedon Dec 29, 2024
This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 45 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions.
a1994sc commentedon Dec 29, 2024
Still an issue
cwayne18 commentedon Dec 29, 2024
Still not planned
a1994sc commentedon Dec 29, 2024
Not complete
c4t3l commentedon Dec 30, 2024
@cwayne18 please re-open. This is still a valid request.