helm-chart/templates/gitea/gpg-secret.yaml
towo 4869aed6ad Fix wrong reference to existingKey (#415)
### Description of the change

Fix a wrong reference to `signing.existingKey`, `signing.existingSecret` was what was meant and what is used in the chart.

### Benefits

Less confusion when trying to use the Helm chart.

### Possible drawbacks

Evangelists of `existingKey` storming the barricades even though `existingKey` is long dead.

### Applicable issues

None, nobody noticed enough to care, apparently.

Co-authored-by: Tobias Wolter <towo@towo.eu>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/415
Reviewed-by: pat-s <pat-s@noreply.gitea.io>
Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.io>
Co-authored-by: towo <towo@noreply.gitea.io>
Co-committed-by: towo <towo@noreply.gitea.io>
2023-03-21 14:16:41 +08:00

17 lines
556 B
YAML

{{- if .Values.signing.enabled -}}
{{- if and (empty .Values.signing.privateKey) (empty .Values.signing.existingSecret) -}}
{{- fail "Either specify `signing.privateKey` or `signing.existingSecret`" -}}
{{- 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 }}