Commit Graph

2651 Commits (39218e3fee421e3a7cccfc6b2091d3c931be82b6)

Author SHA1 Message Date
Brad Davidson 39218e3fee Improve error response logging
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5170bc5a04)
2023-06-12 10:53:41 -07:00
Brad Davidson fb89c153a0 Soft-fail on node password verification if the secret cannot be created
Allows nodes to join the cluster during a webhook outage. This also
enhances auditability by creating Kubernetes events for the deferred
verification.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 45d8c1a1a2)
2023-06-12 10:53:41 -07:00
Yuxing Deng ccd0168ac8 Make LB image configurable when compiling k3s
It is no way we can configure the lb image because it is a const value.
It would be better that we make it variable value and we can override
the value like the `helm-controller` job image when compiling k3s/rke2

Signed-off-by: Yuxing Deng <jxfa0043379@hotmail.com>
(cherry picked from commit b64a226ebd)
2023-06-12 10:53:41 -07:00
github-actions[bot] 81da67b9aa chore: Bump golang:alpine version
Made with ❤️️ by updatecli

(cherry picked from commit a5928ee137)
2023-06-12 10:53:41 -07:00
Brad Davidson 768de3d469 Add ADR
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 612473755d)
2023-06-12 10:53:41 -07:00
Brad Davidson 49a1310951 Create new kubeconfig for supervisor use
Only actual admin actions should use the admin kubeconfig; everything done by the supervisor/deploy/helm controllers will now use a distinct account for audit purposes.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 64a5f58f1e)
2023-06-12 10:53:41 -07:00
Brad Davidson d11adfd33a Use distinct clients for supervisor, deploy, and helm controllers
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 8748813a61)
2023-06-12 10:53:41 -07:00
Brad Davidson 9e37a9d053 Bump metrics-server to v0.6.3 and update tls-cipher-suites
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e9958cf070)
2023-06-12 10:53:41 -07:00
Brad Davidson 56d775e5c4 Bump klipper-lb to v0.4.4
Fixes issue with localhost access to ServiceLB when
ExternalTrafficPolicy=Local

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 93279d2f59)
2023-06-12 10:53:41 -07:00
Andrew Roffey d707fec67f allow coredns override extensions
Signed-off-by: Andrew Roffey <andrew@roffey.au>
(cherry picked from commit 0485a56f33)
2023-06-12 10:53:41 -07:00
Manuel Buil d38189d042
Merge pull request #7742 from manuelbuil/revertVPN124
[Release 1.24] Revert "VPN integration"
2023-06-12 18:09:58 +02:00
Manuel Buil 8803ccab31
Merge pull request #7753 from manuelbuil/fixSpelling124
[Release 1.24] Fix spelling check
2023-06-12 18:00:14 +02:00
Manuel Buil 4e0cb88d39 Fix spelling check
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-06-12 15:45:19 +02:00
Manuel Buil cf4bbc26c5 Revert "VPN integration"
This reverts commit 19f86eb080.

Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-06-12 11:24:29 +02:00
Manuel Buil 71a47fb2e2
Merge pull request #7729 from manuelbuil/tailscale124
[Release 1.24] VPN integration
2023-06-12 11:04:44 +02:00
Manuel Buil 19f86eb080 VPN integration
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-06-12 10:19:25 +02:00
Derek Nola 2105147ce7 Remove unnecessary daemonset addition/deletion
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-09 17:08:19 -07:00
Derek Nola d273f7efce E2E: Use sudo for all RunCmdOnNode
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-09 17:08:19 -07:00
Esteban Esquivel Alvarado 872789caeb 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>
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-09 17:08:19 -07:00
Derek Nola 1745a9923a Fix for longhorn integration test
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-09 17:08:19 -07:00
Derek Nola 25daf7e610 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 17:08:19 -07:00
Brian Downs 313a3b998d
Update to v1.24.14-k3s1 (#7577) 2023-05-18 10:24:47 -07:00
Manuel Buil f575bd1cc6
Merge pull request #7549 from manuelbuil/fixnetpollogs124
[Release 1.24] Wrap error stating that it is coming from netpol
2023-05-15 16:33:04 +02:00
Manuel Buil b834ac9730 Wrap error stating that it is coming from netpol
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-05-15 09:44:56 +02:00
Brad Davidson 36084d55ba Bump binary size limit to 70MB
Cherry-picked from ba62c79f9b

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-05-11 14:53:55 -07:00
Brad Davidson 580e120685 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:55 -07:00
Brad Davidson 8a2a111c86 Bump helm-controller version for repo auth/ca support
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-05-10 15:02:29 -07:00
Brad Davidson 8311feb0b4 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:02:29 -07:00
Brad Davidson 56987804c7 Bump kine to v0.10.1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit b32bf49541)
2023-05-10 15:02:29 -07:00
Brad Davidson 4634d157de Fix token startup test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c98137ddca)
2023-05-10 15:02:29 -07:00
Brad Davidson d91e676072 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:02:29 -07:00
Brad Davidson 391b08309c 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:02:29 -07:00
Brad Davidson a1162668ab 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:02:29 -07:00
Brad Davidson 17727761ae 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:02:29 -07:00
Brad Davidson a82dbacd4a Fix stack log on panic
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f1b6a3549c)
2023-05-10 15:02:29 -07:00
Brad Davidson 0218426cfd 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:02:29 -07:00
Brad Davidson c30137e88c Add e2e test for --disable-agent
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 1ca035accc)
2023-05-10 15:02:29 -07:00
Brad Davidson f705a8ff1c 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:02:29 -07:00
Brad Davidson 56982f379f 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:02:29 -07:00
Brad Davidson 23fc1e421c go generate
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 0247794aa9)
2023-05-10 15:02:29 -07:00
Brad Davidson 1cfdb5a355 Bump traefik to v2.9.10
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 0bbc6ad3f0)
2023-05-10 15:02:29 -07:00
Brad Davidson fde755cc86 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:02:29 -07:00
Brad Davidson a4e6aa1f6d 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:02:29 -07:00
Derek Nola a0c1226ecd
local-storage: Fix permission (#7472)
* local-storage: Fix permission

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 08:37:34 -07:00
Ian Cardoso 2cb4eef4e3 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:10:42 -03:00
Brooks Newberry 9b9fd04061 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:10:42 -03:00
Roberto Bonafiglia 324ecfc30d 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:18 +02:00
Derek Nola 41bf3614a1
Bump runc, containerd, docker dependencies (#7453)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-05-08 12:48:08 -07:00
Manuel Buil 878b1ce0a7
Merge pull request #7435 from manuelbuil/netutils1.24
[Release 1.24] Migrate netutil methods into /utils/net.go
2023-05-05 18:09:27 +02:00
Manuel Buil 280e058f91 Migrate netutil methods into /utils/net.go
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-05-05 09:08:45 +02:00