Skip to content

Commit

Permalink
policy: symlink default policy to /run/peerpod
Browse files Browse the repository at this point in the history
Since policy is provisioned by initdata to /run/peerpod/policy.rego we
need to point the symlink to that file.

In case no init-data is provided allow-all.rego is copied by systemd to
/run/peerpod/policy.rego

Signed-off-by: Magnus Kulke <[email protected]>
  • Loading branch information
mkulke authored and Qi Feng Huo committed Aug 12, 2024
1 parent fb1d33a commit c1034d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/cloud-api-adaptor/podvm/files/etc/tmpfiles.d/policy.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Type Path Mode User Group Age Argument
C /run/peerpod/policy.rego - - - - /etc/kata-opa/allow-all.rego
1 change: 1 addition & 0 deletions src/cloud-api-adaptor/podvm/qcow2/copy-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ sudo cp -a /tmp/files/pause_bundle /
# Copy the kata-agent OPA policy files
sudo mkdir -p /etc/kata-opa
sudo cp -a /tmp/files/etc/kata-opa/* /etc/kata-opa/
sudo cp -a /tmp/files/etc/tmpfiles.d/policy.conf /etc/tmpfiles.d/

0 comments on commit c1034d0

Please sign in to comment.