mirror of
https://github.com/bitnami/charts.git
synced 2026-03-29 16:27:11 +08:00
* Add copyright header Signed-off-by: sfelipe <sfelipe@vmware.com> * Remove copyright from vib runtime_parameters files Signed-off-by: sfelipe <sfelipe@vmware.com> * Add copyright header for pinniped-auth.sh Signed-off-by: sfelipe <sfelipe@vmware.com> * Update templates copyright header format Signed-off-by: sfelipe <sfelipe@vmware.com> --------- Signed-off-by: sfelipe <sfelipe@vmware.com>
34 lines
1.8 KiB
YAML
34 lines
1.8 KiB
YAML
{{- /*
|
|
Copyright VMware, Inc.
|
|
SPDX-License-Identifier: APACHE-2.0
|
|
*/}}
|
|
|
|
{{- if .Values.notary.enabled }}
|
|
{{- $secretName := printf "%s" (include "harbor.notary-server" .) }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ $secretName }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
app.kubernetes.io/component: notary
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
type: Opaque
|
|
data:
|
|
{{- if not .Values.notary.secretName }}
|
|
{{- $ca := genCA "harbor-notary-ca" 365 }}
|
|
{{- $altNames := list (printf "%s.%s.svc" (include "harbor.notary-signer" .) .Release.Namespace | quote) (printf "%s.%s" (include "harbor.notary-signer" .) .Release.Namespace | quote) (include "harbor.notary-signer" .) -}}
|
|
{{- $cert := genSignedCert (include "harbor.notary-signer" .) nil $altNames 365 $ca }}
|
|
notary-signer.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "notary-signer.crt" "defaultValue" $cert.Cert "context" $) }}
|
|
notary-signer.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "notary-signer.key" "defaultValue" $cert.Key "context" $) }}
|
|
notary-signer-ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "notary-signer-ca.crt" "defaultValue" $ca.Cert "context" $) }}
|
|
{{- end }}
|
|
server-config.postgres.json: {{ tpl (.Files.Get "conf/notary-server.json") . | b64enc }}
|
|
signer-config.postgres.json: {{ tpl (.Files.Get "conf/notary-signer.json") . | b64enc }}
|
|
{{- end }}
|