-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds the configuration for an encrypted scratch space in /dev/sda4 on an mkosi image. If the image has space available it will create a "scratch" partition and encrypt it using an adhoc LUKS key. An empty `/run/peerpod/mount-scratch` file is being added to the write-files directive of userdata, if a disk size param has been set. In this case kata-agent will mount the encrypted scratch space to `/run/kata-containers` prior to startup. Signed-off-by: Magnus Kulke <[email protected]>
- Loading branch information
Showing
11 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/cloud-api-adaptor/podvm-mkosi/mkosi.skeleton-rootfs/etc/crypttab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
scratch /dev/disk/by-label/scratch - try-empty-password |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
...-mkosi/mkosi.skeleton-rootfs/usr/lib/systemd/system/kata-agent.service.d/10-override.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[Service] | ||
ExecStartPre=sh -c '[[ -f /run/peerpod/mount-scratch ]] && mount /dev/mapper/scratch /run/kata-containers' |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
src/cloud-api-adaptor/podvm-mkosi/mkosi.skeleton/usr/lib/repart.d/30-scratch.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[Partition] | ||
Type=linux-generic | ||
Label=scratch | ||
Encrypt=key-file | ||
Format=ext4 |