-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
podvm: re-arrange service order for sealed secrets
For sealed secrets to work kata-agent needs to connect to CDH, since it will repace env-variables in the container procoss with an unsealed confidential secret. A systemd path monitor watches for the CDH socket to appear to launch kata-agent. Also, kata is writing the ocicrypt_config to /run in the agent process so we should not have bundle another in the podvm disk. Signed-off-by: Magnus Kulke <[email protected]>
- Loading branch information
Showing
8 changed files
with
13 additions
and
15 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ enable attestation-protocol-forwarder.service | |
enable attestation-agent.service | ||
enable api-server-rest.path | ||
enable confidential-data-hub.path | ||
enable kata-agent.service | ||
enable kata-agent.path | ||
enable [email protected] | ||
enable process-user-data.service | ||
enable setup-nat-for-imds.service | ||
|
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
src/cloud-api-adaptor/podvm/files/etc/systemd/system/agent-protocol-forwarder.service
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
9 changes: 9 additions & 0 deletions
9
src/cloud-api-adaptor/podvm/files/etc/systemd/system/kata-agent.path
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,9 @@ | ||
[Unit] | ||
Description=Monitor for the Confidential Data Hub socket | ||
|
||
[Path] | ||
PathExists=/run/confidential-containers/cdh.sock | ||
Unit=kata-agent.service | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
4 changes: 1 addition & 3 deletions
4
src/cloud-api-adaptor/podvm/files/etc/systemd/system/kata-agent.service
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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
[Unit] | ||
Description=Kata Agent | ||
BindsTo[email protected] | ||
Wants=process-user-data.service attestation-agent.service | ||
After[email protected] process-user-data.service attestation-agent.service | ||
After[email protected] process-user-data.service | ||
|
||
[Service] | ||
Environment=OCICRYPT_KEYPROVIDER_CONFIG=/etc/ocicrypt_config.json | ||
ExecStartPre=mkdir -p /run/kata-containers | ||
ExecStart=/usr/local/bin/kata-agent --config /run/peerpod/agent-config.toml | ||
ExecStartPre=-umount /sys/fs/cgroup/misc | ||
|
1 change: 1 addition & 0 deletions
1
src/cloud-api-adaptor/podvm/files/etc/systemd/system/multi-user.target.wants/kata-agent.path
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 @@ | ||
../kata-agent.path |
1 change: 0 additions & 1 deletion
1
...oud-api-adaptor/podvm/files/etc/systemd/system/multi-user.target.wants/kata-agent.service
This file was deleted.
Oops, something went wrong.
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