File tree Expand file tree Collapse file tree 8 files changed +69
-27
lines changed Expand file tree Collapse file tree 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 @@ -273,3 +273,29 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
273
273
{{- $databaseName := include "invenio.postgresql.databaseName" . -}}
274
274
{{- printf "postgresql+psycopg2://%s:%s@%s:%v/%s" $username $password $hostname $port $databaseName -}}
275
275
{{- end -}}
276
+
277
+ {{/*
278
+ Get the sentry secret name
279
+ */}}
280
+ {{- define "invenio.sentrySecretName" -}}
281
+ {{- if .Values.invenio.sentry.existingSecret -}}
282
+ {{- print (tpl .Values.invenio.sentry.existingSecret .) -}}
283
+ {{- else if .Values.invenio.sentry.secret_name -}}
284
+ {{- print .Values.invenio.sentry.secret_name -}}
285
+ {{- else -}}
286
+ {{- "sentry-secrets" -}}
287
+ {{- end -}}
288
+ {{- end -}}
289
+
290
+ {{/*
291
+ Add sentry environmental variables
292
+ */}}
293
+ {{- define "invenio.config.sentry" -}}
294
+ {{- if .Values.invenio.sentry.enabled -}}
295
+ - name: INVENIO_SENTRY_DSN
296
+ valueFrom:
297
+ secretKeyRef:
298
+ name: {{ include "invenio.sentrySecretName" . }}
299
+ key: {{ .Values.invenio.sentry.secretKeys.dsnKey }}
300
+ {{- end }}
301
+ {{- end -}}
Original file line number Diff line number Diff line change 63
63
mountPath : " /opt/invenio/var/instance/app_data/vocabularies/{{ $key }}"
64
64
subPath : " {{ $key }}"
65
65
{{- end }}
66
+ {{- include "invenio.config.sentry" . | nindent 8 }}
66
67
{{- if .Values.web.resources }}
67
68
resources : {{- toYaml .Values.web.resources | nindent 10 }}
68
69
{{- 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 unless existingSecret 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
10
{{- include "invenio.labels" . | nindent 4 }}
10
- app : {{ .Values.invenio. sentry.secret_name }}
11
+ app : sentry-secrets
11
12
annotations :
12
13
helm.sh/resource-policy : keep
13
14
data :
14
- SENTRY_DSN : {{ .Values.invenio.sentry.dsn | b64enc }}
15
+ {{ .Values.invenio.sentry.secretKeys.dsnKey }}: {{ $ dsn | b64enc }}
15
16
{{- end -}}
Original file line number Diff line number Diff line change 57
57
secretKeyRef :
58
58
name : invenio-secrets
59
59
key : INVENIO_CSRF_SECRET_SALT
60
- {{- if .Values.invenio.sentry.enabled }}
61
- - name : INVENIO_SENTRY_DSN
62
- valueFrom :
63
- secretKeyRef :
64
- name : {{ .Values.invenio.sentry.secret_name }}
65
- key : SENTRY_DSN
66
- {{- end }}
60
+ {{- include "invenio.config.sentry" . | nindent 8 }}
67
61
{{- if .Values.invenio.datacite.enabled }}
68
62
- name : INVENIO_DATACITE_USERNAME
69
63
valueFrom :
Original file line number Diff line number Diff line change 70
70
secretKeyRef :
71
71
name : invenio-secrets
72
72
key : INVENIO_CSRF_SECRET_SALT
73
- {{- if .Values.invenio.sentry.enabled }}
74
- - name : INVENIO_SENTRY_DSN
75
- valueFrom :
76
- secretKeyRef :
77
- name : {{ .Values.invenio.sentry.secret_name }}
78
- key : SENTRY_DSN
79
- {{- end }}
73
+ {{- include "invenio.config.sentry" . | nindent 8 }}
80
74
{{- if .Values.invenio.datacite.enabled }}
81
75
- name : INVENIO_DATACITE_USERNAME
82
76
valueFrom :
Original file line number Diff line number Diff line change 61
61
secretKeyRef :
62
62
name : invenio-secrets
63
63
key : INVENIO_CSRF_SECRET_SALT
64
- {{- if .Values.invenio.sentry.enabled }}
65
- - name : INVENIO_SENTRY_DSN
66
- valueFrom :
67
- secretKeyRef :
68
- name : {{ .Values.invenio.sentry.secret_name }}
69
- key : SENTRY_DSN
70
- {{- end }}
64
+ {{- include "invenio.config.sentry" . | nindent 10 }}
71
65
{{- if .Values.invenio.datacite.enabled }}
72
66
- name : INVENIO_DATACITE_USERNAME
73
67
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 unless existingSecret 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.
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