Commit Graph

3551 Commits (release-1.31)

Author SHA1 Message Date
Brad Davidson 8133debaff 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 15:48:55 -08:00
Brad Davidson 91e34f1095 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 15:48:55 -08:00
Brad Davidson 215b4ca79f 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 15:48:55 -08:00
Brad Davidson 08a03a1351 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 15:48:55 -08:00
muicoder e93d6b0670 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 15:48:55 -08:00
Brad Davidson e072554bee 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 15:48:55 -08:00
Brad Davidson 52655f7d18 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 15:48:55 -08:00
galal-hussein 2055b9f1bf 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 15:48:55 -08:00
manuelbuil d0b42ccae0 If no etcd was deployed, fail etcd-snapshot with a useful error
Signed-off-by: manuelbuil <mbuil@suse.com>
2025-01-09 11:47:12 -08:00
Brooks Newberry a562d090b0
Update to v1.31.4 (#11462)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2024-12-12 07:15:22 -08:00
Arne Winter eff8f18548 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 18:56:08 -08:00
Derek Nola b62f4747ba
Update coredns to 1.12.0 (#11454)
* Update to coredns 1.12.0

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Co-authored-by: Reinhard Nägele <unguiculus@gmail.com>
2024-12-11 08:43:13 -08:00
Brad Davidson 1ac966b46a 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:01:54 -08:00
Brad Davidson abbfbba584 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:01:54 -08:00
Brad Davidson 7a94155d1a Tail journald logs into report on suite failure
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e9cf3a7ab5)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Brad Davidson a682e9309a 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>
(cherry picked from commit 45195e2654)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Brad Davidson 3a8d9bf50e Add command output to test failure message
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 81dda9d626)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Brad Davidson 212c4d2fde Fall back to polling the supervisor for apiserver addresses when the watch fails
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c7ff957cae)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Brad Davidson 4d33f87b64 Return apiserver addresses from both etcd and endpoints
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 168b344d1d)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Brad Davidson c41e50623c Use helper to set consistent rest.Config rate limits and timeouts
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 71918e0d69)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Brad Davidson af82d4101f Add loadbalancer metrics
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 3d2fabb013)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Brad Davidson 160d93f76a Refactor load balancer server list and health checking
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 911ee19a93)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Brad Davidson 26eef0b77f Refactor filterCN to use a Set instead of map[string]bool
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 95797c4a79)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Brad Davidson e9c378bed4 Separate persistent config struct from LoadBalancer and make fields private
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 67fd5fa9e5)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Brad Davidson cfba0c64f9 Move http/socks proxy stuff to separate file
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 13e9113787)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Brad Davidson d8809f961e 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>
(cherry picked from commit f2f57b4a4b)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-10 17:01:54 -08:00
Derek Nola d28a78030c
Remove experimental from embedded-registry flag (#11444)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-12-10 08:37:20 -08:00
Derek Nola ea1856f163
Fix secrets-encrypt reencrypt timeout error (#11442)
* Add missing default OS for split server test



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



---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-12-09 13:22:04 -08:00
Brad Davidson 6e6af9885f Add rewrite test to privateregistry e2e
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-03 11:58:56 -08:00
Brad Davidson b281bd5ad7 Bump containerd for image rewrite fix
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-12-03 11:58:56 -08:00
Brooks Newberry e99a66846e
update Kubernetes to v1.31.3-k3s1 (#11372)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2024-11-26 16:50:25 -08:00
Brad Davidson 53d4dd85f5 Fix issue with loadbalancer failover to default server
The loadbalancer should only fail over to the default server if all other server have failed, and it should force fail-back to a preferred server as soon as one passes health checks.

The loadbalancer tests have been improved to ensure that this occurs.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-14 08:19:28 -08:00
Brad Davidson 4a3ea1c3ac Fix handling of wrapped subcommands when run with a path
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-12 19:27:57 -08:00
Brad Davidson 6177caa8b1 Bump kine for mysql connection close fix
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 71fdc4a117)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-12 19:27:57 -08:00
Brad Davidson 7751cac368 Bump kine
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 62caa4a8c2)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-12 19:27:57 -08:00
Ludo Stellingwerff 28e2596be7 Fix the "Standalone"-mode of oidc-login in the wrapped kubectl application.
This fixes: 'error: no Auth Provider found for name "oidc"' when trying to run any subcommands in kubectl that require a valid server login.

Signed-off-by: Ludo Stellingwerff <ludo.stellingwerff@gmail.com>
(cherry picked from commit 2441e46950)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-12 19:27:57 -08:00
Derek Nola 52caaab2bb Fix GenKubeConfigFile, move from "cat" command to "scp"
Remove CI fog warnings from RunCmdOnNode output

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-11-12 13:22:31 -08:00
github-actions[bot] a9c814b7b9 chore: Bump to latest k3s-root version in scripts/version.sh (#11282)
Made with ❤️️ by updatecli

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-12 13:22:31 -08:00
Roberto Bonafiglia c946875f31 Update flannel and base cni plugins version
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2024-11-07 14:23:13 +01:00
Brad Davidson 4e86699dfd Bump containerd to v1.7.23-k3s1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 9c32f83819)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-06 12:40:51 -08:00
Brad Davidson e4c2c40a1e Fix MustFindString returning override flags on external CLI commands
External CLI actions cannot short-circuit on --help or --version, so we
cannot skip loading the config file if these flags are present when
running these wrapped commands. The behavior of just returning the
override flag name instead of the requested flag value was breaking
data-dir lookup when running wrapped commands.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit ff5c633fe7)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-06 12:40:51 -08:00
Brad Davidson e79ef532ad Bump runc to v1.2.1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 917761ce54)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-06 12:40:51 -08:00
Brad Davidson a413c5baf7 Add nonroot-devices flag to agent CLI
Add new flag that is passed through to the device_ownership_from_security_context parameter in the containerd CRI config. This is not possible to change without providing a complete custom containerd.toml template so we should add a flag for it.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 56fb3b0991)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-06 12:40:51 -08:00
Brad Davidson 6459d778ad Fix git-sha warning in etcd startup logs
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit b67249ec77)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-06 12:40:51 -08:00
Brad Davidson 4acd18720c Set kine EmulatedETCDVersion from embedded etcd version
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit bc60ff79f6)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-06 12:40:51 -08:00
Brad Davidson 802bf84d39 Add tests for ETCD.Test()
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit a39e191906)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-06 12:40:51 -08:00
Brad Davidson 7ce7044a15 Fix issues with defragment and alarm clear on etcd startup
* Use clientv3.NewCtxClient instead of New to avoid automatic retry of all RPCs
* Only timeout status requests; allow defrag and alarm clear requests to run to completion.
* Only clear alarms on the local cluster member, not ALL cluster members

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 095e34d816)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-06 12:40:51 -08:00
Brad Davidson 6632292d08 Bump etcd to v3.5.16-k3s1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e34fe0343f)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-11-06 12:40:51 -08:00
Derek Nola 3517f9bbdd
[Release-1.31] Backport E2E GHA fixes (#11230)
* Fix Github Actions for Ubuntu-24.04 (#11112)

* Fix vagrant/libvirt composite action for ubuntu-24.04

* Don't ignore changes to internal actions

* Fix unit tests for ubuntu 24.04, new lsof version

* Pin os version for unit and E2E workflows

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

* Pin vagrant to older version to avoid known issue 13527

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-11-04 20:26:51 -08:00
Brooks Newberry 6da204241b
[release-1.31] Update Kubernetes to v1.31.2 (#11155)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2024-10-23 15:30:23 -07:00