[stable/kong] fix whitespace handling for license (#19852)

Do not chomp leading whitespace prior to including kong.license within
the final_env helper. Doing so appends the license block immediately
after the preceding value, generating invalid YAML.

Prior to the creation of final_env, kong.license was injected directly
into Deployment and Job templates, using the nindent function to apply
indentation and add a newline. final_env instead places kong.license at
the correct indentation within the templated block, and does not use
nindent. As such, the include should not chomp leading whitespace before
it.

Signed-off-by: Travis Raines <traines@konghq.com>
This commit is contained in:
Travis Raines
2020-01-03 12:55:40 -08:00
committed by Kubernetes Prow Robot
parent d2cd8421fa
commit 3d2bb08ac7
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -12,5 +12,5 @@ maintainers:
name: kong
sources:
- https://github.com/Kong/kong
version: 0.33.0
version: 0.33.1
appVersion: 1.4
+5
View File
@@ -450,6 +450,11 @@ value is your SMTP password.
## Changelog
### 0.33.1
#### Fixed
- Correct an issue with whitespace handling within `final_env` helper.
### 0.33.0
+1 -1
View File
@@ -457,7 +457,7 @@ the template that it itself is using form the above sections.
- name: KONG_SMTP_MOCK
value: "on"
{{- end }}
{{- include "kong.license" . }}
{{ include "kong.license" . }}
{{- end }}
- name: KONG_NGINX_HTTP_INCLUDE
value: /kong/servers.conf