Skip to content

Commit

Permalink
fix: unable to override runtime defaults
Browse files Browse the repository at this point in the history
This fixes the issue when `.machine.files` using
`/etc/cri/conf.d/20-customization.part` is sometimes unable to merge the
values.

The fix is to prefix the the files with `10-` prefix so the
customization with `20-` takes precedence when merging.

`gvisor-debug` is prefixed with `11-` since it should overwrite the
gvisor defaults. This also fixes where the order of gvisor extensions
mattered previously.

Fixes: #578

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Jan 10, 2025
1 parent db466d1 commit 9c92bda
Show file tree
Hide file tree
Showing 17 changed files with 8 additions and 8 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion container-runtime/crun/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ steps:
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/crun.part /rootfs/etc/cri/conf.d/crun.part
cp /pkg/10-crun.part /rootfs/etc/cri/conf.d/10-crun.part
test:
- |
mkdir -p /extensions-validator-rootfs
Expand Down
2 changes: 1 addition & 1 deletion container-runtime/gvisor-debug/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ steps:
install:
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/gvisor-debug.part /rootfs/etc/cri/conf.d/gvisor-debug.part
cp /pkg/11-gvisor-debug.part /rootfs/etc/cri/conf.d/11-gvisor-debug.part
cp /pkg/runsc.toml /rootfs/etc/cri/conf.d/runsc.toml
test:
- |
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion container-runtime/gvisor/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ steps:
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/gvisor.part /pkg/runsc.toml /pkg/gvisor-kvm.part /pkg/runsc-kvm.toml /rootfs/etc/cri/conf.d/
cp /pkg/10-gvisor.part /pkg/runsc.toml /pkg/10-gvisor-kvm.part /pkg/runsc-kvm.toml /rootfs/etc/cri/conf.d/
test:
- |
mkdir -p /extensions-validator-rootfs
Expand Down
2 changes: 1 addition & 1 deletion container-runtime/kata-containers/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ steps:
cp containerd-shim-kata-v2 /rootfs/usr/local/bin/containerd-shim-kata-v2
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/kata-containers.part /rootfs/etc/cri/conf.d/kata-containers.part
cp /pkg/10-kata-containers.part /rootfs/etc/cri/conf.d/10-kata-containers.part
mkdir -p /rootfs/usr/local/share/kata-containers
cp /pkg/configuration.toml /rootfs/usr/local/share/kata-containers/configuration.toml
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion container-runtime/spin/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ steps:
tar xf containerd-shim-spin.tar.gz -C /rootfs/usr/local/bin
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/spin.part /rootfs/etc/cri/conf.d/spin.part
cp /pkg/10-spin.part /rootfs/etc/cri/conf.d/10-spin.part
test:
- |
mkdir -p /extensions-validator-rootfs
Expand Down
2 changes: 1 addition & 1 deletion container-runtime/stargz-snapshotter/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ steps:
chmod +x /rootfs/usr/local/lib/containers/stargz-snapshotter/ctr-remote
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/stargz-snapshotter.part /rootfs/etc/cri/conf.d/stargz-snapshotter.part
cp /pkg/10-stargz-snapshotter.part /rootfs/etc/cri/conf.d/10-stargz-snapshotter.part
mkdir -p /rootfs/usr/local/etc/containerd-stargz-grpc
cp /pkg/config.toml /rootfs/usr/local/etc/containerd-stargz-grpc/config.toml
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion container-runtime/wasmedge/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ steps:
mkdir -p /rootfs/usr/local/bin
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/wasm.part /rootfs/etc/cri/conf.d/wasm.part
cp /pkg/10-wasm.part /rootfs/etc/cri/conf.d/10-wasm.part
tar xf containerd-shim-wasmedge.tar.gz -C /rootfs/usr/local/bin
test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ steps:
done
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/nvidia-container-runtime.part /rootfs/etc/cri/conf.d/nvidia-container-runtime.part
cp /pkg/10-nvidia-container-runtime.part /rootfs/etc/cri/conf.d/10-nvidia-container-runtime.part
mkdir -p /rootfs/usr/local/etc/nvidia-container-runtime
cp /pkg/nvidia-container-runtime.toml /rootfs/usr/local/etc/nvidia-container-runtime/config.toml
Expand Down

0 comments on commit 9c92bda

Please sign in to comment.