Fix regression for unspecified DOMAIN and ROOT_URL (#185) All checks were successful continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
In case a user did not specify DOMAIN in .Values.gitea.config.server, the chart generated incorrect value for that app.ini setting so that Gitea crashed on startup. Same for ROOT_URL. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Reviewed-on: gitea/helm-chart#185 Reviewed-by: luhahn <luhahn@noreply.gitea.io> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: justusbunsi <justusbunsi@noreply.gitea.io> Co-committed-by: justusbunsi <justusbunsi@noreply.gitea.io>
This commit was merged in pull request #185.
This commit is contained in:
committed by
techknowlogick
parent 7a3515c2f2
commit 6a6eb35106
@@ -50,7 +50,7 @@ stringData: | ||||
{{- 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) -}} | ||||
{{- $_ := set .Values.gitea.config.server "DOMAIN" (index .Values.ingress.hosts 0).host -}} | ||||
{{- else -}} | ||||
{{- $_ := set .Values.gitea.config.server "DOMAIN" (include "gitea.default_domain" .) -}} | ||||
{{- end -}} | ||||
@@ -60,7 +60,7 @@ stringData: | ||||
{{- if gt (len .Values.ingress.tls) 0 -}} | ||||
{{- $_ := set .Values.gitea.config.server "ROOT_URL" (printf "%s://%s" .Values.gitea.config.server.PROTOCOL (index (index .Values.ingress.tls 0).hosts 0)) -}} | ||||
{{- else -}} | ||||
{{- $_ := set .Values.gitea.config.server "ROOT_URL" (printf "%s://%s" .Values.gitea.config.server.PROTOCOL (index .Values.ingress.hosts 0)) -}} | ||||
{{- $_ := set .Values.gitea.config.server "ROOT_URL" (printf "%s://%s" .Values.gitea.config.server.PROTOCOL (index .Values.ingress.hosts 0).host) -}} | ||||
{{- end -}} | ||||
{{- else -}} | ||||
{{- $_ := set .Values.gitea.config.server "ROOT_URL" (printf "%s://%s" .Values.gitea.config.server.PROTOCOL .Values.gitea.config.server.DOMAIN) -}} | ||||
| ||||
Reference in New Issue
Block a user