[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 <harry@arachnys.com>
This commit is contained in:
Harry Waye
2019-12-27 16:29:38 -08:00
committed by Kubernetes Prow Robot
parent 5aeb4e8e66
commit cabcccf721
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -12,5 +12,5 @@ maintainers:
name: kong
sources:
- https://github.com/Kong/kong
version: 0.31.0
version: 0.31.1
appVersion: 1.4
+1 -1
View File
@@ -27,7 +27,7 @@ spec:
servicePort: {{ $servicePort }}
{{ else -}}
{{- range $host := .Values.proxy.ingress.hosts }}
- host: {{ $host }}
- host: {{ $host | quote }}
http:
paths:
- path: {{ $path }}