Commit Graph

3033 Commits

Author SHA1 Message Date
Brad Davidson
aebdccfae5 Fix issues with certs.d template generation
* Fix issue with bare host or IP as endpoint
* Fix issue with localhost registries not defaulting to http.
* Move the registry template prep to a separate function,
  and adds tests of that function so that we can ensure we're
  generating the correct content.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-02-01 18:52:07 -08:00
Aofei Sheng
39a0001575 Use ipFamilyPolicy: RequireDualStack for dual-stack kube-dns (#8984)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
(cherry picked from commit 8d2c40cdac)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
v1.28.6-rc2+k3s1 v1.28.6+k3s1
2024-01-18 12:53:42 -08:00
Pedro Tashima
c236c9ff77 Update to v1.28.6 (#9260)
Signed-off-by: Pedro Tashima <pedro.tashima@suse.com>
Co-authored-by: Pedro Tashima <pedro.tashima@suse.com>
v1.28.6-rc1+k3s1
2024-01-18 10:15:30 -03:00
Vitor Savian
6224ea62af Error getting node in setEtcdStatusCondition
Signed-off-by: Vitor Savian <vitor.savian@suse.com>

Added retry and changed nodes for

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2024-01-12 17:39:45 -03:00
Brad Davidson
470bcd1bff Move proxy dialer out of init() and fix crash
* Fixes issue where proxy support only honored server address via K3S_URL, not CLI or config.
* Fixes crash when agent proxy is enabled, but proxy env vars do not return a proxy URL for the server address (server URL is in NO_PROXY list).
* Adds tests

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-12 10:41:28 -08:00
Pierre
04ce0ac0a9 Rebase & Squash (#9070)
Signed-off-by: Yodo <pierre@azmed.co>
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-01-12 10:41:28 -08:00
Derek Nola
4724315b8c Pin opa version for missing dependency chain (#9216)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-01-12 08:14:21 -08:00
Brad Davidson
2858f89a5b Bump quic-go for CVE-2023-49295
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
b04e18c4a0 Enable network policy controller metrics
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit ab8d2f55b9)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
bda4b73493 Add e2e test for embedded registry mirror
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 6072476432)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
f3c6250b28 Add embedded registry implementation
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 37e9b87f62)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
ef4e7ae143 Add server CLI flag and config fields for embedded registry
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit ef90da5c6e)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
ece564ec93 Add ADR for embedded registry
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit b8f3967ad1)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
ea66fe65b4 Propagate errors up from config.Get
Fixes crash when killing agent while waiting for config from server

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 77846d63c1)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
a62ee4fd0d Move registries.yaml load into agent config
Moving it into config.Agent so that we can use or modify it outside the context of containerd setup

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 16d29398ad)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
ace1714e0c Pin images instead of locking layers with lease
Layer leases never did what we wanted anyways, and this is the new approved interface for ensuring that images do not get GCd

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5c99bdd9bd)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
3b863906e0 Fix OS PRETTY_NAME on tagged releases
These were always showing up as dev due to the build arg not being set by the drone step.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit eae221f9e5)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
ee85990a83 Add runtime checking of golang version
Forces other groups packaging k3s to intentionally choose to build k3s with an unvalidated golang version

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit b297996b92)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Lex Rivera
3be858a878 Add more paths to crun runtime detection (#9086)
* add usr/local paths for crun detection

Signed-off-by: Lex Rivera <me@lex.io>
(cherry picked from commit 5fe074b540)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
fa798ba272 Add support for containerd cri registry config_path
Render cri registry mirrors.x.endpoints and configs.x.tls into config_path; keep
using mirrors.x.rewrites and configs.x.auth those do not yet have an
equivalent in the new format.

The new config file format allows disabling containerd's fallback to the
default endpoint when using mirror endpoints; a new CLI flag is added to
control that behavior.

This also re-shares some code that was unnecessarily split into parallel
implementations for linux/windows versions. There is probably more work
to be done on this front but it's a good start.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c45524e662)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
f95ab7aaf9 Fix nil map in full snapshot configmap reconcile
If a full reconcile wins the race against sync of an individual snapshot resource, or someone intentionally deletes the configmap, the data map could be nil and cause a crash.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 319dca3e82)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
fe19faaf9a Handle logging flags when parsing kube-proxy args
Also adds a test to ensure this continues to work.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit db7091b3f6)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
fc3136f54f Fix the OTHER log message that prints the wrong variable
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 1e663622d2)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Ivan Shapovalov
9d5950741e Dockerfile.dapper: set $HOME properly
`$HOME` refers to `$DAPPER_SOURCE`, which is set in the same expression
and is thus not visible at the time of substitution.

This problem is not immediately visible with Docker, Inc.'s docker
merely because it resets an unset `$HOME` to `/root` (but still breaking
the Go cache). Under podman, this problem is immediately visible because
an unset `$HOME` remains unset and subsequently breaks the `go generate`
invocation.

Fixes #9089.

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
(cherry picked from commit a7fe1aaaa5)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
3248fd05c7 Add ServiceLB support for PodHostIPs FeatureGate
If the feature-gate is enabled, use status.hostIPs for dual-stack externalTrafficPolicy=Local support

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit a27d660a24)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Brad Davidson
a503d13591 Remove GA feature-gates (#8970)
Remove KubeletCredentialProviders and JobTrackingWithFinalizers feature-gates, both of which are GA and cannot be disabled.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 231cb6ed20)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:29:20 -08:00
Vitor Savian
53c6e05ef5 Handle etcd status condition when cluster reset and disable etcd
Signed-off-by: Vitor Savian <vitor.savian@suse.com>

