Commit Graph

1567 Commits

Author SHA1 Message Date
Derek Nola
162be7f9c0 Update metric help to be more descriptive. (#12765)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
2025-08-14 14:25:33 -07:00
Derek Nola
7b3cbf2f3f Emit certs OK event on startup, if no certs need renewal (#12761)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
2025-08-14 11:34:08 -07:00
Brad Davidson
2378be8255 Fix cert startup check events
Ensure that cert checks don't run until after the apiserver is ready to receive events

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 3d4c2cf2cf)
2025-08-12 13:28:18 -07:00
Brad Davidson
e096f4b2c3 Fix --docker with --container-runtime-endpoint
The container runtime endpoint value is passed into cri-dockerd as the docker socket address, so we need to check for --docker BEFORE checking for non-nil --container-runtime-endpoint.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-08-06 16:07:43 -03:00
Brad Davidson
fa9e056bda Fix fallback DNS for IMDS and IPV6-only
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-08-06 16:07:43 -03:00
muicoder
6f16773c1a refactor: replace go-bindata with native embed package
Signed-off-by: muicoder <muicoder@gmail.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-08-06 16:07:43 -03:00
Vitor Savian
ab0f5e00a2 Add retention flag specific for s3
* Add retention flag specific for s3
* Add retention for the unit tests:

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2025-08-05 14:06:52 -03:00
Brad Davidson
91c972b03f Update kine and use config defaults helper
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5ce3db779d)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-07-14 18:24:23 -07:00
Brad Davidson
6e30f19420 Update to new CRDs
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 7ab7865530)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-07-14 18:24:23 -07:00
bo.jiang
a756616941 fix: Remove unused legacy certificates
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
(cherry picked from commit db778faaf3)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-07-14 18:24:23 -07:00
Derek Nola
2148e3129c [Release-1.32] GHA Artifacts + Testing Backports July 2025 (#12609)
* Move to more secure split trivy workflow based on labels, not comments (#12592)

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

* Add basic fuzz test

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

* Add retry around common timeout for hardened docker test (#12601)

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

* Remove ghcr build cache (#12602)

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

* Migrate K3s Release Artifacts to GHA (#12606)

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-07-11 10:55:58 -07:00
Vitor Savian
a437cddfbe Refac shell completion to a better command structure
* Refac for shell completion

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

* Change FLAGS to OPTIONS

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

* Refac bash and zsh func names

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

* Refac bash and zsh func names

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

---------

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2025-07-11 03:45:13 -03:00
Derek Nola
266e7b8907 Add usage description for etcd-snapshot (#12574)
Co-authored-by: Manuel Buil <mbuil@suse.com>
2025-07-03 09:24:13 -07:00
Roberto Bonafiglia
db61a64027 Update network components
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2025-06-17 14:59:59 +02:00
Brad Davidson
f8c036e1d4 Fix sqlite-etcd migration
Forgot to add new config to temporary kine in #12293

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 4eabd0f1fd)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-06-13 11:08:21 -07:00
Zero King
f3671646f7 Add new topologySpreadConstraints to coredns
Prefer scaling across zones if multiple zones are available.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-06-13 11:08:21 -07:00
bo.jiang
7c45e54f6e Fix K3s not validating datastore connection when no token is set
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
(cherry picked from commit b5f4fd1d73)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-06-13 11:08:21 -07:00
haruna
464522edc0 Improve shebang of bash completion script
Signed-off-by: haruna <w10776e8w@yahoo.co.jp>
(cherry picked from commit d256968ee4)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-06-13 11:08:21 -07:00
bo.jiang
07c4cdc117 Fix secrets encryption rotation timeout causing false failures
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
(cherry picked from commit f7f546a23e)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-06-13 11:08:21 -07:00
Brad Davidson
6e15987918 Fix startuphooks race condition panic
Ensure startup hooks WaitGroup is initialized before starting goroutine that will wait on it

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-15 17:46:02 -07:00
Brad Davidson
8a8c10f542 Fix secretsencryption request handler panic
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-15 17:46:02 -07:00
Brad Davidson
e76ff3251f Fix authorization-config/authentication-config handling
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-15 15:39:17 -07:00
Brad Davidson
59b6093895 Sync datastore config defaults with kine CLI
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 10e3d40bf3)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-13 14:45:15 -07:00
Richard Hansen
c9ea1937a9 flannel: Use custom type for network mode (IPv4, IPv6, dual-stack)
Move the `ipv4` and `ipv6` constants to their own constant
declaration.  This ensures that the `iota` expression for the `ipv4`
constant evaluates to 0, not some arbitrary value.  (`iota` evaluates
to N for the Nth constant in the constant declaration; see
<https://go.dev/ref/spec#Iota>.)  This is also more idiomatic, which
improves readability.

Also switch from incremental integers to bit flags, and use bitwise
operators for checking.  This is more idiomatic (the integer is
treated like a set of booleans), it avoids some code duplication, and
it is necessary to avoid ambiguity.  Consider the following:

    const (
    	ipv4 = iota
    	ipv6
    )

In the above, `ipv4` would have the value 0 and `ipv6` would have the
value 1.  This would make it impossible to distinguish an IPv6-only
stack from a dual-stack configuration because `ipv6` would equal
`ipv4 + ipv6`.  With bit flags this problem doesn't exist.

And put the integer holding the bit flags in a custom type with
convenience methods to improve readability.

Signed-off-by: Richard Hansen <rhansen@rhansen.org>
(cherry picked from commit 925726c84d)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-13 14:45:15 -07:00
bo.jiang
e3ae8bcbdc Optimize certificate status check
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
(cherry picked from commit 4c1f014d27)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-13 14:45:15 -07:00
Brad Davidson
fe47220310 Add support for conditional image tarball imports
Normally K3s will import all tarballs in the image dir on startup, and
re-import any tarballs that change while it is running.

This change allows users to opt into only importing tarballs that have
changed since they were last imported, even across restarts.

This behavior is opted into by touching a `.cache.json` file in the
images dir. This file is used to track the size and mtime of the image
files when they are imported.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 67291090ca)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-13 14:45:15 -07:00
Brad Davidson
2cd5e055a0 Add CLI flag and config file for s3 bucket lookup type
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit a8f0acbe52)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-13 14:45:15 -07:00
Brad Davidson
443eb89663 Add anonymous-auth to flags gated on empty authorization-config value
Also warn if default flags are not set due to user provided config

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 921e502918)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-13 14:45:15 -07:00
Brad Davidson
9879e7ecd7 Bump containerd/cri-dockerd/spegel/runc
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit b15af84e4a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-13 14:45:15 -07:00
Vitor Savian
7be7fc19f8 Fix prints that broke unit tests
Signed-off-by: Vitor Savian <vitor.savian@suse.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-13 14:45:15 -07:00
Brad Davidson
700dac8b3d Bump spegel to v0.1.1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 396f1366cc)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-13 14:45:15 -07:00
Robert Rose
80516dc010 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>
(cherry picked from commit 5e1845b7c1)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-13 14:45:15 -07:00
Vitor Savian
f7c7afe369 Update certification renew alert to 120 days
Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2025-05-13 17:46:05 -03:00
Vitor Savian
1434568651 Add generation for kube-scheduler and kube-controller-manager certs (#12285)
* Add generation for kube-scheduler and kube-controller-manager certs

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

* Add new certs to the tests

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

* Change cert-dir to tls-cert-file and tls-private-key-file

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

* Address altName structure

Co-authored-by: Brad Davidson <brad@oatmail.org>
Signed-off-by: Vitor Savian <vitor.savian@suse.com>

---------

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
Co-authored-by: Brad Davidson <brad@oatmail.org>
2025-05-13 17:46:05 -03:00
Brad Davidson
ef3c22b4f3 Bump traefik to v3.3.6
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-21 16:12:13 -07:00
Brad Davidson
b9b449ef3c 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:33:21 -07:00
Brad Davidson
045bb9b992 Set kubelet read-only-port via CLI flag
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-17 21:30:39 -07:00
Brad Davidson
35165b8108 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 21:30:39 -07:00
Brad Davidson
4f9b7b4bd4 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 21:30:39 -07:00
Brad Davidson
b7900e7258 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 21:30:39 -07:00
Brad Davidson
e3ad921996 Fix etcd socket option config
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 14:27:56 -07:00
Aaron Dewes
2b72cc3470 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:27:56 -07:00
github-actions[bot]
c6748c7981 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:27:56 -07:00
Brad Davidson
26bb74fd5f 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:27:56 -07:00
Brad Davidson
537c0e5952 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:27:56 -07:00
Brad Davidson
1a3f9197e4 Bump to traefik/v3.3.5, 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:27:56 -07:00
manuelbuil
de2246df87 Add error in certificate check
Signed-off-by: manuelbuil <mbuil@suse.com>
2025-04-11 13:37:34 -07:00
Derek Nola
32d7b0baeb Remove double error check
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-09 01:01:12 -04:00
Derek Nola
57afa75ac6 Align Value CLI
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-09 01:01:12 -04:00
Derek Nola
204e9f0ba7 Mark rotate-keys as GA
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-09 01:01:12 -04:00