From cabcccf72130870692d454654abf1023f0d2f0cf Mon Sep 17 00:00:00 2001 From: Harry Waye Date: Sat, 28 Dec 2019 00:29:38 +0000 Subject: [PATCH] [stable/kong] quote host for proxy ingress (#19785) To enable specification of wildcard hosts we need to ensure that the host is quoted, otherwise we need to explicitly quote hosts of the form `*.somedomain.tld`. Before this change, for something of the form `helm install stable/kong kong --set-string='*.somedomain.tld'` we would produce: ``` $ helm template ... --set-string='*.somedomain.tld' ... - host: *.somedomain.tld ... ``` which results in something of the form "error converting YAML to JSON: yaml: line 17: did not find expected alphabetic or numeric character". With the quoting we end up with: ``` $ helm template ... --set-string='*.somedomain.tld' ... - host: '*.somedomain.tld' ... ``` Some resources that I happened upon that provide some prior art and the above solution: 1. https://github.com/helm/helm/issues/5080 2. https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/1058 Signed-off-by: Harry Waye --- stable/kong/Chart.yaml | 2 +- stable/kong/templates/ingress-proxy.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/kong/Chart.yaml b/stable/kong/Chart.yaml index 6d00879f54..2f0ebb047a 100644 --- a/stable/kong/Chart.yaml +++ b/stable/kong/Chart.yaml @@ -12,5 +12,5 @@ maintainers: name: kong sources: - https://github.com/Kong/kong -version: 0.31.0 +version: 0.31.1 appVersion: 1.4 diff --git a/stable/kong/templates/ingress-proxy.yaml b/stable/kong/templates/ingress-proxy.yaml index 7e16fbab4b..3a4c65339b 100644 --- a/stable/kong/templates/ingress-proxy.yaml +++ b/stable/kong/templates/ingress-proxy.yaml @@ -27,7 +27,7 @@ spec: servicePort: {{ $servicePort }} {{ else -}} {{- range $host := .Values.proxy.ingress.hosts }} - - host: {{ $host }} + - host: {{ $host | quote }} http: paths: - path: {{ $path }}