From 47326e2c788dbf234e39359991a36ab8cee1bcce Mon Sep 17 00:00:00 2001 From: Tim Hovius Date: Thu, 7 Oct 2021 19:18:13 +0200 Subject: [PATCH] Fixed can't evaluate field hosts in ingress.yaml An error occurred when enabling ingress: `Error: UPGRADE FAILED: template: ingress.yaml:22:16: executing "hansken/charts/kafdrop/templates/ingress.yaml" at <.hosts>: can't evaluate field hosts in type interface {}` --- chart/templates/ingress.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chart/templates/ingress.yaml b/chart/templates/ingress.yaml index c9695f82..238e9374 100644 --- a/chart/templates/ingress.yaml +++ b/chart/templates/ingress.yaml @@ -1,6 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "chart.fullname" . -}} {{- $ingressPath := .Values.ingress.path -}} +{{- $hosts := .Values.ingress.hosts -}} apiVersion: extensions/v1beta1 kind: Ingress metadata: @@ -19,14 +20,14 @@ spec: tls: {{- range .Values.ingress.tls }} - hosts: - {{- range .hosts }} + {{- range $hosts }} - {{ . | quote }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- end }} rules: - {{- range .Values.ingress.hosts }} + {{- range $hosts }} - host: {{ . | quote }} http: paths: