Skip to content

Commit

Permalink
feat: enhance nginx config to handle disabled sentry relay (#1430)
Browse files Browse the repository at this point in the history
  • Loading branch information
patsevanton authored Sep 11, 2024
1 parent 6f54918 commit 4395dba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/sentry/templates/configmap-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ metadata:
name: {{ template "sentry.fullname" . }}-nginx
data:
server-block.conf: |
{{ if .Values.relay.enabled }}
upstream relay {
server {{ template "sentry.fullname" . }}-relay:{{ template "relay.port" }};
}
{{ end -}}
upstream sentry {
server {{ template "sentry.fullname" . }}-web:{{ template "sentry.port" }};
Expand All @@ -25,13 +27,15 @@ data:
proxy_busy_buffers_size 256k;
proxy_set_header Host $host;
{{ if .Values.relay.enabled }}
location /api/store/ {
proxy_pass http://relay;
}
location ~ ^/api/[1-9]\d*/ {
proxy_pass http://relay;
}
{{ end -}}
{{ if or .Values.nginx.metrics.enabled .Values.nginx.metrics.serviceMonitor.enabled -}}
location = /status/ {
Expand Down

0 comments on commit 4395dba

Please sign in to comment.