diff --git a/charts/kyuubi/templates/kyuubi-configmap-hadoop.yaml b/charts/kyuubi/templates/kyuubi-configmap-hadoop.yaml new file mode 100644 index 00000000000..ce3afce6378 --- /dev/null +++ b/charts/kyuubi/templates/kyuubi-configmap-hadoop.yaml @@ -0,0 +1,32 @@ +{{/* + 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 }}-hadoop + labels: + {{- include "kyuubi.labels" . | nindent 4 }} +data: + {{- with .Values.hadoopConf.coreSite }} + core-site.xml: | + {{- tpl . $ | nindent 4 }} + {{- end }} + {{- with .Values.hadoopConf.hdfsSite }} + hdfs-site.xml: | + {{- tpl . $ | nindent 4 }} + {{- end }} diff --git a/charts/kyuubi/templates/kyuubi-spark-configmap.yaml b/charts/kyuubi/templates/kyuubi-configmap-spark.yaml similarity index 100% rename from charts/kyuubi/templates/kyuubi-spark-configmap.yaml rename to charts/kyuubi/templates/kyuubi-configmap-spark.yaml diff --git a/charts/kyuubi/templates/kyuubi-statefulset.yaml b/charts/kyuubi/templates/kyuubi-statefulset.yaml index a79b5be9ab8..a4c46966502 100644 --- a/charts/kyuubi/templates/kyuubi-statefulset.yaml +++ b/charts/kyuubi/templates/kyuubi-statefulset.yaml @@ -39,6 +39,7 @@ spec: {{- include "kyuubi.selectorLabels" . | nindent 8 }} annotations: checksum/conf: {{ include (print $.Template.BasePath "/kyuubi-configmap.yaml") . | sha256sum }} + checksum/conf-hadoop: {{ include (print $.Template.BasePath "/kyuubi-configmap-hadoop.yaml") . | sha256sum }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} @@ -65,6 +66,8 @@ spec: env: - name: KYUUBI_CONF_DIR value: {{ .Values.kyuubiConfDir }} + - name: HADOOP_CONF_DIR + value: {{ .Values.hadoopConfDir }} - name: SPARK_CONF_DIR value: {{ .Values.sparkConfDir }} {{- with .Values.env }} @@ -110,6 +113,8 @@ spec: volumeMounts: - name: conf mountPath: {{ .Values.kyuubiConfDir }} + - name: conf-hadoop + mountPath: {{ .Values.hadoopConfDir }} - name: conf-spark mountPath: {{ .Values.sparkConfDir }} {{- with .Values.volumeMounts }} @@ -122,6 +127,9 @@ spec: - name: conf configMap: name: {{ .Release.Name }} + - name: conf-hadoop + configMap: + name: {{ .Release.Name }}-hadoop - name: conf-spark configMap: name: {{ .Release.Name }}-spark diff --git a/charts/kyuubi/values.yaml b/charts/kyuubi/values.yaml index b6b69621ec8..05636f428e7 100644 --- a/charts/kyuubi/values.yaml +++ b/charts/kyuubi/values.yaml @@ -180,6 +180,27 @@ kyuubiConf: # See example at conf/log4j2.xml.template https://kyuubi.readthedocs.io/en/master/configuration/settings.html#logging for more details log4j2: ~ +# $HADOOP_CONF_DIR directory +hadoopConfDir: /opt/hadoop/conf +# Hadoop configuration files +hadoopConf: + # The value (templated string) is used for core-site.xml file + # See https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml and Hadoop documentation for more details + coreSite: ~ + # coreSite: | + # + # + # + # + # hadoop.tmp.dir + # /tmp/hadoop-${user.name} + # + # + + # The value (templated string) is used for hdfs-site.xml file + # See https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml and Hadoop documentation for more details + hdfsSite: ~ + # $SPARK_CONF_DIR directory sparkConfDir: /opt/spark/conf # Spark configuration files