k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
26.62k stars 2.24k forks source link

Follow directory symlinks in auto deploying manifests (#9288) #10049

Open rorosen opened 2 weeks ago

rorosen commented 2 weeks ago

Proposed Changes

I use k3s in NixOS and am affected by #9288, the auto-deploy controller does not follow symlinked directories. This is a little annoying since it's pretty normal to link large parts of the filesystem in NixOS.

Types of Changes

The deploy controller will now follow top-level symlink directories.

Verification

I tested the changes locally.

Testing

I couldn't find unit tests for the deploy controller and hence don't know what would be the best place for tests. Happy to add a test if required.

Linked Issues

User-Facing Change

Symlinked sub-directories are now respected when scanning Auto-Deploying Manifests (AddOns) 
codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 43.55%. Comparing base (fe7d114) to head (1aac62d). Report is 3 commits behind head on master.

Files Patch % Lines
pkg/deploy/controller.go 0.00% 12 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #10049 +/- ## ========================================== - Coverage 48.92% 43.55% -5.37% ========================================== Files 158 158 Lines 14032 14045 +13 ========================================== - Hits 6865 6118 -747 - Misses 5885 6762 +877 + Partials 1282 1165 -117 ``` | [Flag](https://app.codecov.io/gh/k3s-io/k3s/pull/10049/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | Coverage Δ | | |---|---|---| | [e2etests](https://app.codecov.io/gh/k3s-io/k3s/pull/10049/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | `36.37% <0.00%> (-10.41%)` | :arrow_down: | | [inttests](https://app.codecov.io/gh/k3s-io/k3s/pull/10049/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | `37.06% <0.00%> (?)` | | | [unittests](https://app.codecov.io/gh/k3s-io/k3s/pull/10049/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | `16.58% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dereknola commented 2 weeks ago

BTRFS E2e failure can be ignored. Solved by https://github.com/k3s-io/k3s/pull/10057. You can rebase master if you really want to see "all green", but its not required :smile: