chore: rename input variable
This commit is contained in:
1 parent
3ddfd2bc7d
commit
3d6225406d
1 file changed
+5
-3
@@ -74,7 +74,7 @@ func createIngressRoutesFiles(input CreateIngressRoutesInput) error {
|
|||||||
for _, portMap := range input.PortMaps {
|
for _, portMap := range input.PortMaps {
|
||||||
ingressRoute := templateKubernetesIngressRoute(IngressRoute{
|
ingressRoute := templateKubernetesIngressRoute(IngressRoute{
|
||||||
AppName: input.AppName,
|
AppName: input.AppName,
|
||||||
Hostnames: domains,
|
Domains: domains,
|
||||||
Namespace: input.Namespace,
|
Namespace: input.Namespace,
|
||||||
PortMap: portMap,
|
PortMap: portMap,
|
||||||
ProcessType: "web",
|
ProcessType: "web",
|
||||||
@@ -534,7 +534,7 @@ const (
|
|||||||
type IngressRoute struct {
|
type IngressRoute struct {
|
||||||
AppName string
|
AppName string
|
||||||
Entrypoints []IngressRouteEntrypoint
|
Entrypoints []IngressRouteEntrypoint
|
||||||
Hostnames []string
|
Domains []string
|
||||||
Namespace string
|
Namespace string
|
||||||
PortMap PortMap
|
PortMap PortMap
|
||||||
ProcessType string
|
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{
|
rule := traefikv1alpha1.Route{
|
||||||
Kind: "Rule",
|
Kind: "Rule",
|
||||||
Match: "Host(`" + hostname + "`)",
|
Match: "Host(`" + hostname + "`)",
|
||||||
|
|||||||
Reference in new issue
Block a user