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

Load mount-layout from .env-files #1885

Merged
merged 3 commits into from
Dec 14, 2023
Merged

Conversation

frelon
Copy link
Contributor

@frelon frelon commented Dec 13, 2023

This PR adds code to load environment variables OVERLAY, RW_PATHS, PERSISTENT_STATE_PATHS and PERSISTENT_STATE_BINDS during mounting.

The variables are read from /run/cos/cos-layout.env and /run/elemental/mount-layout.env if they exist.

@frelon frelon requested a review from a team as a code owner December 13, 2023 18:27
@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2023

Codecov Report

Attention: 29 lines in your changes are missing coverage. Please review.

Comparison is base (48966fa) 72.39% compared to head (504e490) 73.60%.

Files Patch % Lines
cmd/config/config.go 51.66% 22 Missing and 7 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1885      +/-   ##
==========================================
+ Coverage   72.39%   73.60%   +1.21%     
==========================================
  Files          69       69              
  Lines        7274     7332      +58     
==========================================
+ Hits         5266     5397     +131     
+ Misses       1629     1544      -85     
- Partials      379      391      +12     

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

Copy link
Contributor

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Just a small comment

cmd/config/config.go Outdated Show resolved Hide resolved
@frelon frelon force-pushed the mount-env-vars branch 2 times, most recently from 7318c04 to a3978bc Compare December 14, 2023 09:04
Adds code to load environment variables OVERLAY, RW_PATHS,
PERSISTENT_STATE_PATHS and PERSISTENT_STATE_BINDS during mounting.

The variables are read from /run/cos/cos-layout.env and
/run/elemental/mount-layout.env if they exist.

Signed-off-by: Fredrik Lönnegren <[email protected]>
Signed-off-by: Fredrik Lönnegren <[email protected]>
@frelon frelon merged commit b33f303 into rancher:main Dec 14, 2023
14 checks passed
@frelon frelon deleted the mount-env-vars branch December 14, 2023 10:35
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