cluster/services/ways: unique upstreams

This commit is contained in:
Max Headroom 2024-07-04 19:42:08 +02:00
parent e2397ac946
commit c358714cbe

View file

@ -69,7 +69,7 @@ in
{{end}} {{end}}
} }
'') consulServiceWays; '') consulServiceWays;
in pkgs.writeText "ways-upstreams.ctmpl" (lib.concatStringsSep "\n" upstreams); in pkgs.writeText "ways-upstreams.ctmpl" (lib.concatStringsSep "\n" (lib.unique upstreams));
destination = "/run/consul-template/nginx-ways-upstreams.conf"; destination = "/run/consul-template/nginx-ways-upstreams.conf";
exec.command = [ exec.command = [
"${config.services.nginx.package}/bin/nginx" "${config.services.nginx.package}/bin/nginx"