diff --git a/charts/sentry/templates/configmap-nginx.yaml b/charts/sentry/templates/configmap-nginx.yaml index 18acb64f8..9d64ffaa3 100644 --- a/charts/sentry/templates/configmap-nginx.yaml +++ b/charts/sentry/templates/configmap-nginx.yaml @@ -35,6 +35,10 @@ data: location ~ ^/api/[1-9]\d*/ { proxy_pass http://relay; } + + location ^~ /api/0/relays/ { + proxy_pass http://relay; + } {{ end -}} {{ if or .Values.nginx.metrics.enabled .Values.nginx.metrics.serviceMonitor.enabled -}} diff --git a/charts/sentry/templates/ingress.yaml b/charts/sentry/templates/ingress.yaml index d84927257..88f2b6e5d 100644 --- a/charts/sentry/templates/ingress.yaml +++ b/charts/sentry/templates/ingress.yaml @@ -142,6 +142,24 @@ spec: - path: {{ default "/" .Values.ingress.path }}api/{[1-9][0-9]*}/{(.*)} {{- else }} - path: {{ default "/" .Values.ingress.path }}api/[1-9][0-9]*/(.*) + {{- end }} + {{- if $ingressSupportsPathType }} + pathType: {{ $ingressPathType }} + {{- end }} + backend: + {{- if $ingressApiIsStable }} + service: + name: {{ template "sentry.fullname" . }}-relay + port: + number: {{ template "relay.port" . }} + {{- else }} + serviceName: {{ template "sentry.fullname" . }}-relay + servicePort: {{ template "relay.port" . }} + {{- end }} + {{- if eq (default "nginx" .Values.ingress.regexPathStyle) "traefik" }} + - path: {{ default "/" .Values.ingress.path }}api/0/relays/{(.*)} + {{- else }} + - path: {{ default "/" .Values.ingress.path }}api/0/relays/(.*) {{- end }} {{- if $ingressSupportsPathType }} pathType: {{ $ingressPathType }}