Skip to content

Commit f69ca33

Browse files
committed
Fix signature check for CoCo
PR openshift#468 forgot to teach the `copy-files.sh` of the CAA podvm build flow about the added `/etc/kata-agent.toml` config file. Fix that now. This doesn't have any impact on non-confidential peer pods. Signed-off-by: Greg Kurz <[email protected]>
1 parent 1cad3e5 commit f69ca33

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: config/peerpods/podvm/lib.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,18 @@ function prepare_source_code() {
246246

247247
# Enable image signature check
248248
if [[ "$CONFIDENTIAL_COMPUTE_ENABLED" == "yes" ]]; then
249-
cat<<EOF>"${podvm_dir}"/files/etc/agent-config.toml
249+
local agent_config_file="/etc/agent-config.toml"
250+
251+
cat<<EOF>"${podvm_dir}/files${agent_config_file}"
250252
server_addr = "unix:///run/kata-containers/agent.sock"
251253
guest_components_procs = "none"
252254
image_registry_auth = "file:///run/peerpod/auth.json"
253255
enable_signature_verification = true
254256
image_policy_file = "kbs:///default/security-policy/osc"
255257
EOF
256-
sed -i 's,/run/peerpod/agent-config.toml,/etc/agent-config.toml,' \
258+
sed -i "s,/run/peerpod/agent-config.toml,${agent_config_file},g" \
257259
"${podvm_dir}"/files/etc/systemd/system/kata-agent.service
260+
echo "sudo cp -a /tmp/files${agent_config_file} ${agent_config_file}" >>"${podvm_dir}"/qcow2/copy-files.sh
258261
fi
259262
}
260263

0 commit comments

Comments
 (0)