Skip to content

Commit b4efe7d

Browse files
committed
ci: embed prod policy settings on release
This commit blesses the Microsoft fork of the Kata Containers policy and settings. Why not ours? * Any divergence from upstream configs risks security relevant divergence and would need continuous justification. * We can contribute missing policy features upstream, if needed. Why not kata-containers/kata-containers? * We assume that the Microsoft fork is customized to the AKS environment that we're targeting, and we want to stay compatible with that. * The genpolicy tool and its config are not compatible across minor versions (e.g., a policy generated from Kata head today is not accepted by the Kata Agent available in the AKS preview today).
1 parent 99a0c23 commit b4efe7d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/by-name/cli-release/package.nix

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
{ nunki }:
1+
{ lib
2+
, nunki
3+
, genpolicy-msft
4+
, genpolicy ? genpolicy-msft
5+
}:
26

37
(nunki.overrideAttrs (_finalAttrs: previousAttrs: {
8+
prePatch = ''
9+
install -D ${lib.getExe genpolicy} cli/assets/genpolicy
10+
install -D ${genpolicy.settings}/genpolicy-settings.json cli/assets/genpolicy-settings.json
11+
install -D ${genpolicy.rules}/genpolicy-rules.rego cli/assets/genpolicy-rules.rego
12+
'';
13+
414
ldflags = previousAttrs.ldflags ++ [
515
"-X main.DefaultCoordinatorPolicyHash=${builtins.readFile ../../../cli/assets/coordinator-policy-hash}"
616
];

0 commit comments

Comments
 (0)