Commit Graph

3532 Commits

Author SHA1 Message Date
Derek Nola
c150e0933e Consolidate build-k3s GHA workflow for OS and ARCH (#12080)
Signed-off-by: Derek Nola <derek.nola@suse.com>
(cherry picked from commit 7c552f89c8)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 14:28:22 -07:00
Brad Davidson
3804a0f2b9 Silence vagrant progress output
Add --no-tty flag to all `vagrant up` commands to silence the printing of box loading progress

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 08c6c7423b)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 14:28:22 -07:00
Brad Davidson
895bf636d7 Add ReusePort/ReuseAddr flags to etcd config
Addresses flakes in etcd CI due to the port still being in TIME_WAIT after the server is shut down between tests

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 9deef77eef)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 14:28:22 -07:00
Brad Davidson
f497eb0522 Bump to traefik/v2.11.22, coredns/v1.12.1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 7cdf0fa688)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 14:28:22 -07:00
manuelbuil
93bd4bb2a1 Add error in certificate check
Signed-off-by: manuelbuil <mbuil@suse.com>
2025-04-11 13:37:37 -07:00
Derek Nola
9e5267e384 Remove double error check
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-09 01:01:06 -04:00
Derek Nola
37ceaca12a Align Value CLI
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-09 01:01:06 -04:00
Derek Nola
af9c58ec75 Mark rotate-keys as GA
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-09 01:01:06 -04:00
Derek Nola
e66881bd97 Implement secrets-encryption secretbox provider
- Add testlet for new provider switch
- Handle migration between providers
- Add exception for criticalcontrolargs
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-09 01:01:06 -04:00
Derek Nola
6148260a42 Cleanup anonymous and named volumes for docker tests (#12076)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-08 17:15:11 -04:00
Brad Davidson
0dd43a9ba9 Fix flakey etcd startup tests
Increase etcd shutdown delay to avoid "bind: address already in use" errors seen in CI. Also uses test TmpDir to ensure dir is cleaned up between tests.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-02 11:38:51 -07:00
Brad Davidson
c42cc2d43c 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>
(cherry picked from commit 1ba19856de)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-02 11:38:51 -07:00
Brad Davidson
028bbc7745 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>
(cherry picked from commit ee036f7bc9)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-02 11:38:51 -07:00
Brad Davidson
d8221573e3 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>
(cherry picked from commit 0eeac6a622)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-02 11:38:51 -07:00
Brad Davidson
e8079602af 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>
(cherry picked from commit d45006be66)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-31 17:22:44 -07:00
Brad Davidson
6f0212ab9a Fix etcd tests to use mock executor
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 72bbd676f1)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-31 17:22:44 -07:00
Brad Davidson
ceaa23e65e 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>
(cherry picked from commit a8bc412422)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-31 17:22:44 -07:00
Brad Davidson
f3f7899521 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>
(cherry picked from commit 529e748ac7)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-31 17:22:44 -07:00
Brad Davidson
9989f5e69a 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>
(cherry picked from commit 2c133692b2)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-31 17:22:44 -07:00
Brad Davidson
f13bf11348 Add context to agent token validation error
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c11c06cad4)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-31 17:22:44 -07:00
Derek Nola
51fb5b7843 Migrate to UrfaveCLI v2 (#11831) (#12030)
* 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-31 13:39:46 -07:00
Derek Nola
e050ca66d1 [Release-1.31] Fix upgrade test container version (#11999)
* Fix upgrade test container version

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

* Force docker test cleanup in CI

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>
v1.31.7-rc3+k3s1 v1.31.7+k3s1
2025-03-21 15:31:53 -05:00
Brad Davidson
0ffa790f25 Bump to containerd v2.0.4
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-21 12:49:29 -07:00
Brooks Newberry
de295ecbee fix skew test container version (#11990)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
v1.31.7-rc2+k3s1
2025-03-19 23:42:48 -07:00
Brooks Newberry
536ee715af Update to v1.31.7 (#11958)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
v1.31.7-rc1+k3s1
2025-03-12 13:06:56 -07:00
Brad Davidson
e566886305 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>
(cherry picked from commit 781640ecea)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-11 20:28:51 -07:00
Derek Nola
e434e583e3 Merge pull request #11927 from dereknola/bump_klipper_lb_1.31
[Release-1.31] Bump klipper-lb to v0.4.13
2025-03-10 15:17:23 -07:00
Derek Nola
310ce7a63f Bump klipper-lb image (#11898)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-10 11:32:37 -07:00
Derek Nola
02c824e036 Fix flaky rootless E2E test
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-07 14:46:16 -08:00
Brad Davidson
ca4b30d2cd Bump etcd to v3.5.19
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 0a47df6f60)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Brad Davidson
6adca198c7 Add periodic background snapshot reconcile
Interval is configurable with new etcd-snapshot-reconcile-interval flag

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit d694dd1db9)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Brad Davidson
3cb6c2dc92 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>
(cherry picked from commit bed1f66880)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Brad Davidson
ab09acdc20 Bump to containerd v2.0.3/runc v1.2.5
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 66d0f1604a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Anders Larsson
35e0a96364 Add netfilter statistic module to check-config
Signed-off-by: Anders Larsson <anders.git@larsson.xyz>
(cherry picked from commit 8aa543eb87)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Brad Davidson
79a15a3258 Fix panic when secret-encrypt status is checked before runtime core is ready
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e7b52cd63d)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Brad Davidson
936e9a0f2e Use etcd proxy to bootstrap control-plane-only nodes, if possible
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f940368747)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Brad Davidson
62fbed7ed5 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>
(cherry picked from commit 244bfd0c35)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Brad Davidson
58168ac103 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>
(cherry picked from commit 53fcadc028)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Brad Davidson
cc21eb0e4d Move CR APIs to k3s-io/api
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5894af30ff)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Somesh Bhalsing
5129f24ed2 fix: move CONFIG_SECCOMP to generally necessary category in check-config command
Signed-off-by: Somesh Bhalsing <somesh.bhalsing@gmail.com>
(cherry picked from commit 6131ea15b2)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Brad Davidson
ea2716f419 Add etcd snapshot metrics
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 6199b79f4b)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Brad Davidson
bd9bf89849 Add static bin dir support to k3s docker image
Static bin dir is first in search path and is on /var/lib/rancher/k3s volume, which can be persisted by users. If the volume is empty it will just fall back to the legacy /bin dir.

(cherry picked from commit b2d495e17f)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-07 14:46:16 -08:00
Derek Nola
caca8a2846 Move away from docker e2e images, use gcr and ghcr
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-05 14:25:40 -08:00
Derek Nola
1558d39634 Migrate svcpolicies E2E test to docker
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-05 14:25:40 -08:00
Derek Nola
428065d9b4 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-03-05 14:25:40 -08:00
Derek Nola
86aec412af Replace e2e.ParseNodes function with general ParseNodes and NodesReady test functions
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-05 14:25:40 -08:00
Derek Nola
633e50a982 Add E2E AllNodes helper function
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-05 14:25:40 -08:00
Derek Nola
931af8d071 Fix typo on conformance script (#11792)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-05 14:25:40 -08:00
Derek Nola
83c71763a2 Migrate E2E SecretsEncryption to Docker test
Remove secrets encryption E2E from Drone

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-05 14:25:40 -08:00
Derek Nola
ac91f9567c Don't run snapshotrestore on flaky arm64 runners
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-05 14:25:40 -08:00