adutra commented on code in PR #3018:
URL: https://github.com/apache/polaris/pull/3018#discussion_r2519859905
##########
helm/polaris/templates/ingress.yaml:
##########
@@ -50,14 +50,6 @@ spec:
- host: {{ .host | quote }}
http:
paths:
- {{- range .paths }}
- - path: {{ .path }}
- pathType: {{ .pathType }}
- backend:
- service:
- name: {{ $fullName }}
- port:
- number: {{ $svcPort }}
- {{- end }}
+ {{ tpl (toYaml .paths) $ | nindent 10 }}
Review Comment:
@MingzhouLin I think I didn't really think about the consequences of my
suggestion, but looking at the result, it seems to me that it's not fair to ask
users to input the whole `path` object, _if they don't need to_.
One of the issues is that now users must input the service name
(`backend.service.name`) and port (`backend.service.port`) – but these fields
have good default values.
Would you be OK for you if we do this instead:
```yaml
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
{{- if .backend }}
backend:
{{- tpl (toYaml .backend) $ | nindent 14 }}
{{- else }}
backend:
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
```
In the above example, if you customize `backend` it will be used, otherwise
a default `backend` is generated.
Sorry for the back and forth 😬
--
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]