7de8e83433
### Description of the change - Adding TPL use into './templates/_helpers.tpl' in "gitea.inline_configuration.defaults.server" since '.Values.ingress.hosts' referred ### Benefits - Avoid error in deployment using Gitea CHart 9.5.0 such as "Invalid ROOT_URL 'https://{{ .Values.global.giteaHostName }}': parse "https://{{ .Values.global.giteaHostName }}": invalid character "{" in host name" ### Possible drawbacks N/A ### Applicable issues - fixes #530 ### Checklist - [x] Fixing './templates/_helpers.tpl' "gitea.inline_configuration.defaults.server - [x] Templating unittests are added Co-authored-by: pat-s <pat-s@noreply.gitea.com> Co-authored-by: justusbunsi <justusbunsi@noreply.gitea.com> Co-authored-by: 212597596 <cedric.henry@ge.com> Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/529 Reviewed-by: pat-s <pat-s@noreply.gitea.com> Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.com> Co-authored-by: Ceddaerrix <ceddaerrix@noreply.gitea.com> Co-committed-by: Ceddaerrix <ceddaerrix@noreply.gitea.com>
34 lines
961 B
YAML
34 lines
961 B
YAML
suite: config template
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/gitea/config.yaml
|
|
tests:
|
|
- it: inline config stringData.server using TPL
|
|
set:
|
|
global.giteaHostName: "gitea.example.com"
|
|
ingress.enabled: true
|
|
ingress.hosts[0].host: "{{ .Values.global.giteaHostName }}"
|
|
ingress.tls:
|
|
- secretName: gitea-tls
|
|
hosts:
|
|
- "{{ .Values.global.giteaHostName }}"
|
|
asserts:
|
|
- documentIndex: 0
|
|
matchRegex:
|
|
path: metadata.name
|
|
pattern: .*-inline-config$
|
|
- documentIndex: 0
|
|
matchRegex:
|
|
path: stringData.server
|
|
pattern: DOMAIN=gitea\.example\.com
|
|
- documentIndex: 0
|
|
matchRegex:
|
|
path: stringData.server
|
|
pattern: ROOT_URL=https://gitea\.example\.com
|
|
- documentIndex: 0
|
|
matchRegex:
|
|
path: stringData.server
|
|
pattern: SSH_DOMAIN=gitea\.example\.com
|