Commit Graph

2819 Commits (fdd80188b023cc0bd2dd6491555ec161378b53e8)

Author SHA1 Message Date
Brad Davidson 50bae4e591 Add e2e test for --disable-agent
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 1ca035accc)
2023-05-10 15:18:54 -07:00
Brad Davidson 3ef61de230 Improve egress selector handling on agentless servers
Don't set up the agent tunnel authorizer on agentless servers, and warn when agentless servers won't have a way to reach in-cluster endpoints.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 31a6386994)
2023-05-10 15:18:54 -07:00
Brad Davidson f674a22cc9 Improve error message when CLI wrapper Exec fails
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5348b5e696)
2023-05-10 15:18:54 -07:00
Brad Davidson e456ffbd1e go generate
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 0247794aa9)
2023-05-10 15:18:54 -07:00
Brad Davidson 30d37145a8 Bump traefik to v2.9.10
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 0bbc6ad3f0)
2023-05-10 15:18:54 -07:00
Brad Davidson 55846cf767 Bump k3s-root for aarch64 page size fix
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 9539147ee1)
2023-05-10 15:18:54 -07:00
Brad Davidson 746ada89d2 Create CRDs with schema
Fixes an issue where CRDs were being created without schema, allowing
resources with invalid content to be created, later stalling the
controller ListWatch event channel when the invalid resources could not
be deserialized.

