Skip to content

Commit

Permalink
add support for configuring domain
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkukral committed Feb 22, 2024
1 parent 8d2e551 commit e12bd1f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 12 additions & 12 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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" -}}
Expand Down Expand Up @@ -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 -}}
{{- 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 e12bd1f

Please sign in to comment.