Leemoonsoo opened a new pull request #3728: [ZEPPELIN-4748] Format Spark web ui 
url dynamically on Kubernetes
URL: https://github.com/apache/zeppelin/pull/3728
 
 
   ### What is this PR for?
   When Zeppelin is running on Kubernetes, SparkUI URL should be dynamically 
generated, while Kubernetes Service name for Spark interpreter Pod is generated 
on runtime. And Ingress controller or reverse-proxy route traffic to SparkUI.
   
   Problem is, depends on those Ingress or reverse proxy configuration, 
different SparkUI url format might be required.
   
   Currently, generated url format is hardcoded to 
"//<PORT>-<SERVICE_NAME>.<SERVICE_DOMAIN>". And letting user set 
'zeppelin.spark.uiWebUrl' with static value doesn't help at all while url is 
decided on runtime.
   
   This PR accept [jinja 
template](https://jinja.palletsprojects.com/en/2.11.x/) string from 
'zeppelin.spark.uiWebUrl' and bind 3 variables 'PORT', 'SERVICE_NAME', 
'SERVICE_DOMAIN'. Therefore any URL pattern required by Ingress/Reverse-proxy 
can be specified. Each variable has values
   
    * PORT - spark ui port
    * SERVICE_NAME - 
[Service](https://kubernetes.io/docs/concepts/services-networking/service/) 
name for Spark Interpreter Pod.
    * SERVICE_DOMAIN - value of SERVICE_DOMAIN env variable.
   
   For example, when spark UI is running on port '4040', Service name for Spark 
interpreter pod is 'spark-wcoyqq', SERVICE_DOMAIN is my.domain.io,
   
   ```
   https://port-{{PORT}}-{{SERVICE_NAME}}.{{SERVICE_DOMAIN}}
   ```
   value on 'zeppelin.spark.uiWebUrl' property will generate Spark UI link with 
address
   
   ```
   https://port-4040-spark-wcoyqq.mydomain.io
   ```
   
   
   
   ### What type of PR is it?
   Improvement
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/ZEPPELIN-4748
   
   ### Questions:
   * Does the licenses files need update? no
   * Is there breaking changes for older versions? no
   * Does this needs documentation? yes
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to