-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathsecret.yaml
More file actions
36 lines (33 loc) · 1.12 KB
/
secret.yaml
File metadata and controls
36 lines (33 loc) · 1.12 KB
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
30
31
32
33
34
35
36
{{- if not .Values.externalSecrets.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "retool.fullname" . }}
{{- if or (not .Values.retoolJwtSecret) (not .Values.config.encryptionKey) }}
labels:
{{- include "retool.labels" . | nindent 4 }}
annotations:
"helm.sh/resource-policy": no-upgrade-existing
{{- end }}
type: Opaque
data:
license-key: {{ .Values.config.licenseKey | b64enc | quote }}
{{ if .Values.config.jwtSecret }}
jwt-secret: {{ .Values.config.jwtSecret | b64enc | quote }}
{{ else }}
jwt-secret: {{ randAlphaNum 20 | b64enc | quote }}
{{ end }}
{{ if .Values.config.encryptionKey }}
encryption-key: {{ .Values.config.encryptionKey | b64enc | quote }}
{{ else }}
encryption-key: {{ randAlphaNum 20 | b64enc | quote }}
{{ end }}
{{ if .Values.config.auth.google.clientSecret }}
google-client-secret: {{ .Values.config.auth.google.clientSecret | b64enc |quote }}
{{ else }}
google-client-secret: ""
{{ end }}
{{ if not .Values.postgresql.enabled }}
postgresql-password: {{ .Values.config.postgresql.password | default "" | b64enc | quote }}
{{ end }}
{{- end }}