Merge branch 'master' of ssh://git.kun.is:56287/home/nixos-servers

This commit is contained in:
Niels Kunis 2024-04-13 18:00:51 +02:00
parent 8b937fdfc4
commit 843810dced
2 changed files with 46 additions and 0 deletions

View file

@ -20,5 +20,6 @@
./esrom.nix
./metallb.nix
./cert-manager.nix
./minecraft.nix
];
}

View file

@ -0,0 +1,45 @@
{
kubernetes.resources = {
configMaps = {
minecraft-env.data = {
EULA = "TRUE";
};
};
deployments.minecraft = {
metadata.labels.app = "minecraft";
spec = {
selector.matchLabels.app = "minecraft";
template = {
metadata.labels.app = "minecraft";
spec = {
containers.minecraft = {
image = "itzg/minecraft-server";
envFrom = [{ configMapRef.name = "minecraft-env"; }];
ports = [{
containerPort = 25565;
protocol = "TCP";
}];
};
};
};
};
};
services.minecraft.spec = {
type = "LoadBalancer";
loadBalancerIP = "192.168.30.136";
selector.app = "minecraft";
ports = [{
port = 25565;
targetPort = 25565;
protocol = "TCP";
}];
};
};
}