From 3d6225406d3cb16cdd5c15375045e0558bf8e8aa Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 22 Jan 2024 01:54:34 -0500 Subject: [PATCH] chore: rename input variable --- plugins/scheduler-k3s/template.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/scheduler-k3s/template.go b/plugins/scheduler-k3s/template.go index e1a7e36bb..7ac6f356d 100644 --- a/plugins/scheduler-k3s/template.go +++ b/plugins/scheduler-k3s/template.go @@ -74,7 +74,7 @@ func createIngressRoutesFiles(input CreateIngressRoutesInput) error { for _, portMap := range input.PortMaps { ingressRoute := templateKubernetesIngressRoute(IngressRoute{ AppName: input.AppName, - Hostnames: domains, + Domains: domains, Namespace: input.Namespace, PortMap: portMap, ProcessType: "web", @@ -534,7 +534,7 @@ const ( type IngressRoute struct { AppName string Entrypoints []IngressRouteEntrypoint - Hostnames []string + Domains []string Namespace string PortMap PortMap ProcessType string @@ -570,7 +570,9 @@ func templateKubernetesIngressRoute(input IngressRoute) traefikv1alpha1.IngressR }, } - for _, hostname := range input.Hostnames { + sort.Strings(input.Domains) + + for _, hostname := range input.Domains { rule := traefikv1alpha1.Route{ Kind: "Rule", Match: "Host(`" + hostname + "`)",