bito-code-review[bot] commented on code in PR #40507:
URL: https://github.com/apache/superset/pull/40507#discussion_r3523609176
##########
helm/superset/templates/service-mcp.yaml:
##########
@@ -0,0 +1,46 @@
+{{/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/}}
+
+{{- if .Values.supersetMcp.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: "{{ template "superset.fullname" . }}-mcp"
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "superset.componentLabels" (dict "component" "mcp" "root" .) |
nindent 4 }}
+ {{- with .Values.supersetMcp.service.annotations }}
+ annotations: {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ .Values.supersetMcp.service.type }}
+ ports:
+ - port: {{ .Values.supersetMcp.service.port }}
+ targetPort: mcp
+ protocol: TCP
+ name: mcp
+ {{- if and (or (eq .Values.supersetMcp.service.type "NodePort") (eq
.Values.supersetMcp.service.type "LoadBalancer")) (not (empty
.Values.supersetMcp.service.nodePort.http)) }}
+ nodePort: {{ .Values.supersetMcp.service.nodePort.http }}
+ {{- end }}
+ selector:
+ {{- include "supersetMcp.selectorLabels" . | nindent 4 }}
+ {{- if .Values.supersetMcp.service.loadBalancerIP }}
Review Comment:
<!-- Bito Reply -->
The reviewer's suggestion to use `$` instead of `.` in the `include`
template is based on the assumption that the current scope `.` inside the `if`
block refers to `.Values.supersetMcp` rather than the root context. However, if
your testing confirms that the selector labels are rendering correctly with the
current implementation, it indicates that the template scope is behaving as
expected in your environment. You may choose to keep the current implementation
if it is consistent with the patterns used in other services like
`service-flower.yaml` and `service-ws.yaml`.
**helm/superset/templates/service-mcp.yaml**
```
selector:
{{- include "supersetMcp.selectorLabels" $ | nindent 4 }}
```
--
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]