nixos-servers/nix/flake/kubenix/cyberchef.nix
Pim Kunis 40fc4013de install cert-manager
issue certificates for public domains
temporarily disable private domains
2024-04-07 14:07:05 +02:00

60 lines
1.2 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 = [{
containerPort = 8000;
protocol = "TCP";
}];
};
};
};
};
services.cyberchef.spec = {
selector.app = "cyberchef";
ports = [{
protocol = "TCP";
port = 80;
targetPort = 8000;
}];
};
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.number = 80;
};
}];
}];
tls = [{
secretName = "cyberchef-tls";
hosts = [ "cyberchef.kun.is" ];
}];
};
};
};
}