bito-code-review[bot] commented on code in PR #40507:
URL: https://github.com/apache/superset/pull/40507#discussion_r3434984541


##########
helm/superset/templates/deployment-mcp.yaml:
##########
@@ -0,0 +1,169 @@
+{{/*
+
+ 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: apps/v1
+kind: Deployment
+metadata:
+  name: {{ template "superset.fullname" . }}-mcp
+  namespace: {{ .Release.Namespace }}
+  labels:
+    app: {{ template "superset.name" . }}-mcp
+    chart: {{ template "superset.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
+  {{- with .Values.supersetMcp.deploymentAnnotations }}
+  annotations: {{- toYaml . | nindent 4 }}
+  {{- end }}
+spec:
+  replicas: {{ .Values.supersetMcp.replicaCount }}
+  {{- if .Values.supersetMcp.strategy }}
+  strategy: {{- toYaml .Values.supersetMcp.strategy | nindent 4 }}
+  {{- end }}
+  selector:
+    matchLabels:
+    {{- include "supersetMcp.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      annotations:
+        checksum/config: {{ include "superset-config" . | sha256sum }}
+        checksum/secrets: {{ tpl (toJson .Values.extraSecretEnv) . | sha256sum 
}}
+        {{- with .Values.supersetMcp.podAnnotations }}
+          {{- toYaml . | nindent 8 }}
+        {{- end }}
+        {{- if .Values.supersetMcp.forceReload }}
+        force-reload: {{ randAlphaNum 5 | quote }}
+        {{- end }}
+      labels:
+        app: "{{ template "superset.name" . }}-mcp"
+        release: {{ .Release.Name }}
+        {{- if .Values.extraLabels }}
+          {{- toYaml .Values.extraLabels | nindent 8 }}
+        {{- end }}
+        {{- with .Values.supersetMcp.podLabels }}
+          {{- toYaml . | nindent 8 }}
+        {{- end }}
+    spec:
+      {{- if or (.Values.serviceAccount.create) (.Values.serviceAccountName) }}
+      serviceAccountName: {{ template "superset.serviceAccountName" . }}
+      {{- end }}
+      securityContext:
+        runAsUser: {{ .Values.runAsUser }}
+        {{- with .Values.supersetMcp.podSecurityContext }}
+          {{- toYaml . | nindent 8 }}
+        {{- end }}
+      {{- if .Values.supersetMcp.initContainers }}
+      initContainers: {{-  tpl (toYaml .Values.supersetMcp.initContainers) . | 
nindent 6 }}
+      {{- end }}
+      {{- with .Values.hostAliases }}
+      hostAliases: {{- toYaml . | nindent 6 }}
+      {{- end }}
+      containers:
+        - name: "{{ .Chart.Name }}-mcp"
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | 
default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          {{- with .Values.supersetMcp.containerSecurityContext }}
+          securityContext: {{- toYaml . | nindent 12 }}
+          {{- end }}
+          command: {{  tpl (toJson .Values.supersetMcp.command) . }}
+          env:
+            {{- range $key, $value := .Values.extraEnv }}
+            - name: {{ $key | quote}}
+              value: {{ $value | quote }}
+            {{- end }}
+            {{- if .Values.extraEnvRaw }}
+              {{- toYaml .Values.extraEnvRaw | nindent 12 }}
+            {{- end }}
+          envFrom:
+            - secretRef:
+                name: {{ tpl .Values.envFromSecret . | quote }}
+            {{- range .Values.envFromSecrets }}
+            - secretRef:
+                name: {{ tpl . $ | quote }}
+            {{- end }}
+          ports:
+            - name: mcp
+              containerPort: 5008
+              protocol: TCP
+          volumeMounts:
+            - name: superset-config
+              mountPath: {{ .Values.configMountPath | quote }}
+              readOnly: true
+            {{- with .Values.extraVolumeMounts }}
+              {{- tpl (toYaml .) $ | nindent 12 -}}
+            {{- end }}

Review Comment:
   <!-- Bito Reply -->
   The suggestion to add `extraConfigs` volume mounts to the MCP deployment is 
intended to ensure functional parity with other Superset components like the 
main deployment and worker deployments. While you noted that other sidecar 
deployments might currently lack this configuration, applying this change 
ensures that the MCP pods can receive extra configuration files, which is a 
standard requirement for consistency across the Superset chart. You may choose 
to apply this to maintain feature parity, or omit it if you prefer to keep the 
MCP deployment minimal.
   
   **helm/superset/templates/deployment-mcp.yaml**
   ```
   {{- if .Values.extraConfigs }}
               - name: superset-extra-config
                 mountPath: {{ .Values.extraConfigMountPath | quote }}
               {{- end }}
   ```



-- 
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]

Reply via email to