2023-01-17 10:58:10 -06:00
|
|
|
{{- if .Values.signing.enabled -}}
|
|
|
|
{{- if and (empty .Values.signing.privateKey) (empty .Values.signing.existingSecret) -}}
|
2023-03-21 01:16:41 -05:00
|
|
|
{{- fail "Either specify `signing.privateKey` or `signing.existingSecret`" -}}
|
2023-01-17 10:58:10 -06:00
|
|
|
{{- end }}
|
|
|
|
{{- if and (not (empty .Values.signing.privateKey)) (empty .Values.signing.existingSecret) -}}
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: {{ include "gitea.gpg-key-secret-name" . }}
|
|
|
|
labels:
|
|
|
|
{{- include "gitea.labels" . | nindent 4 }}
|
|
|
|
type: Opaque
|
|
|
|
data:
|
|
|
|
privateKey: {{ .Values.signing.privateKey | b64enc }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|