You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2023/03/24 13:30:36 UTC

[kyuubi] branch branch-1.7 updated: [KYUUBI #4589] [HELM] Update template on port-foward usage guide NOTES.txt

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

chengpan pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/branch-1.7 by this push:
     new b81aef558 [KYUUBI #4589] [HELM] Update template on port-foward usage guide NOTES.txt
b81aef558 is described below

commit b81aef5583d8aaf2e3fbd8975e6fcd39fe4d5567
Author: phyyou <gy...@gmail.com>
AuthorDate: Fri Mar 24 21:30:13 2023 +0800

    [KYUUBI #4589] [HELM] Update template on port-foward usage guide NOTES.txt
    
    - Fix Stale Docs URL in Helm Chart
    - ~~Update kyuubiDefaults structure~~
    - Update NOTES.txt
      - When kyuubi.kyuubiConf.kyuubiDefaults."kyuubi.frontend.bind.host" set localhost, render port-forward example  in NOTES.txt for development usage guide
    - ~~Add extraFiles for config mount~~
      - ~~extraFiles for another file mount in kyuubi conf directory.~~
    
    ### _Why are the changes needed?_
    
    Based on https://github.com/apache/kyuubi/issues/4561#issuecomment-1481026954_
    
    > I think Helm chart notes had been wrong from this commit.
    
    >https://github.com/apache/kyuubi/blob/dbb741fc5b0d2fd4b0640ff70ea12aca75864166/charts/kyuubi/templates/NOTES.txt#L33-L34
    
    > Can we delete this note or update this note  if `--address` option is work like this? :
    > ```suggestion
    >  - To access {{ $.Release.Name }}-{{ $name | kebabcase }} service from outside the cluster for debugging, run the following > >
    > command:
    >     kubectl port-forward svc/{{ $.Release.Name }}-{{ $name | kebabcase }} {{ tpl $frontend.service.port $ }}:{{ tpl >?> >$frontend.service.port $ }} -n {{ $.Release.Namespace }} --address <your-ip>
    > ```
    
    ~~and more changes:~~
    - ~~Update `.Values.kyuubiConf.kyuubiDefaults` to dict for more variant usage in templates. (like NOTES.txt changes)~~
    - ~~Add extraFiles in configmap for like mounting hive-site-xml on kyuubi config directory.~~
    
    ### _How was this patch tested?_
    
    - [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #4589 from phyyou/feat/helm-chart-improve.
    
    Closes #4589
    
    d7ee29e95 [phyyou] Fix regex when no equal sign
    0b86f280a [phyyou] Update condition for edge case
    4edf904f5 [phyyou] chore
    aabe93ca9 [PHYYOU] Update kyuubiDefaults example guide in Helm Chart
    4de896446 [phyyou] Add README.md for Kyuubi Helm Chart (It from airflow chart README.md)
    abacd3277 [phyyou] Add Example Usecases in kyuubiConf
    ebcb2310a [phyyou] Update empty string to nil
    2533a9306 [phyyou] Revert extraFiles
    56fa525a5 [phyyou] Revert kyuubiConf Structure Update Update NOTES.txt for Reverted values
    966e74c50 [phyyou] fix: template => include
    03d698442 [phyyou] Fix: Add EOF
    e6affddf7 [phyyou] Add extraFiles for config mount
    b0963fd48 [phyyou] Update NOTES.txt;
    ac9766ab9 [phyyou] Update kyuubiDefaults structure
    77eaa05ac [phyyou] Fix Stale Docs URL
    
    Lead-authored-by: phyyou <gy...@gmail.com>
    Co-authored-by: PHYYOU <34...@users.noreply.github.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
    (cherry picked from commit 0ebeddae39951ef59ba8c0b4b8aa106791b680a4)
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 charts/kyuubi/README.md           | 43 +++++++++++++++++++++++++++++++++++++++
 charts/kyuubi/templates/NOTES.txt |  4 ++++
 charts/kyuubi/values.yaml         | 25 ++++++++++++++++++++---
 docker/kyuubi-configmap.yaml      |  2 +-
 4 files changed, 70 insertions(+), 4 deletions(-)

diff --git a/charts/kyuubi/README.md b/charts/kyuubi/README.md
new file mode 100644
index 000000000..ef54c3226
--- /dev/null
+++ b/charts/kyuubi/README.md
@@ -0,0 +1,43 @@
+<!--
+ 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.
+ -->
+
+# Helm Chart for Apache Kyuubi
+
+[Apache Kyuubi](https://airflow.apache.org/) is a distributed and multi-tenant gateway to provide serverless SQL on Data Warehouses and Lakehouses.
+
+
+## Introduction
+
+This chart will bootstrap an [Kyuubi](https://kyuubi.apache.org) deployment on a [Kubernetes](http://kubernetes.io)
+cluster using the [Helm](https://helm.sh) package manager.
+
+## Requirements
+
+- Kubernetes cluster
+- Helm 3.0+
+
+<!-- ## Features -->
+
+## Documentation
+
+Configuration guide documentation for Kyuubi lives [on the website](https://kyuubi.readthedocs.io/en/master/deployment/settings.html#kyuubi-configurations). (Not just for Helm Chart)
+
+## Contributing
+
+Want to help build Apache Kyuubi? Check out our [contributing documentation](https://kyuubi.readthedocs.io/en/master/community/CONTRIBUTING.html).
\ No newline at end of file
diff --git a/charts/kyuubi/templates/NOTES.txt b/charts/kyuubi/templates/NOTES.txt
index 0da72d0eb..2693f5ef6 100644
--- a/charts/kyuubi/templates/NOTES.txt
+++ b/charts/kyuubi/templates/NOTES.txt
@@ -30,9 +30,13 @@ In order to check the release status, use:
 {{ $name | snakecase | upper }}:
 - To access {{ $.Release.Name }}-{{ $name | kebabcase }} service within the cluster, use the following URL:
     {{ $.Release.Name }}-{{ $name | kebabcase }}.{{ $.Release.Namespace }}.svc.cluster.local
+{{- if $.Values.kyuubiConf.kyuubiDefaults }}
+{{- if regexMatch "(^|\\s)kyuubi.frontend.bind.host\\s*=?\\s*(localhost|127\\.0\\.0\\.1)($|\\s)" $.Values.kyuubiConf.kyuubiDefaults }}
 - To access {{ $.Release.Name }}-{{ $name | kebabcase }} service from outside the cluster for debugging, run the following command:
     kubectl port-forward svc/{{ $.Release.Name }}-{{ $name | kebabcase }} {{ tpl $frontend.service.port $ }}:{{ tpl $frontend.service.port $ }} -n {{ $.Release.Namespace }}
   and use 127.0.0.1:{{ tpl $frontend.service.port $ }}
+{{- end }}
+{{- end }}
 {{- if eq $frontend.service.type "NodePort" }}
 - To access {{ $.Release.Name }}-{{ $name | kebabcase }} service from outside the cluster through configured NodePort, run the following commands:
     export NODE_PORT=$(kubectl get service {{ $.Release.Name }}-{{ $name | kebabcase }} -n {{ $.Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}")
diff --git a/charts/kyuubi/values.yaml b/charts/kyuubi/values.yaml
index ddd16a9b7..f67352209 100644
--- a/charts/kyuubi/values.yaml
+++ b/charts/kyuubi/values.yaml
@@ -101,15 +101,34 @@ server:
 kyuubiConfDir: /opt/kyuubi/conf
 kyuubiConf:
   # The value (templated string) is used for kyuubi-env.sh file
-  # See https://kyuubi.apache.org/docs/latest/deployment/settings.html#environments for more details
+  # Example:
+  #
+  # kyuubiEnv: |
+  #   export JAVA_HOME=/usr/jdk64/jdk1.8.0_152
+  #   export SPARK_HOME=/opt/spark
+  #   export FLINK_HOME=/opt/flink
+  #   export HIVE_HOME=/opt/hive
+  #
+  # See example at conf/kyuubi-env.sh.template and https://kyuubi.readthedocs.io/en/master/deployment/settings.html#environments for more details
   kyuubiEnv: ~
 
   # The value (templated string) is used for kyuubi-defaults.conf file
-  # See https://kyuubi.apache.org/docs/latest/deployment/settings.html#kyuubi-configurations for more details
+  # Example:
+  #
+  # kyuubiDefaults: |
+  #   kyuubi.authentication=NONE
+  #   kyuubi.frontend.bind.host=10.0.0.1
+  #   kyuubi.engine.type=SPARK_SQL
+  #   kyuubi.engine.share.level=USER
+  #   kyuubi.session.engine.initialize.timeout=PT3M
+  #   kyuubi.ha.addresses=zk1:2181,zk2:2181,zk3:2181
+  #   kyuubi.ha.namespace=kyuubi
+  #
+  # See https://kyuubi.readthedocs.io/en/master/deployment/settings.html#kyuubi-configurations for more details
   kyuubiDefaults: ~
 
   # The value (templated string) is used for log4j2.xml file
-  # See https://kyuubi.apache.org/docs/latest/deployment/settings.html#logging for more details
+  # See example at conf/log4j2.xml.template https://kyuubi.readthedocs.io/en/master/deployment/settings.html#logging for more details
   log4j2: ~
 
 # Environment variables (templated)
diff --git a/docker/kyuubi-configmap.yaml b/docker/kyuubi-configmap.yaml
index 13835493b..9b7993596 100644
--- a/docker/kyuubi-configmap.yaml
+++ b/docker/kyuubi-configmap.yaml
@@ -52,4 +52,4 @@ data:
     # kyuubi.frontend.bind.port       10009
     #
 
-    # Details in https://kyuubi.apache.org/docs/latest/deployment/settings.html
+    # Details in https://kyuubi.readthedocs.io/en/master/deployment/settings.html