Commit Graph

3132 Commits (07c2bd4cc22fc60f80df3f7c954349f0d13500c8)

Author SHA1 Message Date
Brad Davidson 8ab374deed 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:30:56 -08:00
Brad Davidson 7731127e40 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:30:56 -08:00
Brad Davidson 42ea9be3e5 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:30:56 -08:00
Brad Davidson f81d460ee5 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:30:56 -08:00
Brad Davidson 3bc3ba5efe 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:30:56 -08:00
Brad Davidson 1f27e2f80e 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:30:56 -08:00
Brad Davidson 3d4216ca46 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:30:56 -08:00
Lex Rivera 91331c4733 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:30:56 -08:00
Brad Davidson 053afed3ef 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:30:56 -08:00
Brad Davidson fed2f71417 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:30:56 -08:00
Brad Davidson 31bc0ea3ce 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:30:56 -08:00
Brad Davidson 6bbdf19a10 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:30:56 -08:00
Ivan Shapovalov 42900e232e 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:30:56 -08:00
Leke Ariyo 914d3ad91c optimize: Simplify and clean up Dockerfile (#8244)
Signed-off-by: Leke Ariyo <lekeariyo2015@gmail.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 16:30:56 -08:00
github-actions[bot] 2b856f0a2a chore: Bump Trivy version (#8739)
Made with ❤️️ by updatecli

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-11 16:30:56 -08:00
Brad Davidson 47cb25272b 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:30:56 -08:00
Brad Davidson 067a6545b4 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:30:56 -08:00
Vitor Savian e9b2e59ff4 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:37 -03:00
Manuel Buil 2ec192146d 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:22 +01:00
Derek Nola 5ecf175fd5
[Release-1.27] Added support for env *_PROXY variables for agent loadbalancer (#9117)
Signed-off-by: Yodo <pierre@azmed.co>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Pierre <129078893+pierre-az@users.noreply.github.com>
2024-01-06 21:45:11 -07:00
Derek Nola cf5fd5f679
Add a retry around updating a secrets-encrypt node annotations (#9124)
* Add a retry around updating a se node annotations

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-01-06 21:44:36 -07:00
Derek Nola 2c249a3935
Only publish to code_cov on merged E2E builds (#9082)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-12-21 08:57:02 -08:00
Pedro Tashima 45e3785788
Update to v1.27.9-k3s1 (#9078)
* Update to v1.27.9

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>
2023-12-20 16:41:58 -03:00
Brad Davidson 9edb565d5e Bump containerd to v1.7.11
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-12-11 17:05:11 -08:00
Brad Davidson d01c57fd3d Allow setting default-runtime on servers
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-12-08 18:19:50 -08:00
Flavio Castelli 9e182bb798 Added runtimes for wasm/crun/nvidia
Create a generic helper function that finds extra containerd runtimes.
The code was originally inside of the nvidia container discovery file.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>

Discover the containerd shims based on runwasi that are already
available on the node.

The runtimes could have been installed either by a package manager or by
the kwasm operator.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>

The containerd configuration on a Linux system now handles the nvidia
and the WebAssembly runtimes.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>

---------

Signed-off-by: Flavio Castelli <fcastelli@suse.com>

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 18:19:50 -08:00
Manuel Buil f199ddc492 Fix overlapping address range
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-12-08 18:19:02 -08:00
Brad Davidson 352d119434 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:29 -08:00
Pedro Tashima 02fcbd1f57
remove s390x (#8999)
Signed-off-by: Pedro Tashima <pedro.tashima@suse.com>
Co-authored-by: Pedro Tashima <pedro.tashima@suse.com>
2023-12-06 18:20:37 -03:00
Johnatas 0abb8a5a7f
Update to v1.27.8 (#8921)
Signed-off-by: Johnatas <johnatas.santos@suse.com>
2023-11-22 15:03:47 -03:00
Brad Davidson 1aa0eac285 Print key instead of file path in snapshot metadata log message
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-21 14:49:38 -08:00
Brad Davidson 0624d2a51f Don't apply s3 retention if S3 client failed to initialize
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-21 14:49:38 -08:00
Brad Davidson 0473839f16 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:49:38 -08:00
Brad Davidson e3ea0ae9b1 Fix flakey dynamic-cert.json in cert rotation e2e test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-17 19:46:45 -08:00
Brad Davidson 47c94c3da5 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:45 -08:00
Brad Davidson a19f307430 Bump dynamiclistener to fix secret sync race
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-17 10:09:38 -08:00
Brad Davidson f270db4bbb 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:38 -08:00
Manuel Buil 8cf46ed4a3 Improve dualStack log
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-11-17 09:17:32 +01:00
Vitor Savian fd676a5a64
Handle nil pointer when runtime core is not ready in etcd
Signed-off-by: Vitor <vitor.savian@suse.com>
2023-11-16 15:46:46 -08:00
Brad Davidson 12e64c8b47 Go generate
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-16 09:55:41 -08:00
Brad Davidson a7f71bb5f2 Add jitter to client config retry
Also:
* Replaces labeled for/continue RETRY loops with wait helpers for improved readability
* Pulls secrets and nodes from cache for node password verification
* Migrate nodepassword tests to wrangler mocks for better code reuse

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-16 09:55:41 -08:00
Harsimran Singh Maan dd1787d026 Disable helm CRD installation for disable-helm-controller (#8702)
* Disable helm CRD installation for disable-helm-controller
    The NewContext package requires config as input which would
    require all third-party callers to update when the new go module
    is published.

    This change only affects the behaviour of installation of helm
    CRDs. Existing helm crds installed in a cluster would not be removed
    when disable-helm-controller flag is set on the server.

    Addresses #8701
* address review comments
* remove redundant check

Signed-off-by: Harsimran Singh Maan <maan.harry@gmail.com>
(cherry picked from commit abc2efdd57)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-16 09:55:41 -08:00
Jason Costello 7d1034ab20 Tweaked order of ingress IPs in ServiceLB (#8711)
* Tweaked order of ingress IPs in ServiceLB
    Previously, ingress IPs were only string-sorted when returned
    Sorted by IP family and string-sorted in each family as part of
    filterByIPFamily method
* Update pkg/cloudprovider/servicelb.go
* Formatting

Signed-off-by: Jason Costello <jason@hazy.com>
Co-authored-by: Brad Davidson <brad@oatmail.org>
(cherry picked from commit 07ee854914)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-16 09:55:41 -08:00
Brad Davidson 248a009de5 Skip initial datastore reconcile during cluster-reset
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 7ecd5874d2)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-16 09:55:41 -08:00
Brad Davidson 6f489f08f9 Fix issue with snapshot metadata configmap
Omit snapshot list configmap entries for snapshots without extra metadata; reduce log level of warnings about missing s3 metadata files.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 2088218c5f)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-16 09:55:41 -08:00
chenk008 df7b982107 add agent flag disable-apiserver-lb (#8717)
* add node flag disable-agent-lb
* add agent flag disable-apiserver-lb

Co-authored-by: Brad Davidson <brad@oatmail.org>
Signed-off-by: chenk008 <kongchen28@gmail.com>
(cherry picked from commit b47cbbfd42)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-16 09:55:41 -08:00
Oliver Larsson d7c1ac7ab6 QoS-class resource configuration
Problem:
Configuring qos-class features in containerd requres a custom containerd configuration template.

Solution:
Look for configuration files in default locations and configure containerd to use them if they exist.

Signed-off-by: Oliver Larsson <larsson.e.oliver@gmail.com>
(cherry picked from commit 30c8ad926d)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-16 09:55:41 -08:00
Brad Davidson b173fed639 Bump kine to fix multiple issues
Ref: https://github.com/k3s-io/kine/releases/tag/v0.11.0
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 32a1efa408)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-16 09:55:41 -08:00
Thorsten Klein d8fd458d96 add: timezone info in image
Signed-off-by: Thorsten Klein <tk@thklein.io>
(cherry picked from commit a26441613b)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-16 09:55:41 -08:00
Hussein Galal 27106c47fc
Add warning for multiclustercidr flag (#8759)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2023-11-14 01:28:09 +02:00