pan3793 commented on code in PR #4776:
URL: https://github.com/apache/kyuubi/pull/4776#discussion_r1179063733


##########
charts/kyuubi/templates/spark-configmap.yaml:
##########
@@ -0,0 +1,91 @@
+{{/*
+  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.
+*/}}
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ .Release.Name }}-spark
+  labels: {{- include "kyuubi.labels" . | nindent 4 }}
+data:
+  {{- with .Values.engine.spark.conf.sparkEnv }}
+  spark-env.sh: |
+    #!/usr/bin/env bash
+    {{- tpl . $ | nindent 4 }}
+  {{- end }}
+
+  spark-defaults.conf: |
+    ## Helm chart provided Spark configurations
+    spark.submit.deployMode=cluster
+
+    spark.master={{ .Values.engine.spark.master }}
+    spark.kubernetes.namespace={{ .Values.engine.spark.namespace | default 
.Release.Namespace }}
+
+    spark.kubernetes.authenticate.driver.serviceAccountName={{ 
.Values.engine.spark.serviceAccount.name | default (printf "%s-spark" 
.Release.Name) }}
+    spark.kubernetes.authenticate.executor.serviceAccountName={{ 
.Values.engine.spark.serviceAccount.name | default (printf "%s-spark" 
.Release.Name) }}
+
+    ### Image properties
+    spark.kubernetes.container.image={{ .Values.engine.spark.image.repository 
}}:{{ .Values.engine.spark.image.tag }}
+    spark.kubernetes.container.image.pullPolicy={{ 
.Values.engine.spark.image.pullPolicy }}
+    spark.kubernetes.container.image.pullSecrets={{ range 
.Values.imagePullSecrets }}{{ print .name "," }}{{ end }}
+
+    ### Driver resources

Review Comment:
   IMO this is kind of over-engineering stuff. I would suggest we left "Driver 
resources" and "Executor resources" to the user.
   
   One advantage of Kyuubi is, it almost transparently supports all Spark 
features, users who are familiar w/ Spark, should quickly understand how Kyuubi 
works and how to configure the Spark engine.



##########
charts/kyuubi/templates/spark-configmap.yaml:
##########
@@ -0,0 +1,91 @@
+{{/*
+  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.
+*/}}
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ .Release.Name }}-spark
+  labels: {{- include "kyuubi.labels" . | nindent 4 }}
+data:
+  {{- with .Values.engine.spark.conf.sparkEnv }}
+  spark-env.sh: |
+    #!/usr/bin/env bash
+    {{- tpl . $ | nindent 4 }}
+  {{- end }}
+
+  spark-defaults.conf: |
+    ## Helm chart provided Spark configurations
+    spark.submit.deployMode=cluster
+
+    spark.master={{ .Values.engine.spark.master }}
+    spark.kubernetes.namespace={{ .Values.engine.spark.namespace | default 
.Release.Namespace }}
+
+    spark.kubernetes.authenticate.driver.serviceAccountName={{ 
.Values.engine.spark.serviceAccount.name | default (printf "%s-spark" 
.Release.Name) }}
+    spark.kubernetes.authenticate.executor.serviceAccountName={{ 
.Values.engine.spark.serviceAccount.name | default (printf "%s-spark" 
.Release.Name) }}
+
+    ### Image properties
+    spark.kubernetes.container.image={{ .Values.engine.spark.image.repository 
}}:{{ .Values.engine.spark.image.tag }}
+    spark.kubernetes.container.image.pullPolicy={{ 
.Values.engine.spark.image.pullPolicy }}
+    spark.kubernetes.container.image.pullSecrets={{ range 
.Values.imagePullSecrets }}{{ print .name "," }}{{ end }}
+
+    ### Driver resources

Review Comment:
   IMO this is kind of over-engineering stuff. I would suggest we left "Driver 
resources" and "Executor resources" to the user.
   
   One advantage of Kyuubi is, it almost transparently supports all Spark 
features, users who are familiar w/ Spark, should easy to understand how Kyuubi 
works and how to configure the Spark engine.



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