Commit graph

4093 commits

Author SHA1 Message Date
Brad Davidson
1ba19856de Add tests for control-plane component arg generation
Use mocked executor to ensure the correct args are being passed to components

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-31 17:09:43 -07:00
Brad Davidson
ee036f7bc9 Fix issue caused by default authorization-mode apiserver arg
Move arg-parsing helper functions into util, and use them to see if the user has set an authorization-config flag - and do not set authorization-mode if so.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-31 17:09:43 -07:00
Brad Davidson
0eeac6a622 Rework mock executor using gomock for call validation
Generate the mock executor with mockgen and convert existing uses of the mock executor to set it up properly.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-31 17:09:43 -07:00
Brooks Newberry
441a42e8ce
Update stable channel to v1.32.3+k3s1 (#12020)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2025-03-27 11:44:53 -07:00
Derek Nola
7fed27f62e
Publish k3s image to ghcr (#11835)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-26 09:40:54 -07:00
Brad Davidson
d45006be66 Move etcd ready channel into executor
This eliminates the final channel that was being passed around in an internal struct. The ETCD management code passes in a func that can be polled until etcd is ready; the executor is responsible for polling this after etcd is started and closing the etcd ready channel at the correct time.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-24 12:42:29 -07:00
Brad Davidson
72bbd676f1 Fix etcd tests to use mock executor
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-24 12:42:29 -07:00
Brad Davidson
a8bc412422 Move container runtime ready channel into executor
Move the container runtime ready channel into the executor interface, instead of passing it awkwardly between server and agent config structs

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-24 12:42:29 -07:00
Brad Davidson
529e748ac7 Move apiserver ready wait into common channel
Splits server startup into prepare/start phases. Server's agent is now
started after server is prepared, but before it is started. This allows
us to properly bootstrap the executor before starting server components,
and use the executor to provide a shared channel to wait on apiserver
readiness.

This allows us to replace four separate callers of WaitForAPIServerReady
with reads from a common ready channel.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-24 12:42:29 -07:00
Brad Davidson
2c133692b2 Increase log output while waiting for apiserver ready
Increases log verbosity but decreases polling frequency to avoid
spamming the console. It usually takes a couple seconds for the
apiserver to come up anyway.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-24 12:42:29 -07:00
Brad Davidson
c11c06cad4 Add context to agent token validation error
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-24 12:42:29 -07:00
Derek Nola
7837d29269
Fix upgrade test container version (#11996)
* Fix upgrade test container version

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

* Ensure CI cleanup on all docker tests

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

Fix cleanup

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

* Bump skew test timeout

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-21 15:31:19 -05:00
Brad Davidson
2f3233bc73 Bump to containerd v2.0.4
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-21 12:49:20 -07:00
Brooks Newberry
76c5c770b2
Fix skew test for release candidates (#11972)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2025-03-19 23:40:28 -07:00
Robert Rose
5e1845b7c1 Remove resources created by addon before deleting addon (#11975)
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>
2025-03-19 14:33:20 -07:00
Orlix
ba4a6384e3
Add Community Management (#11926)
* Add Community Managment

Signed-off-by: orlin.vasilev@suse.com
2025-03-17 14:07:57 -07:00
Brooks Newberry
04a352eb16
update kubernetes to v1.32.3-k3s2 (#11969)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2025-03-14 12:45:43 -07:00
Brooks Newberry
89f3e45f01
update Kubernetes to v1.32.3-k3s1 (#11961)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2025-03-12 14:05:27 -07:00
Derek Nola
ac38633c71
Migrate to UrfaveCLI v2 (#11831)
* Bump rootlesskit tov 1.1.1, last of the v1 line
* Migrate to urfavecli v2
* Disable StringSlice seperattion

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-12 09:02:45 -07:00
Derek Nola
55be8e8a95
Fix number of Serial Conformance tests run (#11894)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-12 09:01:58 -07:00
Brad Davidson
781640ecea Fix syncing empty list of apiserver addresses during initial startup
Also add more debug logging to the sync process.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-11 14:49:45 -07:00
Derek Nola
3ce7ca7544
Bump klipper-lb image (#11898)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-10 09:49:17 -07:00
Derek Nola
1d7ec2276d
Fix flaky rootless E2E test (#11899)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-10 09:43:12 -07:00
Brad Davidson
0a47df6f60 Bump etcd to v3.5.19
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 08:13:28 -08:00
Derek Nola
fb870adb91
Reenable skew test for 1.32/master (#11885)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-06 08:55:13 -08:00
Brad Davidson
d694dd1db9 Add periodic background snapshot reconcile
Interval is configurable with new etcd-snapshot-reconcile-interval flag

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-05 12:18:19 -08:00
Brad Davidson
bed1f66880 Avoid use of github.com/pkg/errors functions that capture stack
We are not making use of the stack traces that these functions capture, so we should avoid using them as unnecessary overhead.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-05 00:41:38 -08:00
Brad Davidson
66d0f1604a Bump to containerd v2.0.3/runc v1.2.5
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-03 12:00:56 -08: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
Anders Larsson
8aa543eb87 Add netfilter statistic module to check-config
Signed-off-by: Anders Larsson <anders.git@larsson.xyz>
2025-02-28 09:53:53 -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
Derek Nola
a764989931 Move away from docker e2e images, use gcr and ghcr
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-28 08:46:10 -08:00
Derek Nola
a61e581cb3 Migrate svcpolicies E2E test to docker
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-28 08:46:10 -08:00
Derek Nola
380a70ac7e Expand E2E test matrix to cover all possible tests that fit on GHA
Fix rootless test

Fix svc firewall E2E test, broken by #11711

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-28 08:46:10 -08:00
Derek Nola
9865ab1f6e Replace e2e.ParseNodes function with general ParseNodes and NodesReady test functions
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-28 08:46:10 -08:00
Derek Nola
f2f3c93ea7 Add E2E AllNodes helper function
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-28 08:46:10 -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
Rafael
0867baa46f
Update stable channel (#11855)
Signed-off-by: Rafael Breno <32229014+rafaelbreno@users.noreply.github.com>
2025-02-27 16:32:41 -03:00
Brad Davidson
20133ad151 Increase e2e log verbosity and collect logs on failure
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-27 11:19:26 -08:00
Brad Davidson
e7b52cd63d Fix panic when secret-encrypt status is checked before runtime core is ready
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-27 11:19:26 -08:00
Brad Davidson
f940368747 Use etcd proxy to bootstrap control-plane-only nodes, if possible
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-27 11:19:26 -08:00
Brad Davidson
244bfd0c35 Use existing server-CA and hash if available
Also wraps errors along the cluster prepare path to improve tracability.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-27 11:19:26 -08:00
Brad Davidson
53fcadc028 Serve HTTP bootstrap data from datastore before disk
Fixes issue where CA rotation would fail on servers with join URL set due to using old data from disk on other server

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-27 11:19:26 -08:00
github-actions[bot]
148f8abd3a
chore: Bump golang:alpine version (#11837)
Made with ❤️️ by updatecli

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-25 09:00:59 -08:00
Brad Davidson
5894af30ff Move CR APIs to k3s-io/api
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-24 11:17:27 -08:00
Brad Davidson
4043c44d26 Bump containerd for go-cni deadlock fix
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-21 12:25:10 -08:00
Brad Davidson
f710d4900c e2e: wait for deployments before getting logs
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-20 16:46:58 -08:00
Brad Davidson
67cbe75c84 e2e: Fix curl test timeouts
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-20 16:46:58 -08:00
Brad Davidson
2b6225eeff Fix missing migration for containerd registry.configs plugin namespace
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-20 16:46:58 -08:00
Brad Davidson
7b1c48212a Render CNI dir config whenever vars are set
RKE2 on Windows sets CNI bin dirs in node config even though embedded flannel is disabled (NoFlannel=true). We need to gate rendering this config on the vars being, set NOT on NoFlannel being false.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-20 16:46:58 -08:00