Skip to content

Commit c8f9a48

Browse files
authored
Add Symbolicator Cleanup and Increase dbInit Memory (#1769)
1 parent 1e36a33 commit c8f9a48

File tree

4 files changed

+58
-1
lines changed

4 files changed

+58
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.DS_Store
22
.idea
3+
**.tgz
34

charts/sentry/templates/symbolicator/deployment-symbolicator.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,35 @@ spec:
125125
securityContext:
126126
{{ toYaml .Values.symbolicator.api.containerSecurityContext | indent 12 }}
127127
{{- end }}
128+
{{- if .Values.symbolicator.api.cleaner.enabled }}
129+
- name: {{ .Chart.Name }}-symbolicator-cleaner
130+
image: "{{ template "symbolicator.image" . }}"
131+
imagePullPolicy: {{ default "IfNotPresent" .Values.images.symbolicator.pullPolicy }}
132+
command:
133+
- /bin/sh
134+
- -c
135+
args:
136+
- |
137+
while true; do
138+
symbolicator cleanup -c /etc/symbolicator/config.yml;
139+
sleep {{ .Values.symbolicator.api.cleaner.sleepInterval }};
140+
done
141+
env:
142+
{{ if and (eq .Values.filestore.backend "gcs") .Values.filestore.gcs.secretName }}
143+
- name: GOOGLE_APPLICATION_CREDENTIALS
144+
value: /var/run/secrets/google/{{ .Values.filestore.gcs.credentialsFile }}
145+
{{ end }}
146+
volumeMounts:
147+
- mountPath: /etc/symbolicator
148+
name: config
149+
readOnly: true
150+
- mountPath: /data
151+
name: symbolicator-data
152+
{{- if and (eq .Values.filestore.backend "gcs") .Values.filestore.gcs.secretName }}
153+
- name: sentry-google-cloud-key
154+
mountPath: /var/run/secrets/google
155+
{{ end }}
156+
{{- end }}
128157
{{- if .Values.symbolicator.api.sidecars }}
129158
{{ toYaml .Values.symbolicator.api.sidecars | indent 6 }}
130159
{{- end }}

charts/sentry/templates/symbolicator/statefulset-symbolicator.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,30 @@ spec:
126126
securityContext:
127127
{{ toYaml .Values.symbolicator.api.containerSecurityContext | indent 12 }}
128128
{{- end }}
129+
{{- if .Values.symbolicator.api.cleaner.enabled }}
130+
- name: {{ .Chart.Name }}-symbolicator-cleaner
131+
image: "{{ template "symbolicator.image" . }}"
132+
imagePullPolicy: {{ default "IfNotPresent" .Values.images.symbolicator.pullPolicy }}
133+
command:
134+
- /bin/sh
135+
- -c
136+
args:
137+
- |
138+
while true; do
139+
symbolicator cleanup -c /etc/symbolicator/config.yml;
140+
sleep {{ .Values.symbolicator.api.cleaner.sleepInterval }};
141+
done
142+
volumeMounts:
143+
- mountPath: /etc/symbolicator
144+
name: config
145+
readOnly: true
146+
- mountPath: /data
147+
name: symbolicator-data
148+
{{- if and (eq .Values.filestore.backend "gcs") .Values.filestore.gcs.secretName }}
149+
- name: sentry-google-cloud-key
150+
mountPath: /var/run/secrets/google
151+
{{ end }}
152+
{{- end }}
129153
{{- if .Values.serviceAccount.enabled }}
130154
serviceAccountName: {{ .Values.serviceAccount.name }}-symbolicator-api
131155
{{- end }}

charts/sentry/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,7 @@ hooks:
17861786
podAnnotations: {}
17871787
resources:
17881788
limits:
1789-
memory: 2048Mi
1789+
memory: 2560Mi
17901790
requests:
17911791
cpu: 300m
17921792
memory: 2048Mi
@@ -1850,6 +1850,9 @@ mail:
18501850
symbolicator:
18511851
enabled: false
18521852
api:
1853+
cleaner:
1854+
enabled: true
1855+
sleepInterval: 3600
18531856
usedeployment: true # Set true to use Deployment, false for StatefulSet
18541857
persistence:
18551858
enabled: true # Set true for using PersistentVolumeClaim, false for emptyDir

0 commit comments

Comments
 (0)