mirror of https://github.com/goharbor/harbor.git
19 lines
650 B
YAML
19 lines
650 B
YAML
{{ if eq .Values.externalProtocol "https" }}
|
|
{{ if .Values.ingress.enabled }}
|
|
{{ if eq .Values.ingress.tls.secretName "" }}
|
|
{{ $ca := genCA "harbor-ca" 3650 }}
|
|
{{ $cert := genSignedCert (include "harbor.certCommonName" .) nil nil 3650 $ca }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: "{{ template "harbor.fullname" . }}-ingress"
|
|
labels:
|
|
{{ include "harbor.labels" . | indent 4 }}
|
|
type: kubernetes.io/tls
|
|
data:
|
|
tls.crt: {{ .Values.tlsCrt | default $cert.Cert | b64enc | quote }}
|
|
tls.key: {{ .Values.tlsKey | default $cert.Key | b64enc | quote }}
|
|
ca.crt: {{ .Values.caCrt | default $ca.Cert | b64enc | quote }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }} |