mirror of
https://github.com/goharbor/harbor
synced 2025-04-24 16:30:45 +00:00

Assuming Harbor FQDN is specified as harbor.my.domain by the user, the Notary server FQDN will be set to notary-harbor.my.domain. So the user must point both Harbor FQDN and Notary FQDN to the K8s ingress controller IP in the DNS server. Fix issue https://github.com/vmware/harbor/issues/4394
57 lines
1.8 KiB
Smarty
57 lines
1.8 KiB
Smarty
{{/* vim: set filetype=mustache: */}}
|
|
{{/*
|
|
Expand the name of the chart.
|
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
|
*/}}
|
|
{{- define "harbor.name" -}}
|
|
{{- default "harbor" .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create a default fully qualified app name.
|
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
|
*/}}
|
|
{{- define "harbor.fullname" -}}
|
|
{{- $name := default "harbor" .Values.nameOverride -}}
|
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
|
|
{{/* Helm required labels */}}
|
|
{{- define "harbor.labels" -}}
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
|
app: "{{ template "harbor.name" . }}"
|
|
{{- end -}}
|
|
|
|
{{/* matchLabels */}}
|
|
{{- define "harbor.matchLabels" -}}
|
|
release: {{ .Release.Name }}
|
|
app: "{{ template "harbor.name" . }}"
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Use *.domain.com as the Common Name in the certificate,
|
|
so it can match Harbor service FQDN and Notary service FQDN.
|
|
*/}}
|
|
{{- define "harbor.certCommonName" -}}
|
|
{{- $list := splitList "." .Values.externalDomain -}}
|
|
{{- $list := prepend (rest $list) "*" -}}
|
|
{{- $cn := join "." $list -}}
|
|
{{- printf "%s" $cn -}}
|
|
{{- end -}}
|
|
|
|
{{/* The external FQDN of Notary server. */}}
|
|
{{- define "harbor.notaryFQDN" -}}
|
|
{{- printf "notary-%s" .Values.externalDomain -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
The internal service name of Notary server.
|
|
notary-server hostname is not configurable in Harbor 1.4.0.
|
|
Once Harbor 1.5.x is released, use this instead:
|
|
{{- printf "%s-notary-server" (include "harbor.fullname") -}}
|
|
*/}}
|
|
{{- define "harbor.notaryServiceName" -}}
|
|
{{- printf "%s" "notary-server" -}}
|
|
{{- end -}} |