Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[K8S][HELM] Add Hadoop configuration files support #6875

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions charts/kyuubi/templates/kyuubi-hadoop-configmap.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
13 changes: 13 additions & 0 deletions charts/kyuubi/templates/kyuubi-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down
32 changes: 32 additions & 0 deletions charts/kyuubi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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': |
# <?xml version="1.0"?>
# <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
# <configuration>
# <property>
# <name>hadoop.tmp.dir</name>
# <value>/tmp/hadoop-${user.name}</value>
# </property>
# </configuration>

# 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
Expand Down
Loading