From ef7fcb61334c1445ed709af0448143e3a36db517 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Wed, 3 Apr 2024 22:44:41 +0200 Subject: [PATCH] Some users want to use "host" instead of "hostname" We accept both, nothing more. --- generator/ingress.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/generator/ingress.go b/generator/ingress.go index 569dc93..29de1a9 100644 --- a/generator/ingress.go +++ b/generator/ingress.go @@ -59,10 +59,16 @@ func NewIngress(service types.ServiceConfig, Chart *HelmChart) *Ingress { if Chart.Values[service.Name] == nil { Chart.Values[service.Name] = &Value{} } + + // fix the ingress host => hostname + if hostname, ok := mapping["host"]; ok && hostname != "" { + mapping["hostname"] = hostname + } + Chart.Values[service.Name].(*Value).Ingress = &IngressValue{ Enabled: mapping["enabled"].(bool), Path: mapping["path"].(string), - Host: mapping["host"].(string), + Host: mapping["hostname"].(string), Class: mapping["class"].(string), Annotations: map[string]string{}, }