You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ya...@apache.org on 2021/07/27 07:01:12 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #859] Add kubernetes configmap

This is an automated email from the ASF dual-hosted git repository.

yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new d90c21e  [KYUUBI #859] Add kubernetes configmap
d90c21e is described below

commit d90c21e0b07d6c65c40b4f5f075d55b2d9386fb5
Author: hongdongdong <ho...@cmss.chinamobile.com>
AuthorDate: Tue Jul 27 15:00:54 2021 +0800

    [KYUUBI #859] Add kubernetes configmap
    
    <!--
    Thanks for sending a pull request!
    
    Here are some tips for you:
      1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
      2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
      3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
    -->
    
    ### _Why are the changes needed?_
    <!--
    Please clarify why the changes are needed. For instance,
      1. If you add a feature, you can talk about the use case of it.
      2. If you fix a bug, you can clarify why it is a bug.
    -->
    Now, we need to rebuild docker image when config changed. Use configmap to save kyuubi config file, then we can change config by edit configmap and restart pod.
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [X] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request
    
    Closes #866 from hddong/kyuubi-859.
    
    Closes #859
    
    caae67d1 [hongdongdong] fix comments
    13fc08aa [hongdongdong] [KYUUBI#859]Add kubernetes configmap
    
    Authored-by: hongdongdong <ho...@cmss.chinamobile.com>
    Signed-off-by: Kent Yao <ya...@apache.org>
---
 docker/kyuubi-pod.yaml | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/docker/kyuubi-pod.yaml b/docker/kyuubi-pod.yaml
index bf533eb..38ed965 100644
--- a/docker/kyuubi-pod.yaml
+++ b/docker/kyuubi-pod.yaml
@@ -16,6 +16,8 @@
 #
 
 # Usage:
+# ConfigMap:
+#   kubectl create cm kyuubi-defaults --from-file=${KYUUBI_HOME}/conf/kyuubi-defaults.conf
 # Start:
 #   kubectl apply -f https://raw.githubusercontent.com/apache/incubator-kyuubi/master/docker/kyuubi-pod.yaml
 # Expose port:
@@ -27,8 +29,14 @@
 #     ${SPARK_HOME}/bin/beeline -u 'jdbc:hive2://localhost:10009'
 # 2. Expose the Pod as a service with NodePort
 #   see usage of kyuubi-service.yaml
-# Logging
+# Logging:
 #   kubectl logs -f kyuubi-example
+# Config change:
+# 1. edit ConfigMap
+#   kubectl edit cm kyuubi-defaults
+# 2. restart pod
+#   kubectl delete -f https://raw.githubusercontent.com/apache/incubator-kyuubi/master/docker/kyuubi-pod.yaml
+#   kubectl apply -f https://raw.githubusercontent.com/apache/incubator-kyuubi/master/docker/kyuubi-pod.yaml
 
 apiVersion: v1
 kind: Pod
@@ -49,3 +57,10 @@ spec:
         - name: frontend-port
           containerPort: 10009
           protocol: TCP
+      volumeMounts:
+        - name: kyuubi-defaults
+          mountPath: /opt/kyuubi/conf
+  volumes:
+    - name: kyuubi-defaults
+      configMap:
+        name: kyuubi-defaults