File tree 8 files changed +69
-27
lines changed
8 files changed +69
-27
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,20 @@ DEPRECATION WARNING:
9
9
removed in a future release.
10
10
11
11
{{- end }}
12
+
13
+ {{- if .Values.invenio.sentry.existing_secret}}
14
+
15
+ DEPRECATION WARNING:
16
+ `invenio.sentry.existing_secret` has been renamed to `invenio.sentry.existingSecret`
17
+ and its type has changed from boolean to string.
18
+ This key will be removed in a future release.
19
+
20
+ {{- end }}
21
+
22
+ {{- if .Values.invenio.sentry.secret_name}}
23
+
24
+ DEPRECATION WARNING:
25
+ `invenio.sentry.secret_name` has been removed in favor of
26
+ `invenio.sentry.existingSecret` will be removed in a future release.
27
+
28
+ {{- end }}
Original file line number Diff line number Diff line change 239
239
{{- $databaseName := include "invenio.postgresql.databaseName" . -}}
240
240
{{- printf "postgresql+psycopg2://%s:%s@%s:%v/%s" $username $password $hostname $port $databaseName -}}
241
241
{{- end -}}
242
+
243
+ {{/*
244
+ Get the sentry secret name
245
+ */}}
246
+ {{- define "invenio.sentrySecretName" -}}
247
+ {{- if .Values.invenio.sentry.existingSecret -}}
248
+ {{- print (tpl .Values.invenio.sentry.existingSecret .) -}}
249
+ {{- else if .Values.invenio.sentry.secret_name -}}
250
+ {{- print (tpl .Values.invenio.sentry.secret_name .) -}}
251
+ {{- else -}}
252
+ {{- "sentry-secrets" -}}
253
+ {{- end -}}
254
+ {{- end -}}
255
+
256
+ {{/*
257
+ Add sentry environmental variables
258
+ */}}
259
+ {{- define "invenio.config.sentry" -}}
260
+ {{- if .Values.invenio.sentry.enabled }}
261
+ - name: INVENIO_SENTRY_DSN
262
+ valueFrom:
263
+ secretKeyRef:
264
+ name: {{ include "invenio.sentrySecretName" . }}
265
+ key: {{ .Values.invenio.sentry.secretKeys.dsnKey }}
266
+ {{- end }}
267
+ {{- end -}}
Original file line number Diff line number Diff line change 56
56
secretKeyRef :
57
57
name : invenio-secrets
58
58
key : INVENIO_CSRF_SECRET_SALT
59
+ {{- include "invenio.config.sentry" . | nindent 8 }}
59
60
{{- if .Values.web.resources }}
60
61
resources : {{- toYaml .Values.web.resources | nindent 10 }}
61
62
{{- end }}
Original file line number Diff line number Diff line change 1
- {{- if and (.Values.invenio.sentry.enabled) (not .Values.invenio.sentry.existing_secret) }}
1
+ {{- if and (.Values.invenio.sentry.enabled) (and (not .Values.invenio.sentry.existingSecret) (not .Values.invenio.sentry.existing_secret))}}
2
+ {{- $dsn := .Values.invenio.sentry.dsn | required ".Values.invenio.sentry.dns is required if not secret is provided." -}}
2
3
---
3
4
apiVersion : v1
4
5
kind : Secret
5
6
type : Opaque
6
7
metadata :
7
- name : {{ .Values.invenio. sentry.secret_name }}
8
+ name : sentry-secrets
8
9
labels :
9
- app : {{ .Values.invenio. sentry.secret_name }}
10
+ app : sentry-secrets
10
11
annotations :
11
12
helm.sh/resource-policy : keep
12
13
data :
13
- SENTRY_DSN : {{ .Values.invenio.sentry.dsn | b64enc }}
14
+ {{ .Values.invenio.sentry.secretKeys.dsnKey }}: {{ $ dsn | b64enc }}
14
15
{{- end -}}
Original file line number Diff line number Diff line change 52
52
secretKeyRef :
53
53
name : invenio-secrets
54
54
key : INVENIO_CSRF_SECRET_SALT
55
- {{- if .Values.invenio.sentry.enabled }}
56
- - name : INVENIO_SENTRY_DSN
57
- valueFrom :
58
- secretKeyRef :
59
- name : {{ .Values.invenio.sentry.secret_name }}
60
- key : SENTRY_DSN
61
- {{- end }}
55
+ {{- include "invenio.config.sentry" . | nindent 8 }}
62
56
{{- if .Values.invenio.datacite.enabled }}
63
57
- name : INVENIO_DATACITE_USERNAME
64
58
valueFrom :
Original file line number Diff line number Diff line change 60
60
secretKeyRef :
61
61
name : invenio-secrets
62
62
key : INVENIO_CSRF_SECRET_SALT
63
- {{- if .Values.invenio.sentry.enabled }}
64
- - name : INVENIO_SENTRY_DSN
65
- valueFrom :
66
- secretKeyRef :
67
- name : {{ .Values.invenio.sentry.secret_name }}
68
- key : SENTRY_DSN
69
- {{- end }}
63
+ {{- include "invenio.config.sentry" . | nindent 8 }}
70
64
{{- if .Values.invenio.datacite.enabled }}
71
65
- name : INVENIO_DATACITE_USERNAME
72
66
valueFrom :
Original file line number Diff line number Diff line change 56
56
secretKeyRef :
57
57
name : invenio-secrets
58
58
key : INVENIO_CSRF_SECRET_SALT
59
- {{- if .Values.invenio.sentry.enabled }}
60
- - name : INVENIO_SENTRY_DSN
61
- valueFrom :
62
- secretKeyRef :
63
- name : {{ .Values.invenio.sentry.secret_name }}
64
- key : SENTRY_DSN
65
- {{- end }}
59
+ {{- include "invenio.config.sentry" . | nindent 10 }}
66
60
{{- if .Values.invenio.datacite.enabled }}
67
61
- name : INVENIO_DATACITE_USERNAME
68
62
valueFrom :
Original file line number Diff line number Diff line change @@ -19,10 +19,25 @@ invenio:
19
19
default_users : [] # Requires invenio.init=true
20
20
demo_data : false # Setting invenio.demo_data=true requires also setting default_users!
21
21
sentry :
22
+ # # @param invenio.sentry.enabled Enable Sentry.io integration
23
+ # #
22
24
enabled : false
23
- existing_secret : false
24
- secret_name : " sentry-secrets "
25
+ # # @param invenio.sentry.dns Sentry DSN, required if not secret is provided
26
+ # #
25
27
dsn : " "
28
+ # # @param invenio.sentry.secret_name DEPRECATED: invenio.sentry.existingSecret instead
29
+ # #
30
+ secret_name : " sentry-secrets"
31
+ # # @param invenio.sentry.existing_secret DEPRECATED: invenio.sentry.existingSecret instead
32
+ # #
33
+ existing_secret : false
34
+ # # @param invenio.sentry.existingSecret Existing secret name for sentry's dsn
35
+ # #
36
+ existingSecret : " "
37
+ # # @param invenio.sentry.secretKeys.dsnKey Name of key in existing secret to use for dns. Only used when `invenio.sentry.existingSecret` is set.
38
+ # #
39
+ secretKeys :
40
+ dsnKey : " SENTRY_DSN"
26
41
datacite :
27
42
enabled : false
28
43
existing_secret : false
You can’t perform that action at this time.
0 commit comments