nixos/kubernetes: use copyToRoot instead of deprecated contents

This commit is contained in:
zowoq 2022-07-15 10:05:39 +10:00
parent 0436831b1a
commit e2659eea36
3 changed files with 20 additions and 4 deletions

View file

@ -23,7 +23,11 @@ let
infraContainer = pkgs.dockerTools.buildImage {
name = "pause";
tag = "latest";
contents = top.package.pause;
copyToRoot = pkgs.buildEnv {
name = "image-root";
pathsToLink = [ "/bin" ];
paths = [ top.package.pause ];
};
config.Cmd = ["/bin/pause"];
};

View file

@ -33,7 +33,11 @@ let
redisImage = pkgs.dockerTools.buildImage {
name = "redis";
tag = "latest";
contents = [ pkgs.redis pkgs.bind.host ];
copyToRoot = pkgs.buildEnv {
name = "image-root";
pathsToLink = [ "/bin" ];
paths = [ pkgs.redis pkgs.bind.host ];
};
config.Entrypoint = ["/bin/redis-server"];
};
@ -54,7 +58,11 @@ let
probeImage = pkgs.dockerTools.buildImage {
name = "probe";
tag = "latest";
contents = [ pkgs.bind.host pkgs.busybox ];
copyToRoot = pkgs.buildEnv {
name = "image-root";
pathsToLink = [ "/bin" ];
paths = [ pkgs.bind.host pkgs.busybox ];
};
config.Entrypoint = ["/bin/tail"];
};

View file

@ -84,7 +84,11 @@ let
kubectlImage = pkgs.dockerTools.buildImage {
name = "kubectl";
tag = "latest";
contents = [ copyKubectl pkgs.busybox kubectlPod2 ];
copyToRoot = pkgs.buildEnv {
name = "image-root";
pathsToLink = [ "/bin" ];
paths = [ copyKubectl pkgs.busybox kubectlPod2 ];
};
config.Entrypoint = ["/bin/sh"];
};