Set condition if node is unhealthy

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2024-01-09 12:00:45 -03:00
Manuel Buil
3d08cfd0fe Wait for taint to be gone in the node before starting the netpol controller
Signed-off-by: Manuel Buil <mbuil@suse.com>
2024-01-09 09:59:13 +01:00
Derek Nola
90367d80b0 Add a retry around updating a secrets-encrypt node annotations (#9125)
* Add a retry around updating a se node annotations

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-01-06 21:58:49 -07:00
Derek Nola
5b2d1271a6 Only publish to code_cov on merged E2E builds (#9083)
Signed-off-by: Derek Nola <derek.nola@suse.com>
v1.28.5+k3s1
2023-12-21 10:47:42 -08:00
Pedro Tashima
19b361f30b Update to v1.28.5-k3s1 (#9081)
* Update to v1.28.5

Signed-off-by: Pedro Tashima <pedro.tashima@suse.com>

* Update Golang to 1.20.12

Signed-off-by: Pedro Tashima <pedro.tashima@suse.com>

---------

Signed-off-by: Pedro Tashima <pedro.tashima@suse.com>
Co-authored-by: Pedro Tashima <pedro.tashima@suse.com>
v1.28.5-rc1+k3s1
2023-12-20 20:47:19 -03:00
Brad Davidson
71a3c35fb7 Bump containerd to v1.7.11
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-12-11 17:04:52 -08:00
Brad Davidson
08509a2a90 Allow setting default-runtime on servers
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-12-08 18:18:08 -08:00
Brad Davidson
b9c288f702 Bump containerd/runc to v1.7.10-k3s1/v1.1.10
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-12-08 18:17:19 -08:00
Vitor Savian
03532f7c0b Added runtime classes for crun/wasm/nvidia
Signed-off-by: Vitor Savian <vitor.savian@suse.com>

Added default runtime flag

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2023-12-08 15:49:28 -03:00
Pedro Tashima
9c6ba42ca0 Nov 2023 stable channel update (#9022)
* update stable channel to v1.27.8+k3s2

Signed-off-by: Pedro Tashima <pedro.tashima@suse.com>

* update stable channel to v1.28.4+k3s2

Signed-off-by: Pedro Tashima <pedro.tashima@suse.com>

---------

Signed-off-by: Pedro Tashima <pedro.tashima@suse.com>
Co-authored-by: Pedro Tashima <pedro.tashima@suse.com>
2023-12-08 15:40:13 -03:00
Manuel Buil
79438cecaa Modify CONTRIBUTING.md guide
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-12-08 17:41:32 +01:00
Manuel Buil
d34550fb2f Fix overlapping address range
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-12-08 17:17:23 +01:00
Pedro Tashima
6ba6c1b65f remove s390x from manifest (#8998)
Signed-off-by: Pedro Tashima <pedro.tashima@suse.com>
Co-authored-by: Pedro Tashima <pedro.tashima@suse.com>
v1.28.4+k3s2 v1.28.4-rc1+k3s2
2023-12-06 18:20:20 -03:00
thomasferrandiz
c3e7bed727 Merge pull request #8983 from thomasferrandiz/remove-s390x
remove s390x steps temporarily since runners are disabled
2023-12-05 14:51:31 +01:00
Thomas Ferrandiz
022cf6d51f remove s390x steps temporarily since runners are disabled
Signed-off-by: Thomas Ferrandiz <thomas.ferrandiz@suse.com>
2023-12-04 15:30:18 +00:00
Johnatas
3f23723035 Update to v1.28.4 (#8920)
Signed-off-by: Johnatas <johnatas.santos@suse.com>
v1.28.4-rc1+k3s1 v1.28.4+k3s1
2023-11-22 15:01:45 -03:00
Brad Davidson
6d3a92a658 Print key instead of file path in snapshot metadata log message
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-21 14:03:27 -08:00
Brad Davidson
b23e70d519 Don't apply s3 retention if S3 client failed to initialize
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-21 14:03:27 -08:00
Brad Davidson
a92c4a0f17 Don't request metadata when listing objects
While some implementations may support it, it appears that most don't,
and some may in fact return an error if it is requested.

We already stat the object to get the metadata anyway, so this was
unnecessary if harmless on most implementations.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-21 14:03:27 -08:00
Brad Davidson
96ebb96317 Fix flakey dynamic-cert.json in cert rotation e2e test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-17 19:46:11 -08:00
Brad Davidson
611ac0894c Revert e2e pipeline depends_on change
Reverts part of the change from 7d38b4a3db

Pipeline dependencies are apparently broken, and the e2e pipeline has
been getting skipped whenever any other pipeline fails. Ex:
https://drone-pr.k3s.io/k3s-io/k3s/7853

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-17 19:46:11 -08:00
Brad Davidson
3a6284e2b9 Bump dynamiclistener to fix secret sync race
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-17 10:09:01 -08:00
Brad Davidson
1e0a7044cf Reorder snapshot configmap reconcile to reduce log spew during initial startup
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-17 10:09:01 -08:00
Vitor Savian
e53c189587 Handle nil pointer when runtime core is not ready in etcd
Signed-off-by: Vitor <vitor.savian@suse.com>
2023-11-16 15:58:42 -08:00