dnskr commented on code in PR #5281:
URL: https://github.com/apache/kyuubi/pull/5281#discussion_r1327983710
##########
charts/kyuubi/templates/kyuubi-statefulset.yaml:
##########
@@ -69,7 +69,7 @@ spec:
envFrom: {{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
ports:
- {{- range $name, $frontend := .Values.server }}
+ {{- range $name, $frontend := merge .Values.server
.Values.monitoring }}
Review Comment:
Good idea to use merge function here, but I would suggest to render
prometheus(monitoring) port separately to make differentiation between server
and monitoring ports(configs) more clear.
What do you thing about the following instead?
```yaml
ports:
{{- range $name, $frontend := .Values.server }}
{{- if $frontend.enabled }}
- name: {{ $name | kebabcase }}
containerPort: {{ $frontend.port }}
{{- end }}
{{- end }}
{{- if .Values.monitoring.prometheus.enabled }}
- name: prometheus
containerPort: {{ .Values.monitoring.prometheus.port}}
{{- end }}
```
##########
charts/kyuubi/templates/kyuubi-service.yaml:
##########
@@ -15,7 +15,7 @@
limitations under the License.
*/}}
-{{- range $name, $frontend := .Values.server }}
+{{- range $name, $frontend := merge .Values.server .Values.monitoring }}
Review Comment:
I'm not sure we need to create separate `Service` resource instance for
monitoring. Would it be enough to have prometheus port in headless service only?
##########
charts/kyuubi/templates/kyuubi-headless-service.yaml:
##########
@@ -25,7 +25,7 @@ spec:
type: ClusterIP
clusterIP: None
ports:
- {{- range $name, $frontend := .Values.server }}
+ {{- range $name, $frontend := merge .Values.server .Values.monitoring }}
Review Comment:
Similar to comment for `StatefulSet`, let's split rendering for server and
monitoring ports.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]