diff --git a/charts/onechart/templates/ingress.yaml b/charts/onechart/templates/ingress.yaml index 91b3fa2..696ee9b 100644 --- a/charts/onechart/templates/ingress.yaml +++ b/charts/onechart/templates/ingress.yaml @@ -24,7 +24,7 @@ spec: secretName: {{ printf "tls-%s" $.Release.Name }} {{- end }} rules: - - host: {{ .host | quote }} + - host: {{ .host | trunc 63 | trimSuffix "-" | replace "/" "-" | replace "_" "-" | quote }} http: paths: - backend: diff --git a/charts/onechart/tests/ingress_domain_test.yaml b/charts/onechart/tests/ingress_domain_test.yaml index ab5d564..334e40a 100644 --- a/charts/onechart/tests/ingress_domain_test.yaml +++ b/charts/onechart/tests/ingress_domain_test.yaml @@ -17,6 +17,7 @@ tests: - it: Should set Ingress annotation set: ingress: + host: chart-example.local annotations: kubernetes.io/ingress.class: nginx asserts: