Commit Graph

1535 Commits (master)

Author SHA1 Message Date
Brad Davidson 9604f271bc Bump traefik to v3.3.6
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-21 16:11:56 -07:00
Brad Davidson b8a705d9c2 Fix handler panic when bootstrapper returned empty peer list
Panic gets rescued by the http server, and was only visible when running in debug mode, but should be handled properly.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-18 10:20:15 -07:00
Brad Davidson 4f17e626f3 Fix chainingBootstrapper to return the first successful address list
Avoids infinite recursion when the chain includes an agentBootstrapper with a server address that points back at this node (via join address loop or external LB)

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-17 14:20:39 -07:00
Brad Davidson 3f7e6a30ce Move delegating auth middleware into common package and add MaxInFlight
Adds maximum in-flight request limits to agent join and p2p peer info
request request handlers.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-17 14:20:39 -07:00
Brad Davidson 7883918d0a Add cache to spegel p2p peerinfo handler
libp2p may make a large number of bootstrap calls during startup; serve nodes from cache to avoid excessive CPU usage.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-17 14:20:39 -07:00
Brad Davidson 097b63e588 Set kubelet read-only-port via CLI flag
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-17 14:20:27 -07:00
Brad Davidson f90334e207 Fix etcd socket option config
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 13:39:44 -07:00
Aaron Dewes 147a3c0daf fix: Use proper key when signing kubelet certificate
I assume this was a mistake when copying and the kubelet key should have been used here.

This bug was introduced in #11471.

Signed-off-by: Aaron Dewes <aaron@nirvati.org>
2025-04-10 19:50:44 -07:00
github-actions[bot] 2fdc6fab07
Bump Klipper Helm and Helm Controller version (#12026)
* chore: Bump Klipper Helm and Helm Controller version

Made with ❤️️ by updatecli

* chore: Bump Klipper Helm and Helm Controller version

Made with ❤️️ by updatecli

* Fix build

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
2025-04-10 15:00:29 -04:00
manuelbuil 9505f7ff3b Add error in certificate check
Signed-off-by: manuelbuil <mbuil@suse.com>
2025-04-10 13:22:43 +02:00
Brad Davidson f5b0d7884f Fix windows socket prefix
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-09 09:25:43 -07:00
Brad Davidson 9deef77eef 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>
2025-04-08 15:27:19 -07:00
Brad Davidson 7cdf0fa688 Bump to traefik/v3.3.5, coredns/v1.12.1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-07 12:52:27 -07:00
Derek Nola 91d76b1614 Remove double error check
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-07 09:08:22 -07:00
Derek Nola fa69c45926 Align Value CLI
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-07 09:08:22 -07:00
Derek Nola 786efd1bff Mark rotate-keys as GA
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-07 09:08:22 -07:00
Derek Nola aea3703f68 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-07 09:08:22 -07:00
Brad Davidson a897f6875e 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 09:01:26 -07:00
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
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
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
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
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
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 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
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 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
Brad Davidson 6199b79f4b Add etcd snapshot metrics
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-18 11:09:42 -08:00
Roberto Bonafiglia 3f2373b55a Revert "Add ability to pass configuration options to flannel backend"
This reverts commit 8643576985.

Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2025-02-14 18:33:46 +01:00
Brad Davidson bc45972398 Update containerd config schema to version 3
Ref: https://github.com/containerd/containerd/blob/release/2.0/docs/cri/config.md

Since this is a breaking change, add support for a new v3 template file. If no v3 template is present, fall back to checking for the legacy v2 template and render the old structure.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-07 12:03:48 -08:00
Brad Davidson 124e46bccf Upgrade containerd to v2.0.2
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-07 12:03:48 -08:00
Brad Davidson 77cf99aa5f Bump traefik to 3.3.2
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-07 07:47:32 -08:00
Brad Davidson 96c2dd3865 Skip netpol startup on windows instead of panicing
Netpol startup is skipped with a warning on linux if ipset support is missing, we should do the same on windows

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-07 07:46:19 -08:00
Brad Davidson 99f4f5ad12 Add linux nodeSelector to local-storage and metrics-server
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-07 07:46:19 -08:00
Brad Davidson 85987ac23f Fix default pause image on windows
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-07 07:46:19 -08:00
Brad Davidson 50326c8bca Add missing windows runtime type definition
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-07 07:46:19 -08:00
Brad Davidson 8aa412ed66 Fix windows path quoting/escaping in containerd config template
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-07 07:46:19 -08:00