Commit Graph

3408 Commits

Author SHA1 Message Date
Brad Davidson
ab00e91c75 Disable s3 transport transparent compression/decompression
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit fd8348324d)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Derek Nola
bd1615011f chore: Bump klipper-lb and klipper-helm (#11595)
* Bump klipper-lb to v0.4.10

Bump klipper-helm to v0.9.4
Signed-off-by: Derek Nola <derek.nola@suse.com>

* Bump helm-controller

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
(cherry picked from commit 08c30f5ae6)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Maja Bojarska
8171dee6a8 Align etcd-snapshot-dir default path description
The effective snapshot dir is "${data-dir}/server/db/snapshots". The
server segment is missing in the CLI-reported default path, potentially
misleading the user about the actual default snapshot destination.

Signed-off-by: Maja Bojarska <majabojarska98@gmail.com>
(cherry picked from commit 646e3135bc)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Derek Nola
e575620487 Bump timeouts for slow arm Drone runners
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
090f738182 Improve error checks around FetchIngressIP
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
09c044d22b Check the deployments in E2E WASM test
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
e41956a777 Fix skew test on v1.31 and older
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
691ee2efa8 Convert docker conformance test to go test framework (#11643)
* Migrate conformance docker test

Switch to hydrophone from sonobuoy
Support serial conformance

* Replace docker tests with go version on arm32 Drone pipeline
* Support multiple DB, push hydrophone logs to test output
* Replace  etcd and sqlite conformance tests with golang versions
* Retry on flaky btrfs section
* Fix db cleanup for sqlite, be explicit on the dbtype

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
b64b9153ed Consolidate test utility functions into top level package (#11711)
* [e2e] Convert RunCmdOnNode to method
* Consolidate e2e variables into TestConfig struct
* Consolidate docker and integration test helper functions
* E2E: Directly count daemonsets, not their pods
* Add missing Context levels for E2E tests
* Migrate e2e.ParsePods to new tests client package
* Run the go test compile test on their respective architectures

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
a2f6657f48 Run Docker test on Github Actions arm64 runners (#11705)
* Build and Run Arm64 Docker Tests
* Compile go tests for both amd64 and arm64
* Use version.sh to determine channel, not git
* Consolidate docker tests into 2D matrix
* Remove old Docker test from Drone and Github Actions

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
10307c616e Fix e2e pipeline due to vagrant cloud infra issues (#11706)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
c4c532ce7b assign GOCOVERDIR in docker tests
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
e19a1e1e9e Convert snapshotrestore from E2E to Docker test
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
3b28ed5793 DRY Docker test configuration strucutres - Reduce TestConfig fields, rename secret -> token - remove unused ENV control vars - Consolidate DeployWorkload function similar to E2E function
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
dd65505ef9 Make (Docker) RunOnNode a method
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
9fe819eee1 Replace docker go test SERVER_ARGS env with config.yaml injection
Signed-off-by: Derek Nola <derek.nola@suse.com>

x

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
Derek Nola
63d30bc249 Add support for restarting k3s docker nodes
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 21:18:18 -08:00
manuelbuil
3347947dd2 Correct the k3s token command help
Signed-off-by: manuelbuil <mbuil@suse.com>
2025-01-30 12:08:28 +01:00
Brad Davidson
18c072e595 Update tests
Also add an ordinal to subtests so its easier to figure out which one is failing

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
v1.30.9-rc2+k3s1 v1.30.9+k3s1
2025-01-23 21:27:58 -08:00
Brad Davidson
dbb80256e4 Remove local restriction for deferred node password validation
Restricting deferred node password validation to only requests from the local node is not possible without breaking split-role cluster cold start. There are too many cases where node password secrets may not yet be available due to the apiserver not being up.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-23 21:27:58 -08:00
Rafael
6d4a3092ed Update to v1.30.9 (#11618)
Signed-off-by: Rafael Breno <32229014+rafaelbreno@users.noreply.github.com>
v1.30.9-rc1+k3s1
2025-01-16 14:56:21 -03:00
Brad Davidson
be4b1bcdba Fix local password validation when bind-address is set
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit d0ea741b13)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-15 15:49:47 -08:00
Hussein Galal
9515436e80 Load kernel modules for nft in agent setup (#11597)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2025-01-14 01:14:20 +02:00
Derek Nola
e36edc3eab Fix skew semver for release-XX branches (#11531)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-01-13 12:16:54 -08:00
Derek Nola
436bce722f Upload E2E logs on failure as GHA artifacts (#11514)
* Upload E2E journald logs as artifacts in GHA

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

* Improve fork information for parent extraction

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-01-13 12:16:54 -08:00
Derek Nola
668f7f1b45 Add "k3s certificate check" clause for better test coverage (#11485)
* Add "k3s certificate check" clause for better test coverage

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

* Add table support to cert check

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-01-13 12:16:54 -08:00
Derek Nola
db6dd12639 Fix docker check warnings (#11474)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-01-13 12:16:54 -08:00
Derek Nola
47e9067bd1 Fix leap install test (#11379)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-01-13 12:16:54 -08:00
Derek Nola
7bc5ee97b1 Convert legacy docker tests from bash to golang (#11357)
* Convert the following Docker test from Bash to Go
    - basics
    - bootstraptoken
    - cacerts
    - compat -> skew
    - etcd
    - lazypull
    - upgrade

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

* Add Docker go tests to GHA
* Prebuild K3s Go Tests
* Strip go test binaries to reduce size
* Handle complex branch options

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

* Implement basic golang tests on arm and arm64 pipelines

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-01-13 12:16:54 -08:00
Vitor Savian
4331f452bb Add auto import images for containerd image store
* Add auto import images for containerd image store

* Add auto import images

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

* Fix EOF error log when importing tarball files

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

* Delaying queue

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

* Add parse for images

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

---------

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2025-01-11 01:58:20 -03:00
muicoder
5cd95dcd15 Update Traefik to v2.11.18
#11501
Signed-off-by: muicoder <muicoder@gmail.com>
(cherry picked from commit 0144d9b749)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
7148c66fd9 Bump runc to v1.2.4
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 9b1b90b1fb)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
014f1a058f Add tests for supervisor request handlers
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f345697c0a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
a3d768a7de Replace *core.Factory with CoreFactory interface
Make this field an interface instead of pointer to allow mocking. Not sure why wrangler has a type that returns an interface instead of just making it an interface itself. Wrangler in general is hard to mock for testing.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e6327652f0)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
31ac700bc9 Move additional core/v1 mocks into tests package
Convert nodepassword tests to use shared mocks

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c20c06373a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
6c236d061f Move core/v1 mock into tests package for reuse
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 8f8cfb56b5)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
40f45e7dbb Add test for join existing cluster
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f8271d8506)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
d0ca7bec63 Handle cluster join as create if we're the only member
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 365372441b)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
fb7b765383 Add client-side certificate generation support
Clients now generate keys client-side and send CSRs. If the server is down-level and sends a cert+key instead of just responding with a cert signed with the client's public key, we use the key from the server instead.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit caeebc52b7)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
fcc5f32cfe Remove unused Certificate field from Node struct
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5b1d57f7b9)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
0d62e7308d Move request handlers out of server package
The servers package, and router.go in particular, had become quite
large. Address this by moving some things out to separate packages:
* http request handlers all move to pkg/server/handlers.
* node password bootstrap auth handler goes into pkg/nodepassword with
  the other nodepassword code.

While we're at it, also be more consistent about calling variables that
hold a config.Control struct or reference `control` instead of `config` or `server`.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 2e4e7cf2c1)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
muicoder
ebd9961896 Update Traefik to v2.11.17 (#11502)
#11501
Signed-off-by: muicoder <muicoder@gmail.com>
(cherry picked from commit 056cee8290)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
e4214f18de Fix snapshot flake
Avoid "snapshot save already in progress" flake when snapshot reconcile from previous save is still in progress.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 68fbd1a6b5)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson
d356517f12 Improve error handling of CheckDeployments test helper
Expose actual error, so that we can tell if the deployment is not found or not ready/available

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 93e548326a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
galal-hussein
481758e8ac RBAC changes for compat with AuthorizeNodeWithSelectors
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit b4747703b0)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
manuelbuil
d1ac892f09 If no etcd was deployed, fail etcd-snapshot with a useful error
Signed-off-by: manuelbuil <mbuil@suse.com>
2025-01-09 11:47:17 -08:00
Brooks Newberry
b43a365f27 Update to v1.30.8 (#11461)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
v1.30.8-rc1+k3s1 v1.30.8+k3s1
2024-12-12 07:15:16 -08:00
Arne Winter
18ed589122 add node-internal-dns/node-external-dns address pass-through support (#10852)
* add --node-internal-dns and --node-external-dns

Signed-off-by: Arne Winter <github@arnewinter.dev>
Co-authored-by: Brad Davidson <brad@oatmail.org>
(cherry picked from commit c4c11e51f1)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-11 17:09:48 -08:00
Brad Davidson
fe0a1baef5 Add hidden flag/var for supervisor/apiserver listen config
Add flags supervisor and apiserver ports and bind address so that we can add an e2e to cover supervisor and apiserver on separate ports, as used by rke2

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e143e0fa12)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:02:07 -08:00
Brad Davidson
4bc0ffdf9d Fix agent tunnel address on rke2
Fix issue where rke2 tunnel was trying to connect to apiserver port instead of supervisor

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5a5b136151)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:02:07 -08:00