Commit Graph

2935 Commits (b173fed639167bb5c45e0b28dd3f2a8ba9c1ba4f)

Author SHA1 Message Date
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
Vitor Savian 3377e9d809
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-13 11:05:04 -08:00
Hussein Galal 575bce7689
Update traefik to fix registry value (#8789)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2023-11-06 22:55:59 +02:00
Hussein Galal 1f0c784a93
[release-1.27] Update traefik chart to v25.0.0 (#8775)
* 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 19:10:28 +02:00
Derek Nola 40ee2725ee
Fix SystemdCgroup in templates_linux.go (#8765)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-11-02 13:41:38 -07:00
Brad Davidson b6f23014b2 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:06:50 -07:00
Johnatas 57492c63ba
Update to v1.27.7 (#8681) 2023-10-19 16:55:01 -07:00
Brad Davidson 0f6e77feaa 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 15:09:39 -07:00
Brad Davidson edc3fb2804 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 15:09:39 -07:00
Edgar Lee 55e61670c3 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:44:19 -07:00
Brad Davidson b0fb6f343e Fix CloudDualStackNodeIPs feature-gate inconsistency
Enable the feature-gate for both kubelet and cloud-controller-manager. Enabling it on only one side breaks RKE2, where feature-gates are not shared due to running in different processes.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-17 10:43:37 -07:00
Sean Yen dbea2e68c8 Windows support
Signed-off-by: Sean Yen <seanyen@microsoft.com>
2023-10-16 23:14:58 +02:00
Derek Nola 40f29507c7
Use version.Program not K3s in log (#8656)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-10-16 12:26:27 -07:00
Brad Davidson 78e57bc970 Start etcd client before ensuring self removal
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-14 00:38:56 -07:00
Brad Davidson e073442551 Add etcd-only/control-plane-only server test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-14 00:38:56 -07:00
Brad Davidson 548f8a292d 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:05 -07:00
Brad Davidson 22f8d28ba6 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 11:09:28 -07:00
dlorenc 58cc7dadfd 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 11:09:28 -07:00
Brad Davidson 56607b9bdc 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 11:09:28 -07:00
Brad Davidson 52c7d6c91d 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 11:09:28 -07:00
Brad Davidson e7014cf859 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 11:09:28 -07:00
Brad Davidson 22c0916abd 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 11:09:28 -07:00
Brad Davidson 1a448d4b45 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 11:09:28 -07:00
Brad Davidson df0fd0de49 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 11:09:28 -07:00
Brad Davidson 7375740ed4 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 11:09:28 -07:00
Brad Davidson 487b3948a3 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 11:09:28 -07:00
Brad Davidson d270e97825 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 11:09:28 -07:00
Brad Davidson 7a0eecd601 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 11:09:28 -07:00
Brad Davidson eed767ea74 Move etcd snapshot code into separate file
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 676b00aa0e)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 11:09:28 -07:00
Brad Davidson 2370a75097 Add new CRD for etcd snapshots
Also adds a hack go script to print the embedded CRDs, for developer use.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 500744bb94)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 11:09:28 -07:00
Brad Davidson 67d84badea Minor updates as per design review discussion
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 64107b54e4)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 11:09:28 -07:00
Brad Davidson 1575a20b82 Add ADR for etcd snapshot CRD migration
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 22065affa2)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 11:09:28 -07:00
Brad Davidson 3237b0e0a2 Bump busybox to v1.36.1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 9bb1ce1253)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 11:09:28 -07:00
Brad Davidson 5837ce3a44 Bump containerd to v1.7.7-k3s1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5fe4f6709a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 11:09:28 -07:00
Brad Davidson b92dba32f4 Pass SystemdCgroup setting through to nvidia runtime options
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 0e5c760625)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 11:09:28 -07:00
Brad Davidson 6b8473ef4b Don't ignore assets in home dir if system assets exist
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 1e38b5d904)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 11:09:28 -07:00
Brad Davidson 9826b553c9 Disable HTTP on main etcd client port
Fixes performance issue under load, ref: https://github.com/etcd-io/etcd/issues/15402 and https://github.com/kubernetes/kubernetes/pull/118460

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 8c73fd670b)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 11:09:28 -07:00
Roberto Bonafiglia 9ce7972ea3 Use IPv6 in case is the first configured IP with dualstack
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-10-13 10:24:56 +02:00
Derek Nola f294e2b22e
[Release-1.27] Clear remove annotations on cluster reset (#8587)
* Use admin kubeconfig instead of supervisor for etcd snapshot CLI

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>

* Skip creating CRDs and setting up event recorder for CLI controller context

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>

* Don't export functions not needed outside the etcd package

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>

* Reorganize Driver interface and etcd driver to avoid passing context and config into most calls

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>

* Clear remove annotations on cluster reset; refuse to delete last member from cluster

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>

---------

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-11 16:17:50 -07:00
Derek Nola 45edf0d843
E2E Domain Drone Cleanup (#8582)
* Cleanup inactive vm domains
* Have e2e depend on amd64 pipeline

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-10-11 14:20:06 -07:00
Derek Nola d451d4f34f
Server Token Rotation (#8576)
* Consolidate NewCertCommands
* Add support for user defined new token
* Add E2E testlets



* Ensure agent token also changes

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-10-10 13:03:09 -07:00
Roberto Bonafiglia 5606a23946 Fixed tailscale node IP dualstack mode in case of IPv4 only node
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-10-10 10:37:18 +02:00
Johnatas 6c2a7cb316
[v1.27] System agent push tags fix (#8569)
* change script and drone

Signed-off-by: Johnatas <johnatasr@hotmail.com>

* adjust secret

Signed-off-by: Johnatas <johnatasr@hotmail.com>

---------

Signed-off-by: Johnatas <johnatasr@hotmail.com>
2023-10-06 17:40:22 -03:00
Vitor Savian c928fb0615
Added advertise address integration test
Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2023-10-05 17:10:44 -03:00
Manuel Buil e7e7615d84
Merge pull request #8551 from manuelbuil/netCleanUp127
[Release 1.27] Network defaults are duplicated, remove one
2023-10-05 18:30:14 +02:00
Manuel Buil 9c70ee4091 Network defaults are duplicated, remove one
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-10-04 08:24:10 +02:00
Manuel Buil 9a930c6877
Merge pull request #8504 from manuelbuil/IPPrecedence127
[Release 1.27] Take IPFamily precedence based on order
2023-10-02 12:23:06 +02:00
Manuel Buil e4899db9eb
Merge pull request #8509 from manuelbuil/fixSpellCheck127
[Release 1.27] Fix spellcheck problem (boostrap ==> bootstrap)
2023-09-29 19:14:33 +02:00