From e12bd1fae71cbadb472b1382b5a8f64692ceeca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kukr=C3=A1l?= Date: Thu, 22 Feb 2024 12:57:01 +0100 Subject: [PATCH] add support for configuring domain --- templates/_helpers.tpl | 24 ++++++++++++------------ values.yaml | 2 ++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index b3430a1f3..35d0e7a7f 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -234,47 +234,47 @@ app: "{{ template "harbor.name" . }}" {{- end -}} {{- define "harbor.portal" -}} - {{- printf "%s-portal" (include "harbor.fullname" .) -}} + {{- printf "%s-portal" (include "harbor.fullname" .) -}}{{- if .Values.internalTLS.domain }}.{{ .Values.internalTLS.domain }}{{- end -}} {{- end -}} {{- define "harbor.core" -}} - {{- printf "%s-core" (include "harbor.fullname" .) -}} + {{- printf "%s-core" (include "harbor.fullname" .) -}}{{- if .Values.internalTLS.domain }}.{{ .Values.internalTLS.domain }}{{- end -}} {{- end -}} {{- define "harbor.redis" -}} - {{- printf "%s-redis" (include "harbor.fullname" .) -}} + {{- printf "%s-redis" (include "harbor.fullname" .) -}}{{- if .Values.internalTLS.domain }}.{{ .Values.internalTLS.domain }}{{- end -}} {{- end -}} {{- define "harbor.jobservice" -}} - {{- printf "%s-jobservice" (include "harbor.fullname" .) -}} + {{- printf "%s-jobservice" (include "harbor.fullname" .) -}}{{- if .Values.internalTLS.domain }}.{{ .Values.internalTLS.domain }}{{- end -}} {{- end -}} {{- define "harbor.registry" -}} - {{- printf "%s-registry" (include "harbor.fullname" .) -}} + {{- printf "%s-registry" (include "harbor.fullname" .) -}}{{- if .Values.internalTLS.domain }}.{{ .Values.internalTLS.domain }}{{- end -}} {{- end -}} {{- define "harbor.registryCtl" -}} - {{- printf "%s-registryctl" (include "harbor.fullname" .) -}} + {{- printf "%s-registryctl" (include "harbor.fullname" .) -}}{{- if .Values.internalTLS.domain }}.{{ .Values.internalTLS.domain }}{{- end -}} {{- end -}} {{- define "harbor.database" -}} - {{- printf "%s-database" (include "harbor.fullname" .) -}} + {{- printf "%s-database" (include "harbor.fullname" .) -}}{{- if .Values.internalTLS.domain }}.{{ .Values.internalTLS.domain }}{{- end -}} {{- end -}} {{- define "harbor.trivy" -}} - {{- printf "%s-trivy" (include "harbor.fullname" .) -}} + {{- printf "%s-trivy" (include "harbor.fullname" .) -}}{{- if .Values.internalTLS.domain }}.{{ .Values.internalTLS.domain }}{{- end -}} {{- end -}} {{- define "harbor.nginx" -}} - {{- printf "%s-nginx" (include "harbor.fullname" .) -}} + {{- printf "%s-nginx" (include "harbor.fullname" .) -}}{{- if .Values.internalTLS.domain }}.{{ .Values.internalTLS.domain }}{{- end -}} {{- end -}} {{- define "harbor.exporter" -}} - {{- printf "%s-exporter" (include "harbor.fullname" .) -}} + {{- printf "%s-exporter" (include "harbor.fullname" .) -}}{{- if .Values.internalTLS.domain }}.{{ .Values.internalTLS.domain }}{{- end -}} {{- end -}} {{- define "harbor.ingress" -}} - {{- printf "%s-ingress" (include "harbor.fullname" .) -}} + {{- printf "%s-ingress" (include "harbor.fullname" .) -}}{{- if .Values.internalTLS.domain }}.{{ .Values.internalTLS.domain }}{{- end -}} {{- end -}} {{- define "harbor.noProxy" -}} @@ -563,4 +563,4 @@ app: "{{ template "harbor.name" . }}" {{/* Allow KubeVersion to be overridden. */}} {{- define "harbor.ingress.kubeVersion" -}} {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/values.yaml b/values.yaml index 3c4e87081..89fc8ddce 100644 --- a/values.yaml +++ b/values.yaml @@ -279,6 +279,8 @@ internalTLS: certSource: "auto" # The content of trust ca, only available when `certSource` is "manual" trustCa: "" + # domain appended to internal components hostname + domain: "" # core related cert configuration core: # secret name for core's tls certs