Skip to content

Commit

Permalink
add support for configuring domain
Browse files Browse the repository at this point in the history
Signed-off-by: Tomáš Kukrál <[email protected]>
  • Loading branch information
tomkukral committed Feb 22, 2024
1 parent 8d2e551 commit 9a77124
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,17 @@ app: "{{ template "harbor.name" . }}"
{{- end -}}
{{- end -}}

{{- define "harbor.coreDomain" -}}
{{- if .Values.internalTLS.domain -}}
{{- printf ".%s" .Values.internalTLS.domain -}}
{{- end -}}
{{- end -}}


{{/* CORE_URL */}}
{{/* port is included in this url as a workaround for issue https://github.com/aquasecurity/harbor-scanner-trivy/issues/108 */}}
{{- define "harbor.coreURL" -}}
{{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.core" .) (include "harbor.core.servicePort" .) -}}
{{- printf "%s://%s%s:%s" (include "harbor.component.scheme" .) (include "harbor.core" .) (include "harbor.coreDomain" .) (include "harbor.core.servicePort" .) -}}
{{- end -}}

{{/* JOBSERVICE_URL */}}
Expand Down Expand Up @@ -563,4 +570,4 @@ app: "{{ template "harbor.name" . }}"
{{/* Allow KubeVersion to be overridden. */}}
{{- define "harbor.ingress.kubeVersion" -}}
{{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}}
{{- end -}}
{{- end -}}
2 changes: 2 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9a77124

Please sign in to comment.