-
Notifications
You must be signed in to change notification settings - Fork 930
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KYUUBI #5934] [K8S][HELM] Add Spark configuration support
# 🔍 Description ## Issue References 🔗 The PR adds basic support for configuration files to be used by Apache Spark query engine. Relates to #4629 (comment). ## Describe Your Solution 🔧 The PR adds: - Apache Spark related `ConfigMap` that has to be mounted to Kyuubi pods as files. - `KYUUBI_CONF_DIR` and `SPARK_CONF_DIR` environment variables. The `ConfigMap` change: - does not require Kyuubi pods to be restarted, because related files content has to be changed eventually. - does not affect already running Spark applications. ## Types of changes 🔖 - [ ] Bugfix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ Users can configure default Spark properties with `volumes`, `volumeMounts` and other general chart properties. The approach causes Kyuubi pod restarts. #### Behavior With This Pull Request 🎉 Users can configure default Spark properties with `sparkConf.sparkEnv`, `sparkConf.sparkDefaults`, `sparkConf.log4j2` and `sparkConf.metrics`. The approach does not require Kyuubi pod restarts. #### Related Unit Tests N/A --- # Checklist 📝 - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #5934 from dnskr/helm-spark-configs. Closes #5934 3f224e4 [dnskr] [K8S][HELM] Add Spark configuration support Authored-by: dnskr <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
- Loading branch information
Showing
4 changed files
with
95 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{{/* | ||
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.sparkConf.sparkEnv }} | ||
spark-env.sh: | | ||
{{- tpl . $ | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.sparkConf.sparkDefaults }} | ||
spark-defaults.conf: | | ||
{{- tpl . $ | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.sparkConf.log4j2 }} | ||
log4j2.properties: | | ||
{{- tpl . $ | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.sparkConf.metrics }} | ||
metrics.properties: | | ||
{{- tpl . $ | nindent 4 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters