Current syntax is incorrect, and while it doesn't break the test it is throwing an error in the logs
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
* Move to more secure split trivy workflow based on labels, not comments (#12592)
Signed-off-by: Derek Nola <derek.nola@suse.com>
* Add basic fuzz test
Signed-off-by: Derek Nola <derek.nola@suse.com>
* Add retry around common timeout for hardened docker test (#12601)
Signed-off-by: Derek Nola <derek.nola@suse.com>
* Remove ghcr build cache (#12602)
Signed-off-by: Derek Nola <derek.nola@suse.com>
* Migrate K3s Release Artifacts to GHA (#12606)
Signed-off-by: Derek Nola <derek.nola@suse.com>
---------
Signed-off-by: Derek Nola <derek.nola@suse.com>
The install script was starting the service, and then the test itself was restarting it immediately thereafter, which caused frequent flakes.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 0446d79e27)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
* 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>
Move the `ipv4` and `ipv6` constants to their own constant
declaration. This ensures that the `iota` expression for the `ipv4`
constant evaluates to 0, not some arbitrary value. (`iota` evaluates
to N for the Nth constant in the constant declaration; see
<https://go.dev/ref/spec#Iota>.) This is also more idiomatic, which
improves readability.
Also switch from incremental integers to bit flags, and use bitwise
operators for checking. This is more idiomatic (the integer is
treated like a set of booleans), it avoids some code duplication, and
it is necessary to avoid ambiguity. Consider the following:
const (
ipv4 = iota
ipv6
)
In the above, `ipv4` would have the value 0 and `ipv6` would have the
value 1. This would make it impossible to distinguish an IPv6-only
stack from a dual-stack configuration because `ipv6` would equal
`ipv4 + ipv6`. With bit flags this problem doesn't exist.
And put the integer holding the bit flags in a custom type with
convenience methods to improve readability.
Signed-off-by: Richard Hansen <rhansen@rhansen.org>
(cherry picked from commit 925726c84d)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Normally K3s will import all tarballs in the image dir on startup, and
re-import any tarballs that change while it is running.
This change allows users to opt into only importing tarballs that have
changed since they were last imported, even across restarts.
This behavior is opted into by touching a `.cache.json` file in the
images dir. This file is used to track the size and mtime of the image
files when they are imported.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 67291090ca)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Remove the AddOn last, after any resources it created in the cluster
have been deleted and the AddOn file is removed.
Signed-off-by: Robert Rose <robert.rose@mailbox.org>
(cherry picked from commit 5e1845b7c1)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>