Commit graph

3459 commits

Author SHA1 Message Date
Brad Davidson
2e4e7cf2c1 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>
2025-01-09 00:51:19 -08:00
dependabot[bot]
17feb8bed1
Bump codecov/codecov-action from 4 to 5 (#11336)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-08 10:44:46 -08:00
dependabot[bot]
9126939f79
Bump alpine from 3.20 to 3.21 in /package (#11432)
Bumps alpine from 3.20 to 3.21.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-08 10:40:19 -08:00
Rokibul Hasan
7baaecb3b9
Automate coredns version bumps with updatecli (#11482)
* Automate coredns version bumps with updatecli

Signed-off-by: Rokibul Hasan <mdrokibulhasan@appscode.com>

* Remove run-make-generate.sh

Signed-off-by: Rokibul Hasan <mdrokibulhasan@appscode.com>

---------

Signed-off-by: Rokibul Hasan <mdrokibulhasan@appscode.com>
2025-01-08 10:03:54 -08:00
muicoder
056cee8290
Update Traefik to v2.11.17 (#11502)
#11501
Signed-off-by: muicoder <muicoder@gmail.com>
2025-01-07 14:52:20 -08:00
Derek Nola
67ffd2ab1e
Fix skew semver for release-XX branches (#11531)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-01-07 12:25:42 -08:00
Derek Nola
c3460fce73
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-07 10:19:23 -08:00
Derek Nola
2f432a1cde
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-07 09:50:39 -08:00
Hussein Galal
e6f6fce676
Load kernel modules for nft in agent setup (#11524)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2025-01-07 03:01:02 +02:00
Hyouka
e64e2fcfd4
add IPv6 to cluster-dns Usage Docs (#11498)
Signed-off-by: rivolity <hamdaouiomar1@gmail.com>
2025-01-03 09:30:31 -08:00
Brad Davidson
68fbd1a6b5 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>
2024-12-20 14:41:40 -08:00
Brad Davidson
f83cce95cf Add test for kubelet config-dir
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-20 14:41:40 -08:00
Brad Davidson
6381ae93e7 Switch to using kubelet config files instead of CLI args
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-20 14:41:40 -08:00
Brad Davidson
93e548326a 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>
2024-12-20 14:41:40 -08:00
Brad Davidson
68f26fe9ac Add "Error: " prefix to fatal errors from k3s app entry points
Makes logged output more consistent when k3s fails during initialization

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-20 14:41:40 -08:00
Hussein Galal
763188d642
V1.32.0+k3s1 (#11478)
* Update libraries and codegen for k8s 1.32

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>

* Fixes for 1.32

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>

* Disable tests with down-rev agents

These are broken by AuthorizeNodeWithSelectors being on by default. All
agents must be upgraded to v1.32 or newer to work properly, until we
backport RBAC changes to older branches.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-20 23:17:14 +02:00
Brooks Newberry
870c16654d
Update stable channel to v1.31.4+k3s1 (#11483) 2024-12-19 12:06:43 -08:00
Derek Nola
83a3e851d3
Fix docker check warnings (#11474)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-12-18 11:23:30 -08:00
dependabot[bot]
bb32254858
Bump alpine from 3.20 to 3.21 in /conformance (#11433)
Bumps alpine from 3.20 to 3.21.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-16 10:00:14 -08:00
Brooks Newberry
b55aaeb08d
Update to v1.31.4 (#11463)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2024-12-12 09:14:12 -08:00
github-actions[bot]
c88e217fe9
chore: Bump Trivy version (#11430)
Made with ❤️️ by updatecli

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-11 08:43:36 -08:00
Reinhard Nägele
124be7472b
Update coredns to 1.12.0 (#11387)
* Update to coredns 1.12.0

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2024-12-10 10:09:27 -08:00
Brad Davidson
e143e0fa12 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>
2024-12-10 09:31:18 -08:00
Brad Davidson
5a5b136151 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>
2024-12-10 09:31:18 -08:00
Brooks Newberry
c8278053cb
update stable channel to v1.31.3+k3s1 (#11436) 2024-12-10 08:39:52 -08:00
Derek Nola
69c310d68b
Remove experimental from embedded-registry flag (#11443)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-12-10 08:37:13 -08:00
Brad Davidson
e9cf3a7ab5 Tail journald logs into report on suite failure
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Brad Davidson
45195e2654 Fix integration test failure message
The error message should be printf style, not just concatenated. The
current message is garbled if the command or result contains things that
look like formatting directives:

`Internal error occurred: error sending request: Post "https://10.10.10.102:10250/exec/default/volume-test/volume-test?command=sh&command=-c&command=echo+local-path-test+%!!(MISSING)E(MISSING)+%!!(MISSING)F(MISSING)data%!!(MISSING)F(MISSING)test&error=1&output=1": proxy error from 127.0.0.1:6443 while dialing 10.10.10.102:10250, code 502: 502 Bad Gateway`

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Brad Davidson
81dda9d626 Add command output to test failure message
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Brad Davidson
c7ff957cae Fall back to polling the supervisor for apiserver addresses when the watch fails
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Brad Davidson
168b344d1d Return apiserver addresses from both etcd and endpoints
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Brad Davidson
71918e0d69 Use helper to set consistent rest.Config rate limits and timeouts
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Brad Davidson
3d2fabb013 Add loadbalancer metrics
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Brad Davidson
911ee19a93 Refactor load balancer server list and health checking
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Brad Davidson
95797c4a79 Refactor filterCN to use a Set instead of map[string]bool
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Brad Davidson
67fd5fa9e5 Separate persistent config struct from LoadBalancer and make fields private
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Brad Davidson
13e9113787 Move http/socks proxy stuff to separate file
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Brad Davidson
f2f57b4a4b Remove unused code from etcdproxy
None of these fields or functions are used in k3s or rke2

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-06 11:45:34 -08:00
Derek Nola
183f0c8d09
Fix secrets-encrypt reencrypt timeout error (#11385)
* Add missing default OS for split server test

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

* Launch go routine and return for k3s secrets-encrypt reencrypt

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-12-05 09:11:22 -08:00
Derek Nola
7296fa8863
Fix leap install test (#11379)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-12-03 17:19:21 -08:00
Brad Davidson
5bb3d82e27 Add rewrite test to privateregistry e2e
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-03 11:58:51 -08:00
Brad Davidson
e414e0af42 Bump containerd for image rewrite fix
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-03 11:58:51 -08:00
manuelbuil
4ec261733e If no etcd was deployed, fail etcd-snapshot with a useful error
Signed-off-by: manuelbuil <mbuil@suse.com>
2024-11-28 09:40:42 +01: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
Derek Nola
c669600c8f
Fix Branch Name logic for Dependabot and UpdateCLI pushes to k3s-io (#11376)
* Improve node checking for etcd docker test
* Fix branch name for dependabot and updatecli PRs

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-11-27 09:50:14 -08:00
Brooks Newberry
55cda2200e
update Kubernetes to v1.31.3-k3s1 (#11373)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2024-11-26 16:50:32 -08:00
Derek Nola
b5e2fa77a6
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>
2024-11-26 12:30:52 -08:00
dependabot[bot]
1b7dd765a5
Bump aquasecurity/trivy-action from 0.28.0 to 0.29.0 (#11364)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](https://github.com/aquasecurity/trivy-action/compare/0.28.0...0.29.0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-26 10:15:46 -08:00
github-actions[bot]
15575def9d
chore: Bump Trivy version (#11360)
Made with ❤️️ by updatecli

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-26 10:12:38 -08:00
Vitor Savian
9bd48b1a3f Add ubuntu 24.04 apt command for e2e test
Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2024-11-26 11:45:04 -03:00