-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathsecret-gpg.yaml
29 lines (29 loc) · 950 Bytes
/
secret-gpg.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{{- if not .Values.gpgExistingSecret }}
{{- $type := "sec" -}}
{{- $action := "gpg" -}}
{{- $Name := include "passbolt-library.fullname" . -}}
{{- $fullName := printf "%s-%s-%s" $Name $type $action -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ $fullName }}
annotations:
helm.sh/hook: pre-install, pre-upgrade
helm.sh/hook-weight: "-1"
labels:
{{- include "passbolt-library.labels" . | nindent 4 }}
{{- include "passbolt-library.selectorLabels" . | nindent 4 }}
{{- include "passbolt-library.typelabels" (dict "action" $action "type" $type) | nindent 4 }}
type: Opaque
data:
{{- if .Values.gpgServerKeyPrivate }}
serverkey_private.asc: {{ .Values.gpgServerKeyPrivate }}
{{- else }}
serverkey_private.asc: {{ printf "%q" "" }}
{{- end }}
{{- if .Values.gpgServerKeyPublic }}
serverkey.asc: {{ .Values.gpgServerKeyPublic }}
{{- else }}
serverkey.asc: {{ printf "%q" "" }}
{{- end }}
{{- end }}