Commit Graph

3177 Commits (4b0eb69d80e572feabc92a3c93de1ea8f6e2ad49)

Author SHA1 Message Date
Brad Davidson 4b0eb69d80 Update secretsencrypt pagination
Make secretsencrypt page size and iteration consistent with other paginators

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 891e72f90f)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-08-05 09:37:58 -07:00
Brad Davidson c936fc02d0 Use pagination when retrieving etcd snapshot list
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c2216a62ad)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-08-05 09:37:58 -07:00
Brad Davidson 95b2dec026 bump docker/docker to v24.0.10-0.20240723193628-852759a7df45
No v24 release has been tagged with the authz fix, so we have to use an untagged commit from the v24 release branch.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-08-02 14:38:47 -07:00
galal-hussein e16ad17937 Fixing setproctitle function
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
(cherry picked from commit bf6e874241)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-08-02 11:19:38 -07:00
Brad Davidson a45cef49c3 Fix inconsistent loading of config dropins when config file does not exist
FindString would silently skip parsing dropins if the main config file
didn't exist. If a custom config file path was passed it would raise an
error, but if we were parsing the default config file and it didn't
exist it would just silently fail to load the dropins.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-29 17:28:55 -07:00
Brad Davidson fb4e66fd25 Add K3S_DATA_DIR as env var for --data-dir flag
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-29 17:28:55 -07:00
Brad Davidson 5b9fa7ed19 Don't set K3S_DATA_DIR env var
This was only used to pass the bundled strongswan path through to the flannel ipsec backend, and is no longer needed. Ref: #719

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-29 17:28:55 -07:00
Brooks Newberry 5b9a3fced6
Update to v1.27.16-k3s1 and Go 1.22.5 (#10542)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2024-07-17 16:39:36 -07:00
Derek Nola 13817fb201
[Release-1.27] July Test Backports (#10510)
* Move test-compat to GHA (#10414)

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

* For E2E upgrade test, automatically determine the channel to use (#10461)

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

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-07-15 10:34:38 -07:00
Brad Davidson 869e19106c Don't use server and token values from config file for etcd-snapshot commands
Fixes an issue where running etcd-snapshot commands on a node that has a server address set in the config will manage snapshots on that server, instead of on the local node as intended.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
Brad Davidson bb9991612e Add dial duration to debug error message
This should give us more detail on how long dials take before failing, so that we can perhaps better tune the retry loop in the future.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
Brad Davidson 1a6b601f14 Fix IPv6 primary node-ip handling
I should have caught `[]string{cfg.NodeIP}[0]` and `[]string{envInfo.NodeIP.String()}[0]` in code review...

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
Brad Davidson 82e20cf8a5 Fix agents removing configured supervisor address
We shouldn't be replacing the configured server address on agents. Doing
so breaks the agent's ability to fall back to the fixed registration
endpoint when all servers are down, since we replaced it with the first
discovered apiserver address. The fixed registration endpoint will be
restored as default when the service is restarted, but this is not the
correct behavior. This should have only been done on etcd-only nodes
that start up using their local supervisor, but need to switch to a
control-plane node as soon as one is available.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
Brad Davidson e5773389d1 Fix reentrant rlock in loadbalancer.dialContext
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
Brad Davidson ff9277b178 Bump kine to v0.11.11
https://github.com/k3s-io/kine/compare/v0.11.9...v0.11.11
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
Brad Davidson fbde4f7812 Add etcd s3 config secret implementation
* Move snapshot structs and functions into pkg/etcd/snapshot
* Move s3 client code and functions into pkg/etcd/s3
* Refactor pkg/etcd to track snapshot and s3 moves
* Add support for reading s3 client config from secret
* Add minio client cache, since S3 client configuration can now be
  changed at runtime by modifying the secret, and don't want to have to
  create a new minio client every time we read config.
* Add tests for pkg/etcd/s3

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c36db53e54)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
github-actions[bot] 30f2267bd5 chore: Bump Trivy version
Made with ❤️️ by updatecli

(cherry picked from commit 5508589fae)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
Brad Davidson 9bc99a0c37 Ensure remotedialer kubelet connections use kubelet bind address
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit eb8bd15889)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
github-actions[bot] 979d8f8f6e Bump Local Path Provisioner version (#10394)
* chore: Bump Local Path Provisioner version

Made with ❤️️ by updatecli

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit a0b374508e)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
dependabot[bot] 31cc8cde9b Bump github.com/hashicorp/go-retryablehttp from 0.7.4 to 0.7.7
Bumps [github.com/hashicorp/go-retryablehttp](https://github.com/hashicorp/go-retryablehttp) from 0.7.4 to 0.7.7.
- [Changelog](https://github.com/hashicorp/go-retryablehttp/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/go-retryablehttp/compare/v0.7.4...v0.7.7)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-retryablehttp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit f6942f3de4)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
Brad Davidson 26714e0fb4 Bump k3s-root to v0.14.0
Also remove the wg-add script that has been unused since v1.26 dropped the legacy wireguard backend

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 047664b610)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:44 -07:00
Roberto Bonafiglia e4b597ba86 Update flannel to v0.25.4 and fixed issue with IPv6 mask
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2024-07-01 18:59:41 +02:00
Brad Davidson 3ced503aa9 Replace 1-weight semaphore on snapshots with simple mutex
Fixes an issue where the semaphore wasn't permanently initialized
until a scheduled snapshot was taken, allowing multiple on-demand
snapshots to be taken until the first scheduled snapshot was triggered.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-06-19 09:48:42 -07:00
Brad Davidson cb36c910a6 Fix agent supervisor port using apiserver port instead
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-06-13 16:34:04 -07:00
Brooks Newberry 102e42a55d
[release-1.27] Update Kubernetes to v1.27.15 (#10346)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2024-06-13 09:09:09 -07:00
Harrison Affel 76ba9db245 fix typo, use rancher/permissions
Signed-off-by: Harrison Affel <harrisonaffel@gmail.com>
2024-06-07 08:31:36 -07:00
Brad Davidson bdf076b2e5 Fix race condition panic in loadbalancer.nextServer
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-06-07 07:40:42 -07:00
fmoral2 6d6cf86656
Add test for `isValidResolvConf` (#10302)
Signed-off-by: Francisco <francisco.moral@suse.com>
2024-06-07 11:07:35 -03:00
Vitor Savian 88c20d8b9a Add snapshot retention etcd-s3-folder fix
* Add snapshot retention folder fix

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

* Add snapshot retention E2E test

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

---------

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2024-06-06 19:41:35 -03:00
Brad Davidson 5f656d12fb Fix bug that caused agents to bypass local loadbalancer
If proxy.SetAPIServerPort was called multiple times, all calls after the
first one would cause the apiserver address to be set to the default
server address, bypassing the local load-balancer. This was most likely
to occur on RKE2, where the supervisor may be up for a period of time
before it is ready to manage node password secrets, causing the agent
to retry.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 1661f1024a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-06-04 13:40:41 -07:00
Koen de Laat e8d6c88155 fix: Use actual warningPeriod in certmonitor
Signed-off-by: Koen de Laat <koen.de.laat@philips.com>
(cherry picked from commit 79ba10f5ec)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-06-04 13:40:41 -07:00
github-actions[bot] 4e3eda5526 Bump Local Path Provisioner version (#10268)
* chore: Bump Local Path Provisioner version

Made with ❤️️ by updatecli

(cherry picked from commit 1268779ea0)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-06-04 13:40:41 -07:00
Katherine Door 30401ec352 Add write-kubeconfig-group flag to server (#9233)
* Add write-kubeconfig-group flag to server
* update kubectl unable to read config message for kubeconfig mode/group

Signed-off-by: Katherine Pata <me@kitty.sh>
(cherry picked from commit 7a0ea3c953)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
Brad Davidson 6e9ca34246 Fix embedded mirror blocked by SAR RBAC and re-enable test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
Brad Davidson 19692f5d17 Fix issue caused by sole server marked as failed under load
If health checks are failing for all servers, make a second pass through the server list with health-checks ignored before returning failure

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit ca39614d4e)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
Brad Davidson da89ab5052 Fix netpol crash when node remains tained unintialized
It is concievable that users might take more than 60 seconds to deploy their own cloud-provider. Instead of exiting, we should wait forever, but with more logging to indicate what's being waited on.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit ed23a2bb48)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
github-actions[bot] 6c7e503bea chore: Bump Trivy version
Made with ❤️️ by updatecli

(cherry picked from commit f2e7c01acf)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
dependabot[bot] 9ea2260bee Bump ubuntu from 22.04 to 24.04 in /tests/e2e/scripts
Bumps ubuntu from 22.04 to 24.04.

---
updated-dependencies:
- dependency-name: ubuntu
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 4cb4542c3a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
Brad Davidson 3e5de3426c Use busybox tar to avoid issues with fchmodat2 on arm
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 84b578ec74)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
dependabot[bot] b9e3c5f5e9 Bump alpine from 3.18 to 3.20 in /package
Bumps alpine from 3.18 to 3.20.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 86875c97bb)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
dependabot[bot] 8257e71ce3 Bump alpine from 3.18 to 3.20 in /conformance
Bumps alpine from 3.18 to 3.20.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit de4cda57e6)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
Brad Davidson e5468c930a Update golangci-lint to stop using deprecated skip files/dirs
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 2eca3f1e2c)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
Brad Davidson 9d044760ee Convert remaining http handlers over to use util.SendError
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f8e0648304)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
Brad Davidson 103778ce1a Refactor supervisor listener startup and add metrics
* Refactor agent supervisor listener startup and authn/authz to use upstream
  auth delegators to perform for SubjectAccessReview for access to
  metrics.
* Convert spegel and pprof handlers over to new structure.
* Promote bind-address to agent flag to allow setting supervisor bind
  address for both agent and server.
* Promote enable-pprof to agent flag to allow profiling agents. Access
  to the pprof endpoint now requires client cert auth, similar to the
  spegel registry api endpoint.
* Add prometheus metrics handler.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit ff679fb3ab)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
galal-hussein b65fad2d1c Add proctitle package with linux and windows constraints
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
(cherry picked from commit 48ff3bcddb)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
Brad Davidson 07c2bd4cc2 Fix issue with k3s-etcd informers not starting
Start shared informer caches when k3s-etcd controller wins leader election. Previously, these were only started when the main k3s apiserver controller won an election. If the leaders ended up going to different nodes, some informers wouldn't be started

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 3d14092f76)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
Anuj Garg ec397ef351 Updating the script binary_size_check to complete the command name by adding .exe extension to the k3s binary name to make it available to run stat command
Signed-off-by: Anuj Garg <anujgarg@microsoft.com>
(cherry picked from commit eb192197eb)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
Brad Davidson 2c2a6ee982 Bump klipper-helm image for tls secret support
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 6683fcdb65)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
huangzy 4fa7991664 allow helm controller set owner reference
Signed-off-by: huangzy <huangzynn@outlook.com>
(cherry picked from commit 6fcaad553d)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00
Robert Rose edad9c6873 Follow directory symlinks in auto deploying manifests (#9288)
Signed-off-by: Robert Rose <robert.rose@mailbox.org>
(cherry picked from commit 6886c0977f)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-05-31 09:17:58 -07:00