nixos-servers/kubenix-modules/cyberchef.nix

53 lines
1 KiB
Nix

{
kubernetes.resources = {
deployments.cyberchef.spec = {
replicas = 3;
selector.matchLabels.app = "cyberchef";
template = {
metadata.labels.app = "cyberchef";
spec.containers.cyberchef = {
image = "mpepping/cyberchef";
ports.web.containerPort = 8000;
};
};
};
services.cyberchef.spec = {
selector.app = "cyberchef";
ports.web = {
port = 80;
targetPort = "web";
};
};
ingresses.cyberchef = {
metadata.annotations."cert-manager.io/cluster-issuer" = "letsencrypt";
spec = {
ingressClassName = "traefik";
rules = [{
host = "cyberchef.kun.is";
http.paths = [{
path = "/";
pathType = "Prefix";
backend.service = {
name = "cyberchef";
port.name = "web";
};
}];
}];
tls = [{
secretName = "cyberchef-tls";
hosts = [ "cyberchef.kun.is" ];
}];
};
};
};
}