chore(nix-kubernetes): mount tmpfs on /tmp

This commit is contained in:
technofab 2024-04-26 20:44:44 +02:00
parent 89befec9ca
commit 976c32ce5b

View file

@ -29,6 +29,21 @@
}; };
}; };
}; };
init_container = [
{
name = "copy-nix-store";
image = "registry.gitlab.com/technofab/coder-templates/nix-coder-image:\${data.coder_parameter.image_tag.value}";
command = ["cp" "-nR" "/nix/." "/pv_nix"];
security_context.run_as_user = "1000";
volume_mount = [
{
mount_path = "/pv_nix";
name = "nix-store";
read_only = false;
}
];
}
];
container = [ container = [
{ {
name = "workspace"; name = "workspace";
@ -63,6 +78,11 @@
name = "nix-store"; name = "nix-store";
read_only = false; read_only = false;
} }
{
mount_path = "/tmp";
name = "tmp";
read_only = false;
}
]; ];
} }
]; ];
@ -79,6 +99,14 @@
name = "nix-store"; name = "nix-store";
persistent_volume_claim.claim_name = "\${resource.kubernetes_persistent_volume_claim.nix-store.metadata.0.name}"; persistent_volume_claim.claim_name = "\${resource.kubernetes_persistent_volume_claim.nix-store.metadata.0.name}";
} }
{
name = "tmp";
empty_dir = {
medium = "Memory";
# not used for now
# sizeLimit = "200Mi";
};
}
]; ];
}; };
}; };