Skip to content

Commit

Permalink
Reapply "initializer: move cryptsetup image into initializer"
Browse files Browse the repository at this point in the history
This reverts commit 92c8ca9.
  • Loading branch information
jmxnzo committed Jan 20, 2025
1 parent 074cf39 commit 492ee9b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
6 changes: 3 additions & 3 deletions internal/kuberesource/sets.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ func VolumeStatefulSet() []any {
WithInitContainers(
Container().
WithName("volume-tester-init").
WithImage("ghcr.io/edgelesssys/contrast/cryptsetup:latest").
WithImage("ghcr.io/edgelesssys/contrast/initializer:latest").
WithCommand("/bin/sh", "-c", CryptsetupInitCommand()).
WithVolumeDevices(
applycorev1.VolumeDevice().
Expand Down Expand Up @@ -563,7 +563,7 @@ func VolumeStatefulSet() []any {
WithContainers(
Container().
WithName("volume-tester").
WithImage("ghcr.io/edgelesssys/contrast/cryptsetup:latest").
WithImage("ghcr.io/edgelesssys/contrast/initializer:latest").
WithCommand("/bin/sh", "-c", "sleep inf").
WithVolumeMounts(
VolumeMount().
Expand Down Expand Up @@ -617,7 +617,7 @@ func MySQL() []any {
WithInitContainers(
Container().
WithName("luks-setup").
WithImage("ghcr.io/edgelesssys/contrast/cryptsetup:latest").
WithImage("ghcr.io/edgelesssys/contrast/initializer:latest").
WithCommand("/bin/sh", "-c", CryptsetupInitCommand()).
WithVolumeDevices(
applycorev1.VolumeDevice().
Expand Down
28 changes: 10 additions & 18 deletions packages/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,16 @@ let
initializer = dockerTools.buildImage {
name = "initializer";
tag = "v${pkgs.contrast.version}";
copyToRoot = with dockerTools; [ caCertificates ];
copyToRoot =
(with pkgs; [
busybox
cryptsetup
e2fsprogs # mkfs.ext4
mount
util-linux # blkid
openssl
])
++ (with dockerTools; [ caCertificates ]);
config = {
Cmd = [ "${pkgs.contrast.initializer}/bin/initializer" ];
Env = [ "PATH=/bin" ]; # This is only here for policy generation.
Expand All @@ -78,23 +87,6 @@ let
};
};

cryptsetup = dockerTools.buildImage {
name = "cryptsetup";
tag = "v${pkgs.contrast.version}";
copyToRoot = with pkgs; [
busybox
cryptsetup
e2fsprogs # mkfs.ext4
mount
util-linux # blkid
openssl
];
config = {
Cmd = [ "bash" ];
Env = [ "PATH=/bin" ]; # This is only here for policy generation.
};
};

port-forwarder = dockerTools.buildImage {
name = "port-forwarder";
tag = "v${pkgs.contrast.version}";
Expand Down

0 comments on commit 492ee9b

Please sign in to comment.