Skip to content

docs: cookbook: mount directories as secrets after v.0.8.0 - #5520

Merged
helderco merged 3 commits into
dagger:mainfrom
grouville:mount-dir-as-secret-docs
Aug 3, 2023
Merged

helderco merged 3 commits into
dagger:mainfrom
grouville:mount-dir-as-secret-docs

Conversation

@grouville

@grouville grouville commented Jul 28, 2023 •

Copy link
Copy Markdown
Member

Closes #4896

Re-opening following the revert. Most of the context is on the initial PR

Small cookbook example / wrapper with the .with() method showing how to mount directories securely.

cc @helderco

@grouville
grouville marked this pull request as draft July 28, 2023 14:12

@helderco helderco left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can simplify this a lot.

My ~/.gnupg directory is less than 1MiB. To keep the cookbook simple for mounting a secret directory I'd just mount the whole ~/.gnupg directory. You just resolve all the paths from the host first in a map of names to full paths, and then loop over these for a simpler with util.

Then it'll be easy enough for the user to add include/exclude globs or provide an explicit map of file names instead to limit which files are added.

EDIT: My suggestion here:

@gerhard

gerhard commented Aug 2, 2023

Copy link
Copy Markdown
Contributor

@grouville @helderco what needs to happen to get this ready for review? I am keen to get this merged today.

cc @vikram-dagger

@grouville

Copy link
Copy Markdown
Member Author

@grouville @helderco what needs to happen to get this ready for review? I am keen to get this merged today.

cc @vikram-dagger

I'll update the docs accordingly in a few hours 🙏

@gerhard

gerhard commented Aug 2, 2023 •

Copy link
Copy Markdown
Contributor

Thank you @grouville! I am super keen on getting this one merged within the next 2h. We are really close to having everything in place for tomorrow's release 💪

@grouville grouville changed the title docs: cookbook: mount directories as secrets docs: cookbook: mount directories as secrets after v.0.8.0 Aug 2, 2023
@grouville

Copy link
Copy Markdown
Member Author

@gerhard: As seen with @helderco, this will have to be merged after the v.0.8.0 release: #5519 (review).

This PR was re-opened prior the revert: #5519.

It goes in-pair with #5518 and #5515, which will be merged right after the release.

However, I'm currently updating it to make it reviewable and ready to be shipped tomorrow

@helderco

helderco commented Aug 2, 2023

Copy link
Copy Markdown
Contributor

The go and node.js snippets haven't been updated. I suggested improvements using Python, but it needs to be replicated to the others.

@gerhard

gerhard commented Aug 3, 2023

Copy link
Copy Markdown
Contributor

Since we are a few hours from release, can we get this one ready to merge & then go for merge?

@helderco

helderco commented Aug 3, 2023

Copy link
Copy Markdown
Contributor

I'm finishing another cookbook issue and I'll help here if needed.

@gerhard gerhard added this to the 0.8.0 BREAKING CHANGES RELEASE milestone Aug 3, 2023
@grouville
grouville force-pushed the mount-dir-as-secret-docs branch from 291bf8c to ad0d8fc Compare August 3, 2023 14:19
@grouville

Copy link
Copy Markdown
Member Author

I'm finishing another cookbook issue and I'll help here if needed.

@helderco, your help on the Node SDK Client issue unblocked me. It shall be ready for a review.

@grouville
grouville force-pushed the mount-dir-as-secret-docs branch 3 times, most recently from d6b6df7 to 6545b0c Compare August 3, 2023 14:25
@grouville
grouville requested a review from helderco August 3, 2023 14:28
@grouville
grouville force-pushed the mount-dir-as-secret-docs branch 3 times, most recently from a86b62a to c312798 Compare August 3, 2023 15:36
@grouville
grouville marked this pull request as ready for review August 3, 2023 15:36
@helderco

helderco commented Aug 3, 2023

Copy link
Copy Markdown
Contributor

It's just the snippets, no cookbook.md

@grouville
grouville force-pushed the mount-dir-as-secret-docs branch from c312798 to cac8d8c Compare August 3, 2023 15:50
helderco and others added 3 commits August 3, 2023 18:05
Signed-off-by: Helder Correia <[email protected]>
Follow Helder's Python code as example config for the cookbook

Signed-off-by: grouville <[email protected]>
@grouville
grouville force-pushed the mount-dir-as-secret-docs branch from cac8d8c to 09fd8d9 Compare August 3, 2023 16:05

@gerhard gerhard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Anything else that needs to happen before this gets merged @helderco?

@helderco
helderco merged commit 1b09e47 into dagger:main Aug 3, 2023
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.

✨Allow directories to be mounted as secrets

3 participants