diff --git a/charts/kyuubi/templates/kyuubi-hadoop-configmap.yaml b/charts/kyuubi/templates/kyuubi-hadoop-configmap.yaml new file mode 100644 index 00000000000..dae54d596f9 --- /dev/null +++ b/charts/kyuubi/templates/kyuubi-hadoop-configmap.yaml @@ -0,0 +1,27 @@ +{{/* + 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.files }} + {{- tpl (toYaml .) $ | nindent 2 }} + {{- end }} diff --git a/charts/kyuubi/templates/kyuubi-statefulset.yaml b/charts/kyuubi/templates/kyuubi-statefulset.yaml index 57601826f3a..ba57ca52b5b 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-hadoop-configmap.yaml") . | sha256sum }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} @@ -79,6 +80,8 @@ spec: env: - name: KYUUBI_CONF_DIR value: {{ .Values.kyuubiConf.dir }} + - name: HADOOP_CONF_DIR + value: {{ .Values.hadoopConf.dir }} - name: SPARK_CONF_DIR value: {{ .Values.sparkConf.dir }} {{- with .Values.env }} @@ -124,6 +127,8 @@ spec: volumeMounts: - name: conf mountPath: {{ .Values.kyuubiConf.dir }} + - name: conf-hadoop + mountPath: {{ .Values.hadoopConf.dir }} - name: conf-spark mountPath: {{ .Values.sparkConf.dir }} {{- with .Values.volumeMounts }} @@ -141,6 +146,14 @@ spec: {{- with .Values.kyuubiConf.filesFrom }} {{- tpl (toYaml .) $ | nindent 14 }} {{- end }} + - name: conf-hadoop + projected: + sources: + - configMap: + name: {{ .Release.Name }}-hadoop + {{- with .Values.hadoopConf.filesFrom }} + {{- tpl (toYaml .) $ | nindent 14 }} + {{- end }} - name: conf-spark projected: sources: diff --git a/charts/kyuubi/values.yaml b/charts/kyuubi/values.yaml index 4922a61779b..e70098b2154 100644 --- a/charts/kyuubi/values.yaml +++ b/charts/kyuubi/values.yaml @@ -171,6 +171,38 @@ kyuubiConf: # - key: trust-store # path: certs/truststore.jks +# Hadoop configuration files +hadoopConf: + # $HADOOP_CONF_DIR directory + dir: /opt/hadoop/conf + # Configuration files from the specified keys (file name) and values (file content) + files: ~ + #files: + # 'core-site.xml': | + # + # + # + # + # hadoop.tmp.dir + # /tmp/hadoop-${user.name} + # + # + + # Configuration files from the list of existing ConfigMaps and Secrets + filesFrom: [] + #filesFrom: + #- configMap: + # name: hadoop-configs + #- secret: + # name: hadoop-secrets + #- secret: + # name: ssl-secrets + # items: + # - key: key-store + # path: certs/keystore.jks + # - key: trust-store + # path: certs/truststore.jks + # Spark configuration, see https://github.com/apache/spark/tree/master/conf and Spark documentation for more details sparkConf: # $SPARK_CONF_DIR directory