Commit Graph

1509 Commits

Author SHA1 Message Date
Aaron Dewes
fd4d3be4d4 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>
(cherry picked from commit 147a3c0daf)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 14:51:55 -07:00
github-actions[bot]
033371cc48 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>
(cherry picked from commit 2fdc6fab07)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 14:51:55 -07:00
Brad Davidson
94073174ee Fix windows socket prefix
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f5b0d7884f)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 14:51:55 -07:00
Brad Davidson
a2092dfd60 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:51:55 -07:00
Brad Davidson
4a07c85a5a 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:51:55 -07:00
manuelbuil
53bb385ac2 Add error in certificate check
Signed-off-by: manuelbuil <mbuil@suse.com>
2025-04-11 13:37:42 -07:00
Derek Nola
c2d1127b96 Remove double error check
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-09 01:01:01 -04:00
Derek Nola
ab43902c9c Align Value CLI
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-09 01:01:01 -04:00
Derek Nola
de84453eb2 Mark rotate-keys as GA
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-09 01:01:01 -04:00
Derek Nola
824f2710ad 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:01 -04:00
Brad Davidson
1179fad73d 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:40:03 -07:00
Brad Davidson
becff1d603 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:40:03 -07:00
Brad Davidson
b7f262315d 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:40:03 -07:00
Brad Davidson
62e7b907f7 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:40:03 -07:00
Brad Davidson
3a2143b1ce 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:07:08 -07:00
Brad Davidson
77c6523d7f 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:07:08 -07:00
Brad Davidson
905e2ea199 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:07:08 -07:00
Brad Davidson
79e7f711e7 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:07:08 -07:00
Brad Davidson
81eff3f0cb 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:07:08 -07:00
Brad Davidson
a788949777 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:07:08 -07:00
Brad Davidson
0f0a157e72 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-12 00:25:23 -07:00
Derek Nola
86d47b0069 Bump klipper-lb image (#11898)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-10 11:32:39 -07:00
Brad Davidson
59ccd4bc7c 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:22 -08:00
Brad Davidson
9e05875030 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:22 -08:00
Brad Davidson
064978cdf1 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:22 -08:00
Brad Davidson
7120e63a06 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:22 -08:00
Brad Davidson
5d5d6ee18a 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:22 -08:00
Brad Davidson
c607ba85a5 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:22 -08:00
Brad Davidson
43b24315f1 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:22 -08:00
Brad Davidson
edc5203598 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:22 -08:00
Roberto Bonafiglia
52323cba07 Revert "Add ability to pass configuration options to flannel backend"
This reverts commit 8643576985.

Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2025-03-05 08:05:35 +01:00
Brad Davidson
3f3ff12be0 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 18:16:06 -08:00
Brad Davidson
d7469b84e3 Bump traefik to v2.11.20
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 14:03:13 -08:00
Brad Davidson
0d68f0e5f1 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>
(cherry picked from commit 96c2dd3865)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
59d4483fba Add linux nodeSelector to local-storage and metrics-server
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 99f4f5ad12)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
9cdcd8ed00 Fix default pause image on windows
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 85987ac23f)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
1715778fb0 Add missing windows runtime type definition
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 50326c8bca)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
68dbea6d8b Fix windows path quoting/escaping in containerd config template
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 8aa412ed66)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
2d30f6090e Fix containerd hosts.toml path on windows
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit bf97b8facc)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
356470bbd4 Fix permissions checks on windows
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 838d68777f)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
921aa96c1c Replace hardcoded unix-style paths in test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit b2418ba354)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
bf9c68ec6d Remove broken unused windows test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 8f85ee3c60)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
db5f64397d Make etcd test linux-only
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 4cacf6e1c0)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
3619be4d4b Fix linux-specific clientaccess test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 0d15457c77)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
a0321eccda Consolidate linux and windows containerd config templates
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 85b3775071)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
25f906ff67 Add support for AWS shared credentials file
Also adds a CLI flag and fields for session token, which must be passed
alongside the access key and secret when using temporary credentials.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 0d028a2283)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
github-actions[bot]
2f80f4dca4 Bump Local Path Provisioner version (#11657)
* chore: Bump Local Path Provisioner version

Made with ❤️️ by updatecli

* chore: Bump Local Path Provisioner version

Made with ❤️️ by updatecli

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 28300ea154)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
Brad Davidson
dbe3bbac34 Update p2p boostrap helpers for Spegel v0.0.30
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 95700aa6b3)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:42 -08:00
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