Make cluster domain configurable (#51)

Merge branch 'master' into cluster-domain

Make cluster domain configurable

Currently the deployment fails due to a hard-coded cluster domain "cluster.local".

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Steffen Vogel <post@steffenvogel.de>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/51
Reviewed-by: luhahn <luhahn@noreply.gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-Authored-By: Steffen Vogel <stv0g@noreply.gitea.io>
Co-Committed-By: Steffen Vogel <stv0g@noreply.gitea.io>
This commit is contained in:
Steffen Vogel 2020-10-30 01:08:58 +08:00 committed by luhahn
parent 8f70a4b9a0
commit ed0ce3d192
2 changed files with 8 additions and 6 deletions

View File

@ -76,22 +76,22 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}} {{- end -}}
{{- define "postgresql.dns" -}} {{- define "postgresql.dns" -}}
{{- printf "%s-postgresql.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.postgresql.global.postgresql.servicePort -}} {{- printf "%s-postgresql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.postgresql.global.postgresql.servicePort -}}
{{- end -}} {{- end -}}
{{- define "mysql.dns" -}} {{- define "mysql.dns" -}}
{{- printf "%s-mysql.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.mysql.service.port | trunc 63 | trimSuffix "-" -}} {{- printf "%s-mysql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.mysql.service.port | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}
{{- define "mariadb.dns" -}} {{- define "mariadb.dns" -}}
{{- printf "%s-mariadb.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.mariadb.primary.service.port | trunc 63 | trimSuffix "-" -}} {{- printf "%s-mariadb.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.mariadb.primary.service.port | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}
{{- define "memcached.dns" -}} {{- define "memcached.dns" -}}
{{- printf "%s-memcached.%s.svc.cluster.local:%g" .Release.Name .Release.Namespace .Values.memcached.service.port | trunc 63 | trimSuffix "-" -}} {{- printf "%s-memcached.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.memcached.service.port | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}
{{- define "gitea.default_domain" -}} {{- define "gitea.default_domain" -}}
{{- printf "%s-gitea.%s.svc.cluster.local" (include "gitea.fullname" .) .Release.Namespace | trunc 63 | trimSuffix "-" -}} {{- printf "%s-gitea.%s.svc.%s" (include "gitea.fullname" .) .Release.Namespace .Values.clusterDomain | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}

View File

@ -4,6 +4,8 @@
replicaCount: 1 replicaCount: 1
clusterDomain: cluster.local
image: image:
repository: gitea/gitea repository: gitea/gitea
version: 1.12.5 version: 1.12.5