kubernetes-deployments/modules/cyberchef.nix

46 lines
890 B
Nix
Raw Normal View History

2024-10-28 15:05:06 +00:00
{
config,
lib,
globals,
...
}: {
2024-09-07 10:35:02 +00:00
options.cyberchef.enable = lib.mkEnableOption "cyberchef";
config = lib.mkIf config.cyberchef.enable {
kubernetes.resources = {
deployments.cyberchef.spec = {
replicas = 3;
selector.matchLabels.app = "cyberchef";
template = {
metadata.labels.app = "cyberchef";
spec.containers.cyberchef = {
image = globals.images.cyberchef;
imagePullPolicy = "Always";
ports.web.containerPort = 8000;
};
};
};
services.cyberchef.spec = {
selector.app = "cyberchef";
ports.web = {
port = 80;
targetPort = "web";
};
};
};
lab.ingresses.cyberchef = {
host = "cyberchef.kun.is";
service = {
name = "cyberchef";
portName = "web";
};
};
};
}