This also requires moving Addon GVK tracking from a status field to
an annotation, as the GroupVersionKind type has special handling
internal to Kubernetes that prevents it from being serialized to the CRD
when schema validation is enabled.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit ad41fb8c96)
2023-05-10 15:18:54 -07:00
Derek Nola 6e92eb9ac0
local-storage: Fix permission (#7217) (#7473)
* local-storage: Fix permission

/var/lib/rancher/k3s/storage/ should be 700
/var/lib/rancher/k3s/storage/* should be 777

Fixes #2348

Signed-off-by: Boleyn Su <boleyn.su@gmail.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Boleyn Su <boleyn.su@gmail.com>
Co-authored-by: Brad Davidson <brad@oatmail.org>
2023-05-10 11:53:40 -07:00
thomasferrandiz ca849fa6dd
Merge pull request #7361 from thomasferrandiz/backport-1.25-netpol-logl-level
[release-1.25] ensure that klog verbosity is set to the same level as logrus
2023-05-10 15:01:48 +02:00
Ian Cardoso b28d4ae4ef add kube-* server flags integration tests (#7416)
This commit adds SearchK3sLog function to find specific strings in integration tests log file and also removes FindStringInCmdAsync function since it was not being used.

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit 3982213f06)
Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
2023-05-09 16:11:12 -03:00
Brooks Newberry a10ef1d0d2 Add longhorn storage test (#6445)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
(cherry picked from commit bbda54b332)
Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
2023-05-09 16:11:12 -03:00
Roberto Bonafiglia 2c5e892a53 Bump kube-router version to fix a bug when a port name is used
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-05-09 18:22:08 +02:00
Derek Nola 0a9d5c6e70
Bump runc, containerd, and docker dependencies (#7452)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-05-08 12:48:04 -07:00
Manuel Buil c41febb7f2
Merge pull request #7433 from manuelbuil/netutil1.25
[Release 1.25] Migrate netutil methods into /utils/net.go
2023-05-05 09:15:10 +02:00
Manuel Buil cb23cf0a1e Migrate netutil methods into /utils/net.go
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-05-05 07:24:22 +02:00
Derek Nola e6793519d7
[Release-1.25] CLI + Config Enhancement (#7404)
* Handle multiple arguments with StringSlice flags (#7380)

* Add helper function for multiple arguments in stringslice

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

* Cleanup server setup with util function

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

* Enable FindString to search dotD config files (#7323)

* Enable FindString to search dotD config files
* Address multiple arg cases

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-05-02 14:03:59 -07:00
Ian Cardoso 86f4e50d2a Add integration tests for etc-snapshot server flags and refactor /tests/integration/integration.go/K3sStartServer (#7300)
This adds integration tests for the following flags: "--etcd-snapshot-name","--etcd-snapshot-dir","--etcd-snapshot-retention","--etcd-snapshot-schedule-cron" and "--etcd-snapshot-compress". It also refactors K3sStartServer to stop applying strings.Fields() into inputArgs, so it can accept arguments that have space in their definition.

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit 1ac03aad43)
2023-05-02 10:12:00 -03:00
Derek Nola 31980fbb93 Containerd restart testlet (#6696)
* Add containerd testlet to startup integration
* Fix all log dumps
* Stop server gracefully

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-05-02 10:12:00 -03:00
Derek Nola 71e53ae606
[Release-1.25] Add E2E testing in Drone (#7375)
* Add E2E to Drone 
* Build e2e test image
* Add ci flag to secretsencryption
* Fix vagrant log on secretsencryption
* Add cron conformance pipeline

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

* Add string output for nodes
* Switch snapshot restore for upgrade cluster

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

* Added IPv6 check and agent restart on e2e test utils

Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>

* Cleanup leftover VMs in E2E pipeline
* Dont run most pipelines on nightly cron

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

* Don't default to local K3s for startup test (#6950)

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

* Added multiClusterCIDR E2E test

Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>

* fix_get_sha_url (#7187)

Signed-off-by: ShylajaDevadiga <shylaja@rancher.com>

* Improve RunCmdOnNode error

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

* Pin upgradecluster to v1.25

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
Signed-off-by: ShylajaDevadiga <shylaja@rancher.com>
Co-authored-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
Co-authored-by: ShylajaDevadiga <56045581+ShylajaDevadiga@users.noreply.github.com>
2023-05-01 14:15:49 -07:00
Thomas Ferrandiz 11bcb24e40 ensure that klog verbosity is set to the same level as logrus
by repeatedly settting it every second during k3s startup

Signed-off-by: Thomas Ferrandiz <thomas.ferrandiz@suse.com>
2023-04-27 08:10:49 +00:00
Brian Downs 7502ce6a6e
Update to v1.25.9-k3s1 (#7283) 2023-04-13 13:51:17 -07:00
Roberto Bonafiglia 59e573d111 Update install script to clean iptables rules before start
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-04-12 22:33:42 +02:00
Roberto Bonafiglia 53f1fd4c28 Update kube-router to insert iptables rules right after kubernetes ones
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-04-12 22:33:42 +02:00
Hussein Galal 540d19b097
[release-1.25] Update klipper lb and helm-controller (#7240)
* Update klipper lb and helm-controller

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

* update klipper helm image

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

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2023-04-06 22:17:21 +02:00
Roberto Bonafiglia af81ed062a Updated kube-route version to move the iptables ACCEPT default rule at the end of the chain
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-04-06 09:57:18 +02:00
Brad Davidson 355ddda647 Lock bootstrap data with empty key to prevent conflicts
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit d95980bba3)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-05 16:29:13 -07:00
Brad Davidson 64709f401d Debounce kubernetes service endpoint updates
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 2992477c4b)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-05 16:29:13 -07:00
Brad Davidson 7036323cd7 Fix tests to not hide failure location in dummp assert functions
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit ece4d8e45c)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-05 16:29:13 -07:00
Brad Davidson 5fc65fcda7 Fix issue with stale connections to removed LB server
Track LB connections through each server so that they can be closed when it is removed.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e54ceaa497)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-05 16:29:13 -07:00
Brad Davidson 50f46016da Update remotedialer to silence errors when disconnecting
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5dece799df)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-05 16:29:13 -07:00
Brad Davidson 66dd02cbcc go generate
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit d388b82d25)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-05 16:29:13 -07:00
Brad Davidson 7686c73624 Ensure that loopback is used for the advertised address when resetting
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit de80c07053)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-05 16:29:13 -07:00
Brad Davidson 45670c8ae4 Ensure that loopback is used for the advertised address when resetting
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit b010db0cff)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-05 16:29:13 -07:00
Brad Davidson e81356a287 Bump runc to v1.1.5
Addresses GHSA-m8cg-xc2p-r3fc GHSA-vpvm-3wq2-2wvm GHSA-g2j6-57v7-gm8c

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 877247a691)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-05 16:29:13 -07:00
Brad Davidson 88d5a723ce Bump Local Path Provisioner version (#7167)
* chore: Bump Local Path Provisioner version
* go generate

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit cee3ddbc4a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-05 16:29:13 -07:00
Hussein Galal c25f611eed
Remove deprecated nodeSelector label beta.kubernetes.io/os (#6970) (#7121)
* Remove deprecated nodeSelector label beta.kubernetes.io/os

Problem:
The nodeSelector label beta.kubernetes.io/os in the CoreDNS deployment was deprecated in 1.14 and will likely be removed soon

Solution:
Change the nodeSelector to remove the beta

Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Co-authored-by: Daniel Mills <evilhamsterman@users.noreply.github.com>
2023-04-04 21:04:18 +02:00
Derek Nola 9e22489daf
[Release-1.25] Enhance `check-config` (#7164)
* Add missing kernel config checks (#6946)

Add additional kernel config checks for NETFILTER_XT_MATCH_COMMENT and
NETFILTER_XT_MATCH_MULTIPORT as they are both required to run k3s.

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>

* Enhance `k3s check-config` (#7091)

* Move  CONFIG_CGROUP_PIDS to Required

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

---------

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud>
2023-03-29 12:15:38 -07:00
Roberto Bonafiglia 6c5ac02248 Update flannel to fix NAT issue with old iptables version
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-03-22 18:15:47 +01:00
Brooks Newberry 46fd19b30e
Update to v1.25.8-k3s1 (#7106) 2023-03-17 15:28:28 -07:00
Brad Davidson 37a26379d5 Add support for cross-signing new certs during ca rotation
We need to send the full chain in order for cross-signing to work
properly during switchover to a new root.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-03-13 20:04:11 -07:00
Brad Davidson 27f032ddb9 Update/rename certs.sh; add default cert rotation script
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-03-13 20:04:11 -07:00
Derek Nola a6cac3e9e7
Adds a warning about editing to the containerd config.toml file (#7075)
* Add a warning to the config.toml file

Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Brad Davidson <brad@oatmail.org>
2023-03-13 15:33:20 -07:00
Brad Davidson 7a7304e3d3 Wait for kubelet to update the Ready status before reading port
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-03-13 14:30:11 -07:00
Daishan Peng 0369a5a6a4 Wait for kubelet port to be ready before setting
Signed-off-by: Daishan Peng <daishan@acorn.io>
2023-03-13 14:30:11 -07:00
Derek Nola c904d97363
[Release-1.25] Enable dependabot (#7045)
* Enable dependabot on 1.25

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-03-13 09:38:26 -07:00
Derek Nola 6728824743
[Release-1.25] Bump various dependencies for CVEs (#7043)
* Match flannel for x/net
* Match containerd for x/sys
* Update replace for go-gax
* Isolate e2e terraform depedencies
* Bump containerd
* Bump wrangler to 1.1.1

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-03-13 09:36:59 -07:00
Roberto Bonafiglia f5d1f976d3
[Release 1.25] Update flannel and kube-router (#7061)
* Update kube-router version to fix iptables rules

Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>

* Update Flannel to v0.21.3

Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>

---------

Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-03-10 20:31:52 -08:00
Matt Trachier f7c20e237d
Update to v1.25.7-k3s1 (#7010)
* Update to v1.25.7
* update gh workflows and docker files to proper go version
---------
Signed-off-by: matttrach <matttrach@gmail.com>
2023-03-01 15:29:10 -06:00
Brad Davidson 8f6997883d Bump kine to v0.9.9
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-02-23 17:19:31 -08:00
Brad Davidson 27b5441c96 Add test for filterByIPFamily
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-02-21 14:13:34 -08:00