Commit Graph

2696 Commits (cb114a2d91dbf1920d2b4de5aba4f7acc568713b)

Author SHA1 Message Date
Manuel Buil cb114a2d91
Merge pull request #7728 from manuelbuil/tailscale125
[Release 1.25] VPN integration
2023-06-12 10:20:30 +02:00
Manuel Buil 98333e8a22 VPN integration
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-06-12 09:22:06 +02:00
Ian Cardoso 077fd8b9b6
[Release-1.25] Add private registry e2e test (#7722)
* add private registry e2e test (#7653)

add private registry e2e test

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>

* E2E: Startup test cleanup + RunCommand Enhancement (#7388)

* Add beforesuite to startup
* Reduce timeouts for startup
* Fix cleanup + set kubeconfig

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

---------

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
2023-06-09 13:09:58 -07:00
Derek Nola f089761921 Remove unnecessary daemonset addition/deletion
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-09 09:34:09 -07:00
Derek Nola eb63c3bf04 E2E: Use sudo for all RunCmdOnNode
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-09 09:34:09 -07:00
Esteban Esquivel Alvarado ed6e7b1c2c Add Rotation certification Check (#7097)
* Add Certification Test to Validate Cluster

Signed-off-by: est-suse <esteban.esquivel@suse.com>

* Fix to stop/start for k3s certificate rotation

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

---------

Signed-off-by: est-suse <esteban.esquivel@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: est-suse <esteban.esquivel@suse.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
2023-06-09 09:34:09 -07:00
Derek Nola a7521dab8b Fix for longhorn integration test
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-09 09:34:09 -07:00
Derek Nola e1ae6f0940 Shortcircuit commands with version or help flags (#7683)
* Shortcircuit search with help and version flag

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

* Keep functions seperate

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-09 09:34:09 -07:00
Derek Nola 474498c527
Bump vagrant libvirt with fix for plugin installs (#7659)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-01 09:16:58 -07:00
Manuel Buil 42867c806b
Merge pull request #7649 from manuelbuil/flannel0220-1.25
[Release 1.25] Update flannel version
2023-05-31 11:41:19 +02:00
Manuel Buil e7c148df3e Update flannel version
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-05-31 08:44:33 +02:00
Brian Downs 613a3bc8cb
Update to v1.25.10-k3s1 (#7582) 2023-05-18 10:24:33 -07:00
Manuel Buil 938c984de1
Merge pull request #7574 from manuelbuil/restartcluster125
[Release 1.25] Add '-all' flag to apply to inactive units
2023-05-18 15:46:12 +02:00
Manuel Buil e3c3ecdf64 Add '-all' flag to apply to inactive units
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-05-17 18:53:49 +02:00
Manuel Buil 3ce8dd17c9
Merge pull request #7548 from manuelbuil/fixnetpollogs125
[Release 1.25] Wrap error stating that it is coming from netpol
2023-05-15 16:33:33 +02:00
Manuel Buil 0b14452817 Wrap error stating that it is coming from netpol
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-05-15 09:44:26 +02:00
Brad Davidson a41015abe5 Bump containerd/runc to v1.7.1-k3s1/v1.1.7
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-05-11 14:53:37 -07:00
Brad Davidson eff951b567 Bump helm-controller version for repo auth/ca support
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-05-10 15:18:54 -07:00
Brad Davidson a0891cab16 Consistently use constant-time comparison of password hashes
As per https://github.com/golang/go/issues/47001 even subtle.ConstantTimeCompare should never be used with variable-length inputs, as it will return 0 if the lengths do not match. Switch to consistently using constant-time comparisons of hashes for password checks to avoid any possible side-channel leaks that could be combined with other vectors to discover password lengths.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 239021e759)
2023-05-10 15:18:54 -07:00
Brad Davidson e0f01f1ca2 Bump kine to v0.10.1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit b32bf49541)
2023-05-10 15:18:54 -07:00
Brad Davidson caf88e5b37 Fix token startup test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c98137ddca)
2023-05-10 15:18:54 -07:00
Brad Davidson e3a67ac40a Fail to validate server tokens that use bootstrap id/secret format
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit cf9ebb3259)
2023-05-10 15:18:54 -07:00
Brad Davidson 5227fe8cd5 Bump cni plugins to v1.2.0-k3s1
Also add bandwidth and firewall plugins. The bandwidth plugin is
automatically registered with the appropriate capability, but the
firewall plugin must be configured by the user if they want to use it.

Ref: https://www.cni.dev/plugins/current/meta/firewall/

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit cedefeff24)
2023-05-10 15:18:54 -07:00
Brad Davidson fc058fdcdb Fix MemberList error handling and incorrect etcd-arg passthrough
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e61fde93c1)
2023-05-10 15:18:54 -07:00
Brad Davidson 3e5fa68be6 Retry cluster join on "too many learners" error
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 91afb38799)
2023-05-10 15:18:54 -07:00
Brad Davidson 95f5069514 Fix stack log on panic
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f1b6a3549c)
2023-05-10 15:18:54 -07:00
Brad Davidson 6d28abd1f4 Fix race condition in tunnel server startup
Several places in the code used a 5-second retry loop to wait on
Runtime.Core to be set. This caused a race condition where OnChange
handlers could be added after the Wrangler shared informers were already
started. When this happened, the handlers were never called because the
shared informers they relied upon were not started.

Fix that by requiring anything that waits on Runtime.Core to run from a
cluster controller startup hook that is guaranteed to be called before
the shared informers are started, instead of just firing it off in a
goroutine that retries until it is set.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c44d33d29b)
2023-05-10 15:18:54 -07:00
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