adutra commented on code in PR #3969:
URL: https://github.com/apache/polaris/pull/3969#discussion_r2913247308
##########
helm/polaris/templates/httproute.yaml:
##########
@@ -41,8 +41,21 @@ spec:
sectionName: {{ .Values.httproute.sectionName }}
{{- end }}
rules:
- # We don't specify a matches block here, so the default is a prefix path
match on "/" (match every HTTP request)
- # The backend (Service) to send matching requests to
+ {{- if .Values.httproute.exposeManagementEndpoints }}
+ - matches:
+ - path:
+ type: PathPrefix
+ value: "/mgmt"
Review Comment:
Maybe a safer approach is to just expose a boolean to enable the feature. If
it's true then `/q` -> management port, otherwise `/q` requests are dropped:
```yaml
rules:
# Always intercept /q — either route to mgmt service or drop
- matches:
- path:
type: PathPrefix
value: "/q"
{{- if .Values.httproute.exposeManagementEndpoints }}
backendRefs:
- name: {{ include "polaris.fullnameWithSuffix" (list . "mgmt") }}
port: {{ get (first .Values.managementService.ports) "port" }}
{{- end }}
# Catch-all: everything else goes to the main service
- backendRefs:
- name: {{ $fullName }}
port: {{ get (first .Values.service.ports) "port" }}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]