nixos-servers/kubenix-modules/traefik.nix

35 lines
972 B
Nix
Raw Permalink Normal View History

2024-05-09 19:03:27 +00:00
{ lib, myLib, ... }: {
2024-04-13 14:37:18 +00:00
kubernetes.resources.helmChartConfigs = {
traefik = {
metadata.namespace = "kube-system";
# Override Traefik's service with a static load balancer IP.
# Create endpoint for HTTPS on port 444.
2024-04-13 14:37:18 +00:00
# Allow external name services for esrom.
2024-05-09 19:03:27 +00:00
spec.valuesContent = lib.generators.toYAML { } {
# service.annotations."metallb.universe.tf/loadBalancerIPs" = myLib.globals.traefikIPv4;
2024-05-09 19:03:27 +00:00
providers.kubernetesIngress.allowExternalNameServices = true;
service.loadBalancerIP = myLib.globals.traefikIPv4;
2024-05-09 19:03:27 +00:00
2024-05-12 08:28:08 +00:00
ports = {
localsecure = {
port = 8444;
expose = true;
exposedPort = 444;
protocol = "TCP";
2024-05-09 19:03:27 +00:00
2024-05-12 08:28:08 +00:00
tls = {
enabled = true;
options = "";
certResolver = "";
domains = [ ];
};
2024-05-09 19:03:27 +00:00
};
2024-05-12 08:28:08 +00:00
web.redirectTo = "websecure";
2024-05-09 19:03:27 +00:00
};
};
2024-04-13 14:37:18 +00:00
};
};
}