Skip to content

Commit

Permalink
Revert "initializer: move cryptsetup image into initializer"
Browse files Browse the repository at this point in the history
This reverts commit 71f2ff7.
  • Loading branch information
jmxnzo authored and katexochen committed Jan 14, 2025
1 parent a7137f8 commit 92c8ca9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 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/initializer:latest").
WithImage("ghcr.io/edgelesssys/contrast/cryptsetup: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/initializer:latest").
WithImage("ghcr.io/edgelesssys/contrast/cryptsetup: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/initializer:latest").
WithImage("ghcr.io/edgelesssys/contrast/cryptsetup:latest").
WithCommand("/bin/sh", "-c", CryptsetupInitCommand()).
WithVolumeDevices(
applycorev1.VolumeDevice().
Expand Down
28 changes: 18 additions & 10 deletions packages/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,7 @@ let
initializer = dockerTools.buildImage {
name = "initializer";
tag = "v${pkgs.contrast.version}";
copyToRoot =
(with pkgs; [
busybox
cryptsetup
e2fsprogs # mkfs.ext4
mount
util-linux # blkid
openssl
])
++ (with dockerTools; [ caCertificates ]);
copyToRoot = with dockerTools; [ caCertificates ];
config = {
Cmd = [ "${pkgs.contrast.initializer}/bin/initializer" ];
Env = [ "PATH=/bin" ]; # This is only here for policy generation.
Expand All @@ -87,6 +78,23 @@ 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 92c8ca9

Please sign in to comment.