Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues loading data-dir value from env vars or dropin config files #10591

Merged
merged 3 commits into from
Jul 29, 2024

Conversation

brandond
Copy link
Member

@brandond brandond commented Jul 29, 2024

Proposed Changes

  • Don't set K3S_DATA_DIR env var in self-extracting multicall wrapper
    This was only used to pass the bundled strongswan path through to the flannel ipsec backend, and is no longer needed. Ref: Initial encrypted network support #719
  • Add K3S_DATA_DIR as env var for --data-dir flag
  • Fix inconsistent loading of config dropins when config file does not exist
    configfilearg.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.

Types of Changes

bugfix

Verification

Includes tests

Testing

See linked issue

Linked Issues

User-Facing Change


Further Comments

brandond added 2 commits July 29, 2024 19:22
This was only used to pass the bundled strongswan path through to the flannel ipsec backend, and is no longer needed. Ref: k3s-io#719

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond brandond requested a review from a team as a code owner July 29, 2024 21:14
…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>
Copy link

codecov bot commented Jul 29, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 3 lines in your changes missing coverage. Please review.

Project coverage is 43.47%. Comparing base (59e0761) to head (f07f281).

Files Patch % Lines
pkg/configfilearg/parser.go 91.17% 1 Missing and 2 partials ⚠️

❗ There is a different number of reports uploaded between BASE (59e0761) and HEAD (f07f281). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (59e0761) HEAD (f07f281)
e2etests 8 6
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10591      +/-   ##
==========================================
- Coverage   49.49%   43.47%   -6.02%     
==========================================
  Files         179      179              
  Lines       14957    14950       -7     
==========================================
- Hits         7403     6500     -903     
- Misses       6194     7255    +1061     
+ Partials     1360     1195     -165     
Flag Coverage Δ
e2etests 36.22% <13.88%> (-10.16%) ⬇️
inttests 36.63% <30.55%> (+16.94%) ⬆️
unittests 13.40% <86.11%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brandond brandond merged commit e514940 into k3s-io:master Jul 29, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants