Commit graph

40 commits

Author SHA1 Message Date
Tom Risse
1501d1096d fix: install.sh: Simplify handling for fedora rpm-ostree based distributions
Some checks failed
govulncheck / govulncheck (push) Has been cancelled
Install Script / build (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Install Script / Smoke Test (push) Has been cancelled
Signed-off-by: Tom Risse <tom@becarusys.de>
2026-03-10 14:16:57 -07:00
Manuel Buil
702aba6f37 Make artifact URL prefix configurable
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Install Script / build (push) Has been cancelled
Install Script / Smoke Test (push) Has been cancelled
Signed-off-by: Manuel Buil <mbuil@suse.com>
2026-02-23 15:18:32 +01:00
Derek Nola
380be5ab3b
Support commit builds via GHA artifacts (#13559)
* Support commit builds via GHA artifacts
* Removed old STORAGE_URL, Fix undefined == sh behavior

Signed-off-by: Derek Nola <derek.nola@suse.com>
2026-02-06 08:29:23 -08:00
Will Stephenson
6ba8efd7a1 create policy hint only when all variables defined
Signed-off-by: Will Stephenson <wstephenson@suse.com>
2025-10-08 15:01:51 -07:00
Zachary Spar
908a0b91dc
Fix install script raspi cmdline message (#12842)
* Fix install script raspi cmdline message

Signed-off-by: Zachary Spar <41600414+zachspar@users.noreply.github.com>
2025-09-19 08:35:48 -07:00
manuelbuil
0136cf2589 Remove NetworkManager check for nm-cloud.service
Signed-off-by: manuelbuil <mbuil@suse.com>
2025-09-15 13:21:32 -07:00
Caio Torres
b8cf676807
fix error on distros without VERSION_ID in os-release 2025-06-05 11:50:06 -07:00
Derek Nola
3ce4a6352d
Build k3s overhaul (#12200)
* Add full ci support without Dapper
* Seperate git and other version tags, improves caching on binary builds
* Use new local targets for build-k3s.yaml workflow
* Allow optional ghcr build caching
* Build binary using GHA native commands
* Use internal setup-go action for e2e.yaml
* Add emulation builds to k3s-build.yaml (for arm32 and future riscv64)
* Be consistent in k3s artifact names
* Fix package/dockerfile warnings
* Fix install script for PR installs

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-25 11:57:10 -07:00
Brad Davidson
864ed2a4f1 Set User in k3s systemd unit
This ensures that the $HOME and $USER env vars get set. We have worked around this on the RKE2 side by setting it manually in the default .env file:
https://github.com/rancher/rke2/blob/master/bundle/lib/systemd/system/rke2-server.env

This is required for loading credentials from shared credentials files (`/root/.aws/credentials`)

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-03 11:45:45 -08:00
muicoder
d50106fcba Fix memory cgroup check on kernels without v1 controller support
Signed-off-by: muicoder <muicoder@gmail.com>
2025-02-28 08:50:20 -08:00
Brad Davidson
1c6dc31b1a Fix memory cgroup check on kernels without v1 controller support
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-27 21:20:06 -08:00
Reinhard Nägele
a0cfc6689d Make GITHUB_URL overridable
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2025-01-30 14:37:54 -08:00
Reinhard Nägele
dde2fef0c5
Fix K3S_DATA_DIR when running as non-root user (#11378)
When running the generated kill and uninstall scripts, the environment
variable `K3S_DATA_DIR` got lost, because `sudo` by default doesn't
preserve the environment. This is fixed by adding the `--preserve-env`
flag.

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2025-01-10 10:07:58 -08:00
Brad Davidson
0e15269e99 Fix INSTALL_K3S_PR support
Filter check names server-side instead of with jq. With recent changes to CI we now have more than 30 check runs, which is more than the API will return by default. Rather than paginating or increasing the page size, ask the server to filter for us.

Also replaces the awk/sort/head with jq split/sort/last

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-27 12:56:33 -08:00
Thomas Gleason
b83f80372a
allow install script to print error on failed binary download (#11335)
Signed-off-by: Thomas Gleason <tommatime@proton.me>
2024-11-21 09:27:29 -08:00
Derek Nola
4f714d39a0
Capture all fedora atomic variants in install script (#11170)
* Capture all fedora atomic variants in install script

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Cover bluefin and other "fedora-like" OS as well

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-10-31 09:22:49 -07:00
Papiris
f288ccea7e
Remove trailing whitespace (#9362)
* Remove trailing whitespace from install.sh

Signed-off-by: Papiris <contributions@ingeniorskap.no>

* Update install.sh.sha256sum

Signed-off-by: Papiris <contributions@ingeniorskap.no>

---------

Signed-off-by: Papiris <contributions@ingeniorskap.no>
2024-10-02 09:51:11 -07:00
Brad Davidson
649678bd89 Fix k3s-killall.sh support for custom data dir
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-08-13 09:23:12 -07:00
ChrisBeaker
019b0afdd8
Fix: Add $SUDO prefix to transactional-update commands in install script (#10531)
* Fix: Add $SUDO prefix to transactional-update commands in install script

This commit addresses an issue in the k3s install script where the transactional-update commands did not include the $SUDO variable. This omission caused the script to fail if sudo was not used. Adding the $SUDO prefix ensures that the script runs correctly in all environments.

Signed-off-by: ChrisBeaker <christian.siebigteroth@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-08-12 15:28:36 -07:00
Derek Nola
acb71ee379 Allow Amazon Linux 2 rpm installs
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-08-07 13:03:53 -07:00
Derek Nola
79ec016b6d Allow kylin V10 rpm installs
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-Authored-By: ErikJang <81848652+erikjang@users.noreply.github.com>
2024-08-07 13:03:53 -07:00
Derek Nola
8ff7d162cc Allow fedora iot rpm installs
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-Authored-By: Blayne Campbell <5565939+bcambl@users.noreply.github.com>
2024-08-07 13:03:53 -07:00
Derek Nola
45c04f3502 Allow Amazon Linux 2023 rpm installs
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-Authored-By: ahmedali6 <87921765+ahmedali6@users.noreply.github.com>
2024-08-07 13:03:53 -07:00
Vitor Savian
3aceb85c22 Add a change for killall to not unmount server and agent directory
Signed-off-by: Vitor Savian <vitor.savian@suse.com>

Add recursive search and deletion of unmounted/mounted dirs in killall

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

Only clean the server and agent directory if it is uninstall

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

Add uninstall test to check mount points

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

Add uninstall test in CI

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2024-08-07 10:06:12 -07:00
Jake Hyde
b045465178 Add data-dir to uninstall and killall scripts
Signed-off-by: Jake Hyde <jakefhyde@gmail.com>
2024-07-10 12:46:43 -07:00
Brad Davidson
d1709d60ce Fix INSTALL_K3S_PR support
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-10 09:21:50 -07:00
Derek Nola
4204248bc3
Check for bad token permissions when install via PR (#10387)
* Check for bad token permissions when install via PR

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-07-09 08:36:56 -07:00
Brad Davidson
e8950a0a3b Fix issue installing artifacts from builds with multiple runs
Also makes error handling and variable capitalization consistent with other functions.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-23 13:50:24 -07:00
Derek Nola
3e948aa0d5
Correct formatting of GH PR sha256sum artifact (#9472)
* Conform to how the install script wants the sha256sum name
* Remove no-op sed for GH PR install

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-03-01 08:45:01 -08:00
Mikhail Vorobyov
701e7e45ce Fix iptables check when sbin isn't in user PATH
Signed-off-by: Mikhail Vorobyov <mikhail.vorobev@uni.lu>
2024-02-09 13:59:47 -08:00
Derek Nola
fcd1108e73
Add ability to install K3s PR Artifact from GitHub (#9185)
* Add support for INSTALL_K3s_PR

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add sha256sum to K3s PR artifacts

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Update install sha256sum

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Revert whitespace changes

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-02-06 16:30:12 -08:00
ifNil
102ff76328
Print error when downloading file error inside install script (#6874)
* Print error when downloading file error inside install script
* Update install.sh.sha256sum

Signed-off-by: yhw <2278069802@qq.com>
2024-01-04 21:30:33 -08:00
Brad Davidson
08ccea5cb6 Fix install script checksum
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-04 12:57:31 -08:00
Manuel Buil
30449e0128 Add 2>dev/null when checking nm-cloud systemd unit
Signed-off-by: Manuel Buil <mbuil@suse.com>
2024-01-03 09:36:11 +01:00
Derek Nola
fa4c180637
Update install.sh sha256sum (#8885)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-11-16 09:40:52 -08:00
Samuel Mutel
19fd7e38f6 enh: Force umount for NFS mount (like with longhorn)
Signed-off-by: Samuel Mutel <12967891+smutel@users.noreply.github.com>
2023-11-14 16:34:43 -08:00
Brad Davidson
bbafb86e91 Don't use iptables-save/iptables-restore if it will corrupt rules
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-07 10:01:27 -08:00
Hussein Galal
112e1339b7
Restore selinux context systemd unit file (#8593)
* Restore context of systemd unit file

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Restore context of systemd unit file

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* update the hash of install.sh file

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2023-10-31 22:54:09 +02:00
Manuel Buil
e33359d375 Update install.sh.sha256sum
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-10-06 15:31:37 +02:00
Jose D. Gomez R
79b44cee29
Create and validate install.sh signatures (#8312)
- SHA256 Signature of the install script
- Added a sha256sum invocations in the validate script.

  These calls will validate that the install script signatures
  match. And when the script is changed the signatures must be
  recalculated as reported by the error message in sha256sum.

Signed-off-by: Jose D. Gomez R <jose.gomez@suse.com>
2023-09-27 12:34:08 -07:00