Commit Graph

2857 Commits (aa66de382c2f91a8dea77c9910722bb3ae31caf5)

Author SHA1 Message Date
Flavio Castelli aa66de382c 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>

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 17:07:56 -03:00
Pedro Tashima ddda2476a2
remove s390x from manifest script (#8994)
Signed-off-by: Pedro Tashima <pedro.tashima@suse.com>
Co-authored-by: Pedro Tashima <pedro.tashima@suse.com>
2023-12-05 21:02:06 -03:00
thomasferrandiz c31827ee5f
remove s390x steps temporarily since runners are disabled (#8993)
Signed-off-by: Thomas Ferrandiz <thomas.ferrandiz@suse.com>
2023-12-05 18:30:06 -03:00
Johnatas d0bc34ce15
[release-1.25] Update to v1.25.16 (#8923)
* Update to v1.25.16

Signed-off-by: Johnatas <johnatas.santos@suse.com>

* go version to 1.20.10

Signed-off-by: Johnatas <johnatas.santos@suse.com>

---------

Signed-off-by: Johnatas <johnatas.santos@suse.com>
2023-11-22 19:17:11 -03:00
Brad Davidson c8165989e9 Print key instead of file path in snapshot metadata log message
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-21 17:04:39 -08:00
Brad Davidson c4a792d7e0 Don't apply s3 retention if S3 client failed to initialize
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-21 17:04:39 -08:00
Brad Davidson 8af0cafa09 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 17:04:39 -08:00
Brad Davidson 9d1d824a31 Fix flakey dynamic-cert.json in cert rotation e2e test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-17 23:31:03 -08:00
Brad Davidson 30e01f4a26 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 23:31:03 -08:00
Brad Davidson 92cf8a18c7 Bump dynamiclistener to fix secret sync race
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-17 23:31:03 -08:00
Brad Davidson 5cc4514a63 Reorder snapshot configmap reconcile to reduce log spew during initial startup
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-17 23:31:03 -08:00
Manuel Buil 6a84db1f03 Improve dualStack log
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-11-17 09:18:11 +01:00
Vitor Savian 1570fe1790
Handle nil pointer when runtime core is not ready in etcd
Signed-off-by: Vitor <vitor.savian@suse.com>
2023-11-16 15:57:53 -08:00
Brad Davidson 5568a2e6af Go generate
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-16 09:56:32 -08:00
Brad Davidson 0b7b789529 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:56:32 -08:00
Harsimran Singh Maan d8c98539f1 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:56:32 -08:00
Jason Costello 91622fcedc 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:56:32 -08:00
Brad Davidson 57ed39a4b9 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:56:32 -08:00
Brad Davidson c62308b764 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:56:32 -08:00
chenk008 ce7b9ed708 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:56:32 -08:00
Oliver Larsson 564d3c8378 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:56:32 -08:00
Brad Davidson 00821f0d04 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:56:32 -08:00
Thorsten Klein 6b13ee3669 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:56:32 -08:00
Vitor Savian 32ddb34835
Added etcd status condition
* Added ADR for etcd status

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

* Added etcd status condition

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

---------

Signed-off-by: Vitor <vitor.savian@suse.com>
2023-11-16 04:19:56 -08:00
Hussein Galal e4c55af295
Update traefik to fix registry value (#8791)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2023-11-06 21:57:31 +02:00
Hussein Galal f62d0e8e04
[release-1.25] Update traefik chart to v25.0.0 (#8777)
* Upgrade traefik chart to v25.0.0

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* go generate

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2023-11-03 18:54:43 +02:00
Derek Nola ad5b443452
Fix SystemdCgroup in templates_linux.go (#8767)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-11-02 13:41:28 -07:00
Derek Nola 222805cbde
[Release-1.25] E2E Domain Drone Cleanup (#8584)
* E2E Domain Drone Cleanup (#8579)

* Cleanup inactive vm domains
* Have e2e depend on amd64 pipeline

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-10-31 16:46:16 -07:00
Brad Davidson d19260dc59 Don't try to read token hash and cluster id during cluster-reset
These fields are only necessary when saving snapshots to S3, and will block restoration if attempted

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-27 15:07:21 -07:00
Johnatas d2b3219c1a
Update to v1.25.15 (#8679) 2023-10-19 16:55:22 -07:00
Brad Davidson fe637b10b3 Manually requeue configmap reconcile when no nodes have reconciled snapshots
Silences error message from lasso - this is a normal startup condition
when no snapshots exist so we shouldn't log nasty looking errors.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-18 17:13:39 -07:00
Brad Davidson ecf2a7a764 Re-enable etcd endpoint auto-sync
Removing this in 002e6c43ee regressed
control-plane-only nodes, as we rely on the etcd client to update its
endpoint list internally so that we can use it to sync the load-balancer
address list.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-18 17:13:39 -07:00
Edgar Lee b02a874d53 Add --image-service-endpoint flag (#8279)
* Add --image-service-endpoint flag

Problem:
External container runtime can be set but image service endpoint is unchanged
and also is not exposed as a flag. This is useful for using containerd
snapshotters outside of the ones that have built-in support like
stargz-snapshotter.

Solution:
Add a flag --image-service-endpoint and also default image service endpoint to
container runtime endpoint if set.

Signed-off-by: Edgar Lee <edgarhinshunlee@gmail.com>
(cherry picked from commit fe18b1fce9)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-17 10:45:12 -07:00
Derek Nola ec31704c1a
Use version.Program not K3s in log (#8654)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-10-16 14:18:24 -07:00
Sean Yen 2cda8e5512 Windows support
Signed-off-by: Sean Yen <seanyen@microsoft.com>
2023-10-16 23:16:05 +02:00
Brad Davidson 1f3880c756 Start etcd client before ensuring self removal
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-14 01:15:24 -07:00
Brad Davidson 6f776a3a04 Add etcd-only/control-plane-only server test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-14 01:15:24 -07:00
Brad Davidson 429224d364 Update kube-router package in build script
Package was changed in version script in bc332ac667 but we missed changing it here as well.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 16:23:31 -07:00
Brad Davidson fdd80188b0 Bump traefik, golang.org/x/net, google.golang.org/grpc
Fixes exposure to CVE-2023-39325

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00
dlorenc b2d3d6cef5 Switch build target from main.go to a package. (#8342)
* Switch build target from main.go to a package.
* Dont build with vcs

Signed-off-by: Dan Lorenc <dlorenc@chainguard.dev>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
(cherry picked from commit 3d25e9f66c)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00
Brad Davidson d1cd3399a6 Fix etcd snapshot integration tests
Snapshot delete/prune tests were only working because the delete command
would report success even when deleting a snapshot that didn't exist,
and the test regex was finding the snapshot name multiple times in
the list output and deleting it twice.

Snapshot restore tests seem to have expected the deployment to be rolled out
immediately, which is not a reasonable expectation.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 7c5b69ca1d)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00
Brad Davidson 3b28ac0a1f Add server token hash to CR and S3
This required pulling the token hash stuff out of the cluster package, into util.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit d885162967)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00
Brad Davidson e86e9d4fbc Switch to managing ETCDSnapshotFile resources
Reconcile snapshot CRs instead of ConfigMap; manage ConfigMap downstream from CR list

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 550ab36ab7)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00
Brad Davidson e0222ac1a2 Move snapshot delete into local/s3 functions
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5cd4f69bfa)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00
Brad Davidson 8633571a5b Sort snapshots by time and key in tabwriter output
Fixes snapshot list coming out in non-deterministic order

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit a15b804e00)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00
Brad Davidson 61bbad7d9e Store extra metadata and cluster ID for snapshots
Write the extra metadata both locally and to S3. These files are placed such that they will not be used by older versions of K3s that do not make use of them.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 7464007037)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00
Brad Davidson db4ee1b2ae Move s3 snapshot list functionality to s3.go
Also, don't list ONLY s3 snapshots if S3 is enabled.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 80f909d0ca)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00
Brad Davidson 514bcade78 Consistently set snapshotFile timestamp
Attempt to use timestamp from creation or filename instead of file/object modification times

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 8d47645312)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00
Brad Davidson a89645dfb4 Tidy s3 upload functions
Consistently refer to object keys as such, simplify error handling.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f1afe153a3)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00
Brad Davidson a8d117dc42 Elide old snapshot data when apiserver rejects configmap with ErrRequestEntityTooLarge
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 2b0e2e8ada)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 12:28:56 -07:00