Merge branch 'main' into feature-decouple-rootless All checks were successful check-and-test / check-and-test (pull_request) Successful in 39s
All checks were successful
check-and-test / check-and-test (pull_request) Successful in 39s
This commit is contained in:
@@ -322,7 +322,7 @@ https | ||||
{{- end -}} | ||||
{{- if not (.Values.gitea.config.server.DOMAIN) -}} | ||||
{{- if gt (len .Values.ingress.hosts) 0 -}} | ||||
{{- $_ := set .Values.gitea.config.server "DOMAIN" (index .Values.ingress.hosts 0).host -}} | ||||
{{- $_ := set .Values.gitea.config.server "DOMAIN" ( tpl (index .Values.ingress.hosts 0).host $) -}} | ||||
{{- else -}} | ||||
{{- $_ := set .Values.gitea.config.server "DOMAIN" (include "gitea.default_domain" .) -}} | ||||
{{- end -}} | ||||
| ||||
33 unittests/deployment/inline-config.yaml Normal file
33
unittests/deployment/inline-config.yaml Normal file @@ -0,0 +1,33 @@ | ||||
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 | ||||
Reference in New Issue
Block